12345678910111213141516 |
- #include "fw.h"
- #include "io.h"
- void setup_abc_dma(void *buf, unsigned int len, uint8_t devsel,
- bool dir_in, unsigned long status)
- {
- devsel &= 63;
- volatile uint32_t *portctl = &ABCMEM_WRPORT(devsel) + dir_in;
- volatile uint32_t *portcount = &ABCMEM_WRCOUNT(devsel) + dir_in;
- volatile uint32_t *portstatus = &ABCMEMMAP_STATUS(devsel);
- *portctl = ((size_t)buf & 0x01ffffff) | (ABCMEMMAP_WR << dir_in);
- *portcount = len;
- *portstatus = status;
- }
|