mirror of https://github.com/ARMmbed/mbed-os.git
Add dma_modbase() to get PDMA base address
parent
83c6bda16e
commit
809e4925bc
|
@ -32,6 +32,7 @@ extern "C" {
|
||||||
#define DMA_EVENT_MASK DMA_EVENT_ALL
|
#define DMA_EVENT_MASK DMA_EVENT_ALL
|
||||||
|
|
||||||
void dma_set_handler(int channelid, uint32_t handler, uint32_t id, uint32_t event);
|
void dma_set_handler(int channelid, uint32_t handler, uint32_t id, uint32_t event);
|
||||||
|
PDMA_T *dma_modbase(void);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -111,6 +111,11 @@ void dma_set_handler(int channelid, uint32_t handler, uint32_t id, uint32_t even
|
||||||
NVIC_EnableIRQ(dma_modinit.irq_n);
|
NVIC_EnableIRQ(dma_modinit.irq_n);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PDMA_T *dma_modbase(void)
|
||||||
|
{
|
||||||
|
return (PDMA_T *) NU_MODBASE(dma_modinit.modname);
|
||||||
|
}
|
||||||
|
|
||||||
static void pdma_vec(void)
|
static void pdma_vec(void)
|
||||||
{
|
{
|
||||||
uint32_t intsts = PDMA_GET_INT_STATUS();
|
uint32_t intsts = PDMA_GET_INT_STATUS();
|
||||||
|
|
Loading…
Reference in New Issue