PDCA driver for SAM4L.
This file defines a useful set of functions for the PDCA interface on SAM4L devices.
Copyright (c) 2012-2018 Microchip Technology Inc. and its subsidiaries.
#include "compiler.h"
Data Structures | |
struct | pdca_channel_config_t |
PDCA channel options. More... | |
Macros | |
#define | PDCA_NUMBER_OF_CHANNELS PDCA_CHANNEL_LENGTH |
Number of available PDCA channels, device dependent. More... | |
Typedefs | |
typedef void(* | pdca_callback_t )(enum pdca_channel_status status) |
typedef uint32_t | pdca_channel_interrupt_mask_t |
PDCA channel interrupt mask type. More... | |
typedef uint8_t | pdca_channel_num_t |
PDCA channel number type. More... | |
Enumerations | |
enum | pdca_channel_status { PDCA_CH_FREE = 0, PDCA_CH_BUSY, PDCA_CH_COUNTER_RELOAD_IS_ZERO, PDCA_CH_TRANSFER_COMPLETED, PDCA_CH_TRANSFER_ERROR } |
brief PDCA channel status More... | |
Functions | |
void | pdca_channel_clear_error (pdca_channel_num_t pdca_ch_number) |
Clear transfer error for the given channel. More... | |
void | pdca_channel_disable (pdca_channel_num_t pdca_ch_number) |
Disable the PDCA for the given channel. More... | |
void | pdca_channel_disable_interrupt (pdca_channel_num_t pdca_ch_number, const pdca_channel_interrupt_mask_t pdca_channel_interrupt_mask) |
Disable PDCA interrupt. More... | |
void | pdca_channel_enable (pdca_channel_num_t pdca_ch_number) |
Enable the PDCA for the given channel. More... | |
void | pdca_channel_enable_interrupt (pdca_channel_num_t pdca_ch_number, const pdca_channel_interrupt_mask_t pdca_channel_interrupt_mask) |
Enable PDCA transfer error interrupt. More... | |
volatile PdcaChannel * | pdca_channel_get_handler (pdca_channel_num_t pdca_ch_number) |
Get PDCA channel handler. More... | |
pdca_channel_interrupt_mask_t | pdca_channel_get_interrupt_mask (pdca_channel_num_t pdca_ch_number) |
Get PDCA interrupt mask. More... | |
bool | pdca_channel_is_enabled (pdca_channel_num_t pdca_ch_number) |
Check if PDCA channel is enabled. More... | |
uint32_t | pdca_channel_read_load_size (pdca_channel_num_t pdca_ch_number) |
Read PDCA channel load values from hardware. More... | |
uint32_t | pdca_channel_read_reload_size (pdca_channel_num_t pdca_ch_number) |
Read PDCA channel reload values from hardware. More... | |
void | pdca_channel_set_callback (pdca_channel_num_t pdca_ch_number, pdca_callback_t callback, uint8_t irq_line, uint8_t irq_level, const pdca_channel_interrupt_mask_t pdca_channel_interrupt_mask) |
Set callback for given PDCA channel. More... | |
void | pdca_channel_set_config (pdca_channel_num_t pdca_ch_number, const pdca_channel_config_t *cfg) |
Write PDCA channel configuration to hardware. More... | |
void | pdca_channel_write_load (pdca_channel_num_t pdca_ch_number, volatile void *addr, uint32_t size) |
Write PDCA channel load values to hardware. More... | |
void | pdca_channel_write_reload (pdca_channel_num_t pdca_ch_number, volatile void *addr, uint32_t size) |
Write PDCA channel reload values to hardware. More... | |
void | pdca_disable (Pdca *pdca) |
Disable the PDCA module. More... | |
void | pdca_enable (Pdca *pdca) |
Disable the PDCA module. More... | |
enum pdca_channel_status | pdca_get_channel_status (pdca_channel_num_t pdca_ch_number) |
Get the PDCA channel transfer enable status. More... | |
#define PDCA_NUMBER_OF_CHANNELS PDCA_CHANNEL_LENGTH |
Number of available PDCA channels, device dependent.
Referenced by pdca_channel_get_handler().
typedef void(* pdca_callback_t)(enum pdca_channel_status status) |
typedef uint32_t pdca_channel_interrupt_mask_t |
PDCA channel interrupt mask type.
typedef uint8_t pdca_channel_num_t |
PDCA channel number type.
enum pdca_channel_status |
brief PDCA channel status