Macros | |
#define | AFEC_INTERRUPT_GAP2 (1UL) |
#define | AFEC_SEQ1_CHANNEL_NUM (8UL) |
#define | AFEC_TEMP_INT_SOURCE_NUM (15UL) |
#define | NUM_OF_AFEC (1UL) |
Functions | |
void | AFEC0_Handler (void) |
Interrupt handler for AFEC0. More... | |
void | AFEC1_Handler (void) |
Interrupt handler for AFEC1. More... | |
void | afec_ch_get_config_defaults (struct afec_ch_config *const cfg) |
Get the AFEC channel default configurations. More... | |
void | afec_ch_set_config (Afec *const afec, const enum afec_channel_num channel, struct afec_ch_config *config) |
Configure the AFEC channel. More... | |
void | afec_configure_sequence (Afec *const afec, const enum afec_channel_num ch_list[], uint8_t uc_num) |
Configure conversion sequence. More... | |
void | afec_disable (Afec *const afec) |
Disable AFEC Module. More... | |
void | afec_disable_interrupt (Afec *const afec, enum afec_interrupt_source interrupt_source) |
Disable AFEC interrupts. More... | |
void | afec_enable (Afec *const afec) |
Enable AFEC Module. More... | |
void | afec_enable_interrupt (Afec *const afec, enum afec_interrupt_source interrupt_source) |
Enable AFEC interrupts. More... | |
static uint32_t | afec_find_inst_num (Afec *const afec) |
static uint32_t | afec_find_pid (Afec *const afec) |
void | afec_get_config_defaults (struct afec_config *const cfg) |
Get the AFEC default configurations. More... | |
enum status_code | afec_init (Afec *const afec, struct afec_config *config) |
Initialize the AFEC Module. More... | |
static void | afec_interrupt (uint8_t inst_num, enum afec_interrupt_source source) |
static void | afec_process_callback (Afec *const afec) |
void | afec_set_callback (Afec *const afec, enum afec_interrupt_source source, afec_callback_t callback, uint8_t irq_level) |
Set callback for AFEC. More... | |
void | afec_set_comparison_mode (Afec *const afec, const enum afec_cmp_mode mode, const enum afec_channel_num channel, uint8_t cmp_filter) |
Configure comparison mode. More... | |
static void | afec_set_config (Afec *const afec, struct afec_config *config) |
void | afec_set_power_mode (Afec *const afec, const enum afec_power_mode mode) |
Configure AFEC power mode. More... | |
void | afec_temp_sensor_get_config_defaults (struct afec_temp_sensor_config *const cfg) |
Get the AFEC Temperature Sensor default configurations. More... | |
void | afec_temp_sensor_set_config (Afec *const afec, struct afec_temp_sensor_config *config) |
Configure the AFEC temperature sensor. More... | |
Variables | |
afec_callback_t | afec_callback_pointer [NUM_OF_AFEC][_AFEC_NUM_OF_INTERRUPT_SOURCE] |
See Quickstart guide for SAM AFEC driver.
Driver for the Analog-Front-End Controller. This driver provides access to the main features of the AFEC controller.
void afec_ch_get_config_defaults | ( | struct afec_ch_config *const | cfg | ) |
Get the AFEC channel default configurations.
Use to initialize the configuration structure to known default values.
The default configuration is as follows:
cfg | Pointer to channel configuration structure to be initiated. |
void afec_ch_set_config | ( | Afec *const | afec, |
const enum afec_channel_num | channel, | ||
struct afec_ch_config * | config | ||
) |
void afec_configure_sequence | ( | Afec *const | afec, |
const enum afec_channel_num | ch_list[], | ||
uint8_t | uc_num | ||
) |
void afec_disable | ( | Afec *const | afec | ) |
void afec_disable_interrupt | ( | Afec *const | afec, |
enum afec_interrupt_source | interrupt_source | ||
) |
void afec_enable | ( | Afec *const | afec | ) |
void afec_enable_interrupt | ( | Afec *const | afec, |
enum afec_interrupt_source | interrupt_source | ||
) |
void afec_get_config_defaults | ( | struct afec_config *const | cfg | ) |
Get the AFEC default configurations.
Use to initialize the configuration structure to known default values. This function should be called at the start of any AFEC initiation.
The default configuration is as follows:
cfg | Pointer to configuration structure to be initiated. |
enum status_code afec_init | ( | Afec *const | afec, |
struct afec_config * | config | ||
) |
|
static |
void afec_set_callback | ( | Afec *const | afec, |
enum afec_interrupt_source | source, | ||
afec_callback_t | callback, | ||
uint8_t | irq_level | ||
) |
void afec_set_comparison_mode | ( | Afec *const | afec, |
const enum afec_cmp_mode | mode, | ||
const enum afec_channel_num | channel, | ||
uint8_t | cmp_filter | ||
) |
|
static |
void afec_set_power_mode | ( | Afec *const | afec, |
const enum afec_power_mode | mode | ||
) |
void afec_temp_sensor_get_config_defaults | ( | struct afec_temp_sensor_config *const | cfg | ) |
Get the AFEC Temperature Sensor default configurations.
Use to initialize the configuration structure to known default values.
The default configuration is as follows:
cfg | Pointer to temperature sensor configuration structure to be initiated. |
void afec_temp_sensor_set_config | ( | Afec *const | afec, |
struct afec_temp_sensor_config * | config | ||
) |
afec_callback_t afec_callback_pointer[NUM_OF_AFEC][_AFEC_NUM_OF_INTERRUPT_SOURCE] |