NULL
This commit is contained in:
61
user/MCU/lhl_dma.h
Executable file
61
user/MCU/lhl_dma.h
Executable file
@@ -0,0 +1,61 @@
|
||||
#ifndef __LHL_DMA_H__
|
||||
#define __LHL_DMA_H__
|
||||
|
||||
|
||||
#ifndef ENABLE_USER_UART
|
||||
#pragma message("[undefined] ENABLE_USER_UART")
|
||||
#elif(ENABLE_USER_UART)
|
||||
#define DMA_CHANNEL_UART_Rx DMA_CHANNEL_0
|
||||
#define DMA_CHANNEL_UART_Tx DMA_CHANNEL_0
|
||||
#define DMA_CHANNEL_BtimCfg DMA_CHANNEL_1
|
||||
|
||||
//DMA<4D>ɼ<EFBFBD>
|
||||
#define DMA_CHANNEL_ADC_0 DMA_CHANNEL_2
|
||||
#define DMA_CHANNEL_ADC_1 DMA_CHANNEL_3
|
||||
//DMA<4D><41><EFBFBD>вɼ<D0B2>
|
||||
#define DMA_CHANNEL_ADC_STA DMA_CHANNEL_ADC_0
|
||||
#define DMA_CHANNEL_ADC_CTL DMA_CHANNEL_ADC_1
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef ENABLE_USER_I2C
|
||||
#pragma message("[undefined] ENABLE_USER_I2C")
|
||||
#elif(ENABLE_USER_I2C)
|
||||
#define DMA_CHANNEL_I2C_Rx DMA_CHANNEL_0
|
||||
#define DMA_CHANNEL_I2C_Tx DMA_CHANNEL_1
|
||||
#define DMA_CHANNEL_ADC_0 DMA_CHANNEL_2
|
||||
#define DMA_CHANNEL_ADC_1 DMA_CHANNEL_3
|
||||
#define DMA_CHANNEL_ADC_STA DMA_CHANNEL_ADC_0
|
||||
#define DMA_CHANNEL_ADC_CTL DMA_CHANNEL_ADC_1
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD>DMAMUX<55><58>DMA<4D><41>·<EFBFBD><C2B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
||||
void DMA_DMAMUX_CFG(DMA_CHANNEL_t channel,DMAMUX_REQ_SRC_t source);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*============================================================================
|
||||
DMA <20>жϻص<CFBB><D8B5><EFBFBD><EFBFBD><EFBFBD>
|
||||
============================================================================*/
|
||||
typedef void (*dma_half_irq_callback_t)(void);
|
||||
typedef void (*dma_major_irq_callback_t)(void);
|
||||
typedef struct {
|
||||
dma_half_irq_callback_t half_callback;
|
||||
dma_major_irq_callback_t major_callback;
|
||||
} dma_callbacks_t;
|
||||
|
||||
void DMA_register_irq_callback(DMA_CHANNEL_t dmachannel, dma_half_irq_callback_t dma_half_irq_callback ,dma_major_irq_callback_t dma_major_irq_callback);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user