Rename drivers folder to drv

This commit is contained in:
Steins7 2023-09-21 20:41:50 +02:00
parent 086f9155f7
commit a7099d5dfd
29 changed files with 14 additions and 0 deletions

View File

@ -15,6 +15,11 @@
//--type definitions------------------------------------------------------------
/**
* Struct used by the circular buffer system. This system allows bufferized
* reads to a peripheral with no latency, minimal cpu usage and customisable
* buffer sizes
*/
struct DmaCircBuffer {
volatile void* buffer; //the buffer to use as a circular buffer
volatile void* src; //source peripheral register
@ -32,6 +37,15 @@ struct DmaCircBuffer {
//--functions-------------------------------------------------------------------
/**
* Configure a DMA circular buffer for a single DMA channel. A standard buffer
* is used a base to construct a circular buffer, supplied in data by DMA
* tranfers from a peripheral. The DMA's priority is given as parameters.
* The peripheral's specific configuration must be handled separately.
*
* Once this function is called, the system will start running right away and
* will stay running until manually stopped
*/
void dma_cbuf_configure(volatile struct DmaCircBuffer* buffer,
volatile void* raw_buffer, volatile void* src, uint16_t buffer_size,
enum DmaPeriph dma, enum DmaChannel channel, enum DmaConfig priority);