XferOptions for I2C slave. Are they a useless appendix of the HAL-Driver
Hello my friends,
I am trying to setup an I2C slave that is being addressed with a read-request and then answers a fixed number of bytes. I was trying to find out what the XferOptions do, but after I could not find out I went through the HAL-driver code myself and found no location where they are actually being used. The basic procedure is, that interrupts are being generated by the hardware, set some flags, and in the TX-Slave part of the code, nowhere the XferOptions are used (am I right?). So I dont know what to do with them, just write anything in? Is this a "Bug" in that sense that the lib asks you for a parameter that is never being used?
void HAL_I2C_AddrCallback(I2C_HandleTypeDef *hi2c, uint8_t TransferDirection, uint16_t AddrMatchCode){
if (TransferDirection == I2C_DIRECTION_TRANSMIT) // if the master wants to transmit the data
{
//HAL_I2C_Slave_Seq_Receive_IT(hi2c, &dummy_in, 1, I2C_FIRST_FRAME);
RINGBUFFER_reset();
}
else{
RINGBUFFER_dequeue(&data);
//TODO: put into dataOutArr
HAL_I2C_Slave_Seq_Transmit_IT(hi2c, (uint8_t*)&data, 9, ???);
}
}
