Microchip® Advanced Software Framework

pdca.h File Reference
#include <avr32/io.h>
#include <stdint.h>
#include <stdbool.h>

Data Structures

struct  pdca_channel_options_t
 PDCA channel options. More...
 

Macros

#define PDCA_TRANSFER_SIZE_BYTE   AVR32_PDCA_BYTE
 Size of PDCA transfer: byte. More...
 
#define PDCA_TRANSFER_SIZE_HALF_WORD   AVR32_PDCA_HALF_WORD
 Size of PDCA transfer: half-word. More...
 
#define PDCA_TRANSFER_SIZE_WORD   AVR32_PDCA_WORD
 Size of PDCA transfer: word. More...
 
PDCA Driver Status Codes
#define PDCA_SUCCESS   0
 
#define PDCA_INVALID_ARGUMENT   -1
 
PDCA Transfer Status Codes
#define PDCA_TRANSFER_ERROR   AVR32_PDCA_TERR_MASK
 
#define PDCA_TRANSFER_COMPLETE   AVR32_PDCA_TRC_MASK
 
#define PDCA_TRANSFER_COUNTER_RELOAD_IS_ZERO   AVR32_PDCA_RCZ_MASK
 

Functions

void pdca_disable (uint8_t pdca_ch_number)
 Disable the PDCA for the given channel. More...
 
void pdca_disable_interrupt_reload_counter_zero (uint8_t pdca_ch_number)
 Disable PDCA transfer interrupt when TCRR reaches zero. More...
 
void pdca_disable_interrupt_transfer_complete (uint8_t pdca_ch_number)
 Disable PDCA transfer interrupt when completed (ie TCR and TCRR are both zero) More...
 
void pdca_disable_interrupt_transfer_error (uint8_t pdca_ch_number)
 Disable PDCA transfer error interrupt. More...
 
void pdca_enable (uint8_t pdca_ch_number)
 Enable the PDCA for the given channel. More...
 
void pdca_enable_interrupt_reload_counter_zero (uint8_t pdca_ch_number)
 Enable PDCA transfer interrupt when TCRR reaches zero. More...
 
void pdca_enable_interrupt_transfer_complete (uint8_t pdca_ch_number)
 Enable PDCA transfer interrupt when completed (ie TCR and TCRR are both zero) More...
 
void pdca_enable_interrupt_transfer_error (uint8_t pdca_ch_number)
 Enable PDCA transfer error interrupt. More...
 
bool pdca_get_channel_status (uint8_t pdca_ch_number)
 Get the PDCA channel transfer enable status. More...
 
volatile avr32_pdca_channel_t * pdca_get_handler (uint8_t pdca_ch_number)
 Get PDCA channel handler. More...
 
uint32_t pdca_get_load_size (uint8_t pdca_ch_number)
 Get PDCA channel load size (or remaining size if transfer started) More...
 
uint32_t pdca_get_reload_size (uint8_t pdca_ch_number)
 Get PDCA channel reload size. More...
 
uint32_t pdca_get_transfer_status (uint8_t pdca_ch_number)
 Get PDCA channel transfer status. More...
 
uint32_t pdca_init_channel (uint8_t pdca_ch_number, const pdca_channel_options_t *opt)
 Set the channel configuration. More...
 
void pdca_load_channel (uint8_t pdca_ch_number, volatile void *addr, uint32_t size)
 Set PDCA channel load values. More...
 
void pdca_reload_channel (uint8_t pdca_ch_number, volatile void *addr, uint32_t size)
 Set PDCA channel reload values. More...
 
void pdca_set_peripheral_select (uint8_t pdca_ch_number, uint32_t pid)
 Set the peripheral function to use with the PDCA channel. More...
 
void pdca_set_transfer_size (uint8_t pdca_ch_number, uint32_t transfer_size)
 Set the size of the transfer. More...