added in recursion to the twi for TX

This commit is contained in:
Jake Goodwin 2023-09-06 23:00:10 -07:00
parent 530ea98b28
commit 0c5fcf85ac
1 changed files with 5 additions and 0 deletions

View File

@ -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*/