tle8888 refactoring already - extracting method
This commit is contained in:
parent
abf0f950e7
commit
6c843e6954
|
@ -25,6 +25,8 @@
|
|||
// we can change this value on TLE8888QK but we probably do not have a reason to change
|
||||
#define Window_watchdog_close_window_time_ms 100.8
|
||||
|
||||
#define getRegisterFromResponse(x) (x >> 1) & 0x7f
|
||||
|
||||
// unchangeable value for TLE8888QK
|
||||
// unused for now
|
||||
//#define Window_watchdog_open_window_time_ms 12.8
|
||||
|
|
|
@ -66,7 +66,7 @@ void tle8888_dump_regs(void)
|
|||
for (int request = 0; request < 0x7e + 1; request++) {
|
||||
uint16_t tmp;
|
||||
tle8888_read_reg(request, &tmp);
|
||||
uint8_t response = (tmp >> 1) & 0x7f;
|
||||
uint8_t response = getRegisterFromResponse(tmp);
|
||||
uint8_t data = (tmp >> 8) & 0xff;
|
||||
|
||||
scheduleMsg(&logger, "%02x: %02x", response, data);
|
||||
|
|
Loading…
Reference in New Issue