added in recursion to the twi for TX
This commit is contained in:
parent
530ea98b28
commit
0c5fcf85ac
|
@ -37,6 +37,11 @@ void fake_twi_tx(uint8_t slave_addr, uint8_t *data, uint8_t size)
|
|||
if(idx > REG_SIZE){
|
||||
idx = 0;
|
||||
}
|
||||
|
||||
/*Make use of recursion if there is still more data*/
|
||||
if((size - 2) > 0) {
|
||||
fake_twi_tx(slave_addr, data + 2, size - 2);
|
||||
}
|
||||
}
|
||||
|
||||
/* Fake Object for TWI_RX*/
|
||||
|
|
Loading…
Reference in New Issue