Microchip® Advanced Software Framework

acc.h File Reference

SAM Analog Comparator Controller (ACC) driver.

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

#include <compiler.h>

Macros

Hysteresis Levels

Refer to the "Analog Comparator Characteristics" table in the "Electrical Characteristics" chapter of the device-specific datasheet.

#define ACC_ACR_HYST_0mv_max   0x00
 
#define ACC_ACR_HYST_50mv_max   0x01
 
#define ACC_ACR_HYST_90mv_max   0x11
 

Functions

void acc_disable (Acc *p_acc)
 Disable the ACC module. More...
 
void acc_disable_interrupt (Acc *p_acc)
 Disable the ACC comparison edge interrupt. More...
 
void acc_enable (Acc *p_acc)
 Enable the ACC module. More...
 
void acc_enable_interrupt (Acc *p_acc)
 Enable the ACC comparison edge interrupt. More...
 
uint32_t acc_get_comparison_result (Acc *p_acc)
 Get the ACC comparison result. More...
 
uint32_t acc_get_interrupt_status (Acc *p_acc)
 Get the ACC comparison edge interrupt status. More...
 
uint32_t acc_get_writeprotect_status (Acc *p_acc)
 Get the ACC register write-protection status. More...
 
void acc_init (Acc *p_acc, uint32_t ul_select_plus, uint32_t ul_select_minus, uint32_t ul_edge_type, uint32_t ul_invert)
 Initialize the ACC module. More...
 
void acc_reset (Acc *p_acc)
 Software reset the ACC module. More...
 
void acc_set_input (Acc *p_acc, uint32_t ul_select_minus, uint32_t ul_select_plus)
 Set the ACC comparator plus/minus input sources. More...
 
void acc_set_output (Acc *p_acc, uint32_t ul_invert, uint32_t ul_fault_enable, uint32_t ul_fault_source)
 Set the ACC output. More...
 
void acc_set_writeprotect (Acc *p_acc, uint32_t ul_enable)
 Set the ACC register write-protection. More...