From 43b5eadf92077d9460b24d68ef6f804c7404204c Mon Sep 17 00:00:00 2001 From: leodicarpaccio <82886322+leodicarpaccio@users.noreply.github.com> Date: Tue, 20 Apr 2021 15:26:48 +0200 Subject: [PATCH] Update tm_stm32_i2c_dma.c Some corrections to at least compile the module --- 00-STM32_LIBRARIES/tm_stm32_i2c_dma.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/00-STM32_LIBRARIES/tm_stm32_i2c_dma.c b/00-STM32_LIBRARIES/tm_stm32_i2c_dma.c index dab8f35..c9fccb0 100644 --- a/00-STM32_LIBRARIES/tm_stm32_i2c_dma.c +++ b/00-STM32_LIBRARIES/tm_stm32_i2c_dma.c @@ -228,7 +228,7 @@ uint8_t TM_I2C_DMA_SendByte(I2C_TypeDef* I2Cx, uint8_t value, uint16_t count) { TM_DMA_Start(&DMA_InitStruct, (uint32_t) &Settings->Dummy32, (uint32_t) &I2Cx->DR, count); /* Enable I2C TX DMA */ - I2Cx->CR2 |= I2C_CR2_TXDMAEN; + I2Cx->CR2 |= I2C_CR2_DMAEN; /* Return OK */ return 1; @@ -273,7 +273,7 @@ uint8_t TM_I2C_DMA_SendHalfWord(I2C_TypeDef* I2Cx, uint16_t value, uint16_t coun TM_DMA_Start(&DMA_InitStruct, (uint32_t) &Settings->Dummy16, (uint32_t) &I2Cx->DR, count); /* Enable I2C TX DMA */ - I2Cx->CR2 |= I2C_CR2_TXDMAEN; + I2Cx->CR2 |= I2C_CR2_DMAEN; /* Return OK */ return 1; @@ -287,7 +287,7 @@ uint8_t TM_I2C_DMA_Transmitting(I2C_TypeDef* I2Cx) { return ( Settings->RX_Stream->NDTR || /*!< RX is working */ Settings->TX_Stream->NDTR || /*!< TX is working */ - I2C_IS_BUSY(I2Cx) /*!< I2C is busy */ + I2C_SR2_BUSY(I2Cx) /*!< I2C is busy */ ); }