I can't make the call parameter a pointer to volatile uint8_t type because the function is used elsewhere with non volatile uint8_t.
If I write a value to the variable in the callback (sixD_src = 1;), the value is modified and I can get it in the main()
the function used in the callback "LIS2DW12_ReadByteRegister(LIS2DW12_REG_SIXD_SRC, &sixD_src)" will read I2C using interrupts. I'm using I2C interrupts in an interrupt callback, am I'm wrong? or I should define interrupt priority or I just miss something....
I use I2C from MCC, my function above derived from MMC example:
bool LIS2DW12_ReadByteRegister(uint8_t dataAddress, uint8_t *pData)
// we need to create the TRBs for a random read sequence to the EEPROM
// Build TRB for sending address
// Build TRB for receiving data
return I2C_SendTransaction(2, readTRB);