]> rtime.felk.cvut.cz Git - pes-rpp/rpp-lib.git/blobdiff - rpp/src/drv/din.c
Now that the DIN driver is working I updated the Simulink demo, and the static librar...
[pes-rpp/rpp-lib.git] / rpp / src / drv / din.c
index cf3c5523f7058a44187cdb6bd116037477a19f5c..135bf68fe58769dcebeb7d67938615da369f892b 100644 (file)
@@ -202,8 +202,10 @@ uint16_t din_get_val_word()
 
     // How it actually is.
     // Ignore datasheet, this is the actual response from the SPI driver:
-    // [xxxx xxxx][SG7-SG0][SP1 SP0 xx xxxxxx][xx SP7-SP2]
+    // [xxxx xxxx][SG7-SG0][SP1 SP0 yy yyyy][zz SP7-SP2]
     //  x: Unknown.
+    //  y: Maybe SG13-SG8, but untested.
+    //  z: Maybe therm flag and int flag.
     // For SP: First get SP7-SP2 right, then add SP1 and SP0
     uint16_t sp = ((din_spi_resp << 2) & 0x00FF) | ((din_spi_resp >> 14) & 0x3);
     uint16_t sg = ((din_spi_resp >> 8) & 0xFF00);