gpio: tle9104: TODOs

This commit is contained in:
Andrey Gusakov 2024-06-21 00:40:21 +03:00 committed by rusefillc
parent b9efa23c98
commit e3545bcdc4
1 changed files with 3 additions and 0 deletions

View File

@ -90,6 +90,7 @@ static bool parityBit(uint16_t val) {
// (1 + number of bits set) mod 2 = parity bit
int count = 1;
/* TODO: use __builtin_popcount() */
while (val != 0) {
if (val & 0x01) {
count++;
@ -125,6 +126,8 @@ int Tle9104::spi_rw(uint16_t tx, uint16_t *rx) {
return -1;
}
/* TODO: check Fault Global and Fault Communication flags */
// return data
if (rx) {
*rx = rxd;