TEMP: Disable DMA I2C

This commit is contained in:
Ben V. Brown
2022-01-12 20:03:44 +11:00
parent 397c7a2406
commit f79dec5ee3

View File

@@ -56,11 +56,12 @@ bool FRToSI2C::Mem_Write(uint16_t DevAddress, uint16_t MemAddress, uint8_t *pDat
bool FRToSI2C::Transmit(uint16_t DevAddress, uint8_t *pData, uint16_t Size) {
if (!lock())
return false;
if (HAL_I2C_Master_Transmit_DMA(&hi2c1, DevAddress, pData, Size) != HAL_OK) {
if (HAL_I2C_Master_Transmit(&hi2c1, DevAddress, pData, Size, 1000) != HAL_OK) {
I2C_Unstick();
unlock();
return false;
}
unlock();
return true;
}