fix buffer over-read
This commit is contained in:
parent
b042c68965
commit
dcb4f48082
@ -263,7 +263,7 @@ uint8_t amsWriteComm(uint8_t device, uint8_t addr, uint8_t data) {
|
||||
CHECK_RETURN(writeCMD(WRCOMM, txbuf, COMM_GROUP_SIZE));
|
||||
uint8_t rxbuf[6] = {0,0,0,0,0,0};
|
||||
readCMD(RDCOMM, rxbuf, COMM_GROUP_SIZE);
|
||||
if (rxbuf[6] != txbuf[6]) {
|
||||
if (rxbuf[5] != txbuf[5]) { // assert that the data was written correctly
|
||||
while(1){}
|
||||
}
|
||||
CHECK_RETURN(writeCMD_I2C(STCOMM, 72, NULL, 0));
|
||||
|
Loading…
x
Reference in New Issue
Block a user