DMA_VLEN_LEN=(0<<5),/*!<Use LEN for transfer count*/
DMA_VLEN_N1=(1<<5),/*!<Transfer the number of bytes/words specified by first byte/word + 1 (up to a maximum specified by LEN). Thus transfer count excludes length byte/word.*/
DMA_VLEN_N=(2<<5),/*!<Transfer the number of bytes/words specified by first byte/word (up to a maximum specified by LEN). Thus transfer count includes length byte/word.*/
DMA_VLEN_N2=(3<<5),/*!<Transfer the number of bytes/words specified by first byte/word + 2 (up to a maximum specified by LEN).*/
DMA_VLEN_N3=(4<<5),/*!<Transfer the number of bytes/words specified by first byte/word + 3 (up to a maximum specified by LEN).*/
DMA_VLEN_RES1=(5<<5),/*!<reserved*/
DMA_VLEN_RES2=(6<<5),/*!<reserved*/
DMA_VLEN_LEN2=(7<<5)/*!<Use LEN for transfer count*/
}dma_vlen_t;
/** address increment modes */
typedefenumdma_inc_t
{
DMA_NOINC=0,/*!<No increment*/
DMA_INC=1,/*!<Increment*/
DMA_INC2=2,/*!<Increment 2*/
DMA_DEC=3/*!<Decrement*/
}dma_inc_t;
/** transfer types */
typedefenumdma_type_t
{
DMA_SINGLE=0,/*!<Single*/
DMA_BLOCK=1,/*!<Block*/
DMA_RPT=2,/*!<Repeated single*/
DMA_BLOCK_RPT=3/*!<Repeated block*/
}dma_type_t;
/** DMA configuration structure */
typedefstructdma_config_t
{
uint8_tsrc_h;/*!<source address high byte*/
uint8_tsrc_l;/*!<source address low byte*/
uint8_tdst_h;/*!<dest. address high byte*/
uint8_tdst_l;/*!<dest. address low byte*/
uint8_tlen_h;/*!<transfer mode in high 3 bits, length high byte, 4 lowest bits*/