Microchip® Advanced Software Framework

acc.c File Reference

SAM4 Analog Comparator Controller (ACC) driver.

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

#include "acc.h"

Macros

#define ACC_WPMR_WPKEY_PASSWD   ACC_WPMR_WPKEY((uint32_t) 0x414343)
 

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...
 

#define ACC_WPMR_WPKEY_PASSWD   ACC_WPMR_WPKEY((uint32_t) 0x414343)

Referenced by acc_set_writeprotect().