◆ tle9104_drv_state
Enumerator |
---|
TLE9104_DISABLED | |
TLE9104_WAIT_INIT | |
TLE9104_READY | |
TLE9104_FAILED | |
Definition at line 27 of file tle9104.cpp.
◆ initAll9104()
◆ parityBit()
static bool parityBit |
( |
uint16_t |
val | ) |
|
|
static |
Definition at line 110 of file tle9104.cpp.
110 {
111
112 int count = 1 + __builtin_popcount(val);
113
115
116#if 0
117 while (val != 0) {
118 if (val & 0x01) {
120 }
121
122 val = val >> 1;
123 }
124
125 return (
count % 2) == 1;
126#endif
127}
◆ SEMAPHORE_DECL()
SEMAPHORE_DECL |
( |
tle9104_wake |
, |
|
|
10 |
|
|
) |
| |
◆ THD_FUNCTION()
static THD_FUNCTION |
( |
tle9104_driver_thread |
, |
|
|
p |
|
|
) |
| |
|
static |
Definition at line 301 of file tle9104.cpp.
301 {
302 int i;
303 msg_t msg;
304
305 (void)p;
306
307 chRegSetThreadName(DRIVER_NAME);
308
309 while(1) {
311 chThdSleepMilliseconds(300);
312 return;
313 }
314
315 msg = chSemWaitTimeout(&tle9104_wake, TIME_MS2I(TLE9104_POLL_INTERVAL_MS));
316
317
318 (void)msg;
319
320 for (i = 0; i < BOARD_TLE9104_COUNT; i++) {
321 int ret;
322 Tle9104& chip =
chips[i];
323
324 if (!chip.cfg ||
327 continue;
328
329 ret = chip.updateDiagState();
330 if (ret) {
331
332 }
333 ret = chip.updateStatus();
334 if (ret) {
335
336 }
337 }
338 }
339}
static Tle9104 chips[BOARD_TLE9104_COUNT]
static IgnVoltageGatekeeper gatekeeper
◆ THD_WORKING_AREA()
static THD_WORKING_AREA |
( |
tle9104_thread_1_wa |
, |
|
|
256 |
|
|
) |
| |
|
static |
◆ tle9104_add()
Definition at line 554 of file tle9104.cpp.
554 {
555 Tle9104& chip =
chips[index];
556
557
558 if (chip.cfg != nullptr) {
559 return -52;
560 }
561
562 chip.cfg = cfg;
564
566}
int gpiochip_register(brain_pin_e base, const char *name, GpioChip &gpioChip, size_t size)
Register gpiochip.
Referenced by initAll9104().
◆ chips
Tle9104 chips[BOARD_TLE9104_COUNT] |
|
static |
◆ drv_task_ready
bool drv_task_ready = false |
|
static |
◆ gatekeeper
Go to the source code of this file.