65 DMA_SCR(dma, stream) &= ~DMA_SxCR_EN;
131 return ((
DMA_LISR(dma) & flag) > 0);
133 return ((
DMA_HISR(dma) & flag) > 0);
153 uint32_t reg32 = (
DMA_SCR(dma, stream) & ~DMA_SxCR_DIR_MASK);
162 DMA_SCR(dma, stream) = (reg32 | direction);
201 DMA_SCR(dma, stream) |= mem_size;
220 uint32_t peripheral_size)
223 DMA_SCR(dma, stream) |= peripheral_size;
255 DMA_SCR(dma, stream) &= ~DMA_SxCR_MINC;
274 DMA_SCR(dma, stream) = (reg32 & ~DMA_SxCR_PINCOS);
288 DMA_SCR(dma, stream) &= ~DMA_SxCR_PINC;
347 DMA_SCR(dma, stream) |= channel;
365 uint32_t reg32 = (
DMA_SCR(dma, stream) & ~DMA_SxCR_MBURST_MASK);
366 DMA_SCR(dma, stream) = (reg32 | burst);
384 uint32_t reg32 = (
DMA_SCR(dma, stream) & ~DMA_SxCR_PBURST_MASK);
385 DMA_SCR(dma, stream) = (reg32 | burst);
403 uint32_t reg32 = (
DMA_SCR(dma, stream) & ~DMA_SxCR_CT);
462 DMA_SCR(dma, stream) &= ~DMA_SxCR_DBM;
495 DMA_SCR(dma, stream) &= ~DMA_SxCR_PFCTRL;
520 DMA_SCR(dma, stream) &= ~DMA_SxCR_TEIE;
545 DMA_SCR(dma, stream) &= ~DMA_SxCR_HTIE;
570 DMA_SCR(dma, stream) &= ~DMA_SxCR_TCIE;
595 DMA_SCR(dma, stream) &= ~DMA_SxCR_DMEIE;
620 DMA_SFCR(dma, stream) &= ~DMA_SxFCR_FEIE;
652 DMA_SFCR(dma, stream) &= ~DMA_SxFCR_DMDIS;
682 uint32_t reg32 = (
DMA_SFCR(dma, stream) & ~DMA_SxFCR_FTH_MASK);
683 DMA_SFCR(dma, stream) = (reg32 | threshold);
709 DMA_SCR(dma, stream) &= ~DMA_SxCR_EN;
729 DMA_SPAR(dma, stream) = (uint32_t *) address;
750 uint32_t reg32 =
DMA_SCR(dma, stream);
753 DMA_SM0AR(dma, stream) = (uint32_t *) address;
772 uint32_t reg32 =
DMA_SCR(dma, stream);
775 DMA_SM1AR(dma, stream) = (uint32_t *) address;
#define DMA_SFCR(port, n)
#define DMA_SM1AR(port, n)
#define DMA_SM0AR(port, n)
#define DMA_ISR_MASK(stream)
#define DMA_SxCR_MSIZE_MASK
#define DMA_ISR_OFFSET(stream)
#define DMA_SxCR_PSIZE_MASK
#define DMA_SxFCR_FS_MASK
#define DMA_SNDTR(port, n)
#define DMA_SPAR(port, n)
void dma_enable_half_transfer_interrupt(uint32_t dma, uint8_t stream)
DMA Stream Enable Interrupt on Transfer Half Complete.
uint16_t dma_get_number_of_data(uint32_t dma, uint8_t stream)
DMA Stream Get the Transfer Block Size.
void dma_enable_transfer_complete_interrupt(uint32_t dma, uint8_t stream)
DMA Stream Enable Interrupt on Transfer Complete.
void dma_enable_fixed_peripheral_increment_mode(uint32_t dma, uint8_t stream)
DMA Channel Enable Fixed Sized Peripheral Increment after Transfer.
void dma_set_memory_burst(uint32_t dma, uint8_t stream, uint32_t burst)
DMA Stream Set Memory Burst Configuration.
void dma_disable_transfer_error_interrupt(uint32_t dma, uint8_t stream)
DMA Stream Disable Interrupt on Transfer Error.
void dma_set_transfer_mode(uint32_t dma, uint8_t stream, uint32_t direction)
DMA Stream Enable Transfer Direction.
void dma_channel_select(uint32_t dma, uint8_t stream, uint32_t channel)
DMA Stream Channel Select.
void dma_set_fifo_threshold(uint32_t dma, uint8_t stream, uint32_t threshold)
DMA Set FIFO Threshold.
void dma_enable_direct_mode_error_interrupt(uint32_t dma, uint8_t stream)
DMA Stream Enable Interrupt on Direct Mode Error.
void dma_disable_direct_mode_error_interrupt(uint32_t dma, uint8_t stream)
DMA Stream Disable Interrupt on Direct Mode Error.
void dma_set_peripheral_size(uint32_t dma, uint8_t stream, uint32_t peripheral_size)
DMA Stream Set Peripheral Word Width.
void dma_set_priority(uint32_t dma, uint8_t stream, uint32_t prio)
DMA Stream Set Priority.
void dma_set_memory_address_1(uint32_t dma, uint8_t stream, uint32_t address)
DMA Stream Set the Base Memory Address 1.
void dma_enable_peripheral_increment_mode(uint32_t dma, uint8_t stream)
DMA Channel Enable Variable Sized Peripheral Increment after Transfer.
void dma_disable_stream(uint32_t dma, uint8_t stream)
DMA Stream Disable.
void dma_enable_fifo_mode(uint32_t dma, uint8_t stream)
DMA Enable FIFO Mode.
void dma_enable_double_buffer_mode(uint32_t dma, uint8_t stream)
DMA Stream Enable Double Buffer Mode.
void dma_enable_direct_mode(uint32_t dma, uint8_t stream)
DMA Enable Direct Mode.
void dma_enable_transfer_error_interrupt(uint32_t dma, uint8_t stream)
DMA Stream Enable Interrupt on Transfer Error.
void dma_set_memory_size(uint32_t dma, uint8_t stream, uint32_t mem_size)
DMA Stream Set Memory Word Width.
void dma_set_peripheral_burst(uint32_t dma, uint8_t stream, uint32_t burst)
DMA Stream Set Peripheral Burst Configuration.
void dma_set_peripheral_address(uint32_t dma, uint8_t stream, uint32_t address)
DMA Stream Set the Peripheral Address.
void dma_set_initial_target(uint32_t dma, uint8_t stream, uint8_t memory)
DMA Stream Set Initial Target Memory.
void dma_enable_fifo_error_interrupt(uint32_t dma, uint8_t stream)
DMA Enable Interrupt on FIFO Error.
void dma_stream_reset(uint32_t dma, uint8_t stream)
DMA Stream Reset.
bool dma_get_interrupt_flag(uint32_t dma, uint8_t stream, uint32_t interrupt)
DMA Stream Read Interrupt Flag.
uint8_t dma_get_target(uint32_t dma, uint8_t stream)
DMA Stream Read Current Memory Target.
void dma_enable_circular_mode(uint32_t dma, uint8_t stream)
DMA Stream Enable Memory Circular Mode.
void dma_disable_fifo_error_interrupt(uint32_t dma, uint8_t stream)
DMA Disable Interrupt on FIFO Error.
void dma_disable_half_transfer_interrupt(uint32_t dma, uint8_t stream)
DMA Stream Disable Interrupt on Transfer Half Complete.
void dma_disable_transfer_complete_interrupt(uint32_t dma, uint8_t stream)
DMA Stream Disable Interrupt on Transfer Complete.
void dma_disable_memory_increment_mode(uint32_t dma, uint8_t stream)
DMA Channel Disable Memory Increment after Transfer.
uint32_t dma_fifo_status(uint32_t dma, uint8_t stream)
DMA Get FIFO Status.
void dma_set_number_of_data(uint32_t dma, uint8_t stream, uint16_t number)
DMA Stream Set the Transfer Block Size.
void dma_set_dma_flow_control(uint32_t dma, uint8_t stream)
DMA Stream Set DMA Flow Control.
void dma_enable_memory_increment_mode(uint32_t dma, uint8_t stream)
DMA Stream Enable Memory Increment after Transfer.
void dma_disable_double_buffer_mode(uint32_t dma, uint8_t stream)
DMA Stream Disable Double Buffer Mode.
void dma_disable_peripheral_increment_mode(uint32_t dma, uint8_t stream)
DMA Channel Disable Peripheral Increment after Transfer.
void dma_set_memory_address(uint32_t dma, uint8_t stream, uint32_t address)
DMA Stream Set the Base Memory Address 0.
void dma_clear_interrupt_flags(uint32_t dma, uint8_t stream, uint32_t interrupts)
DMA Stream Clear Interrupt Flag.
void dma_enable_stream(uint32_t dma, uint8_t stream)
DMA Stream Enable.
void dma_set_peripheral_flow_control(uint32_t dma, uint8_t stream)
DMA Stream Set Peripheral Flow Control.
#define DMA_TCIF
Transfer Complete Interrupt Flag.
#define DMA_TEIF
Transfer Error Interrupt Flag.
#define DMA_DMEIF
Direct Mode Error Interrupt Flag.
#define DMA_FEIF
FIFO Error Interrupt Flag.
#define DMA_HTIF
Half Transfer Interrupt Flag.
#define DMA_SxCR_DIR_MEM_TO_MEM