Microchip® Advanced Software Framework

acifc.c File Reference

Analog Comparator interface driver for SAM4L.

Copyright (c) 2013-2018 Microchip Technology Inc. and its subsidiaries.

#include <sysclk.h>
#include <sleepmgr.h>
#include "acifc.h"

Functions

static void _ac_set_config (struct ac_dev_inst *const dev_inst, struct ac_config *const cfg)
 
void ac_ch_set_config (struct ac_dev_inst *const dev_inst, uint32_t channel, struct ac_ch_config *cfg)
 Configure the specified ACIFC channel. More...
 
void ac_disable (struct ac_dev_inst *const dev_inst)
 Disable the ACIFC Module. More...
 
void ac_disable_interrupt (struct ac_dev_inst *const dev_inst, ac_interrupt_source_t source)
 Disable the specified ACIFC interrupt source. More...
 
void ac_enable (struct ac_dev_inst *const dev_inst)
 Enable the ACIFC module. More...
 
void ac_enable_interrupt (struct ac_dev_inst *const dev_inst, ac_interrupt_source_t source)
 Enable the specified ACIFC interrupt source. More...
 
enum status_code ac_init (struct ac_dev_inst *const dev_inst, Acifc *const ac, struct ac_config *const cfg)
 Initialize the ACIFC module. More...
 
static void ac_interrupt_handler (void)
 
void ac_set_callback (struct ac_dev_inst *const dev_inst, ac_interrupt_source_t source, ac_callback_t callback, uint8_t irq_level)
 Set the ACIFC interrupt callback. More...
 
void ac_win_set_config (struct ac_dev_inst *const dev_inst, uint32_t window, struct ac_win_config *cfg)
 Configure the specified ACIFC window. More...
 
void ACIFC_Handler (void)
 

Variables

struct ac_dev_inst_ac_instance
 
ac_callback_t ac_callback_pointer [AC_INTERRUPT_NUM]
 

static void _ac_set_config ( struct ac_dev_inst *const  dev_inst,
struct ac_config *const  cfg 
)
inlinestatic

Configure the ACIFC module.

Parameters
[in]dev_instDriver structure pointer
[in]cfgModule configuration structure pointer

References Assert, ac_config::event_trigger, and ac_dev_inst::hw_dev.

Referenced by ac_init().

static void ac_interrupt_handler ( void  )
static

ACIFC interrupt handler.

References ac_get_interrupt_mask(), ac_get_interrupt_status(), and AC_INTERRUPT_WINDOW_0.

Referenced by ACIFC_Handler().

void ACIFC_Handler ( void  )

Interrupt handler for ACIFC interrupt.

References ac_interrupt_handler().

struct ac_dev_inst* _ac_instance
ac_callback_t ac_callback_pointer[AC_INTERRUPT_NUM]