[M487] Add dma_modbase() to get PDMA base address

pull/4608/head
ccli8 2017-03-08 15:57:03 +08:00
parent aeee0e8b57
commit a76d55a555
2 changed files with 6 additions and 0 deletions

View File

@ -32,6 +32,7 @@ extern "C" {
#define DMA_EVENT_MASK DMA_EVENT_ALL
void dma_set_handler(int channelid, uint32_t handler, uint32_t id, uint32_t event);
PDMA_T *dma_modbase(void);
#ifdef __cplusplus
}

View File

@ -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);
}
PDMA_T *dma_modbase(void)
{
return (PDMA_T *) NU_MODBASE(dma_modinit.modname);
}
static void pdma_vec(void)
{
uint32_t intsts = PDMA_GET_INT_STATUS();