DMA rename IFCR -> INTC
This commit is contained in:
parent
186264dece
commit
51b420e395
|
@ -390,8 +390,8 @@ void dmaInit(void) {
|
|||
_gd32_dma_streams[i].channel->CCR = GD32_DMA_CCR_RESET_VALUE;
|
||||
dma.streams[i].func = NULL;
|
||||
}
|
||||
DMA0->IFCR = 0xFFFFFFFFU;
|
||||
DMA1->IFCR = 0xFFFFFFFFU;
|
||||
DMA0->INTC = 0xFFFFFFFFU;
|
||||
DMA1->INTC = 0xFFFFFFFFU;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -577,7 +577,7 @@ void dmaServeInterrupt(const gd32_dma_stream_t *dmastp) {
|
|||
|
||||
flags = (dmastp->dma->INTF >> dmastp->shift) & GD32_DMA_INTF_MASK;
|
||||
if (flags & dmastp->channel->CCR) {
|
||||
dmastp->dma->IFCR = flags << dmastp->shift;
|
||||
dmastp->dma->INTC = flags << dmastp->shift;
|
||||
if (dma.streams[selfindex].func) {
|
||||
dma.streams[selfindex].func(dma.streams[selfindex].param, flags);
|
||||
}
|
||||
|
|
|
@ -363,7 +363,7 @@ typedef struct {
|
|||
* @special
|
||||
*/
|
||||
#define dmaStreamClearInterrupt(dmastp) { \
|
||||
(dmastp)->dma->IFCR = GD32_DMA_INTF_MASK << (dmastp)->shift; \
|
||||
(dmastp)->dma->INTC = GD32_DMA_INTF_MASK << (dmastp)->shift; \
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -635,6 +635,8 @@ void i2c_lld_start(I2CDriver *i2cp) {
|
|||
/* Reset i2c peripheral.*/
|
||||
dp->CR1 = I2C_CR1_SWRST;
|
||||
dp->CR1 = 0;
|
||||
dp->CR2 = 0;
|
||||
dp->SR1 = 0;
|
||||
dp->CR2 = I2C_CR2_ITERREN;
|
||||
/* Setup I2C parameters.*/
|
||||
i2c_lld_set_clock(i2cp);
|
||||
|
|
|
@ -300,7 +300,7 @@ typedef struct
|
|||
typedef struct
|
||||
{
|
||||
__IO uint32_t INTF;
|
||||
__IO uint32_t IFCR;
|
||||
__IO uint32_t INTC ;
|
||||
} DMA_TypeDef;
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue