RTEMS  5.0.0
Functions
acc.c File Reference
#include "chip.h"
#include "acc.h"

Functions

void ACC_Configure (Acc *pAcc, uint8_t idAcc, uint8_t ucSelplus, uint8_t ucSelminus, uint16_t wAc_en, uint16_t wEdge, uint16_t wInvert)
 Initialize the ACC controller. More...
 
void ACC_SetComparisonPair (Acc *pAcc, uint8_t ucSelplus, uint8_t ucSelminus)
 
uint32_t ACC_GetComparisonResult (Acc *pAcc, uint32_t dwStatus)
 

Detailed Description

Implementation of Analog Comparator Controller (ACC).

Function Documentation

◆ ACC_Configure()

void ACC_Configure ( Acc pAcc,
uint8_t  idAcc,
uint8_t  ucSelplus,
uint8_t  ucSelminus,
uint16_t  wAc_en,
uint16_t  wEdge,
uint16_t  wInvert 
)

Initialize the ACC controller.

Parameters
pAccPointer to an Acc instance.
idAccACC identifier
ucSelplusinput connected to inp, 0~7
ucSelminusinput connected to inm,0~7
wAc_enAnalog comparator enabled/disabled
wEdgeCF flag triggering mode
wInvertINVert comparator output,use pattern defined in the device header file

◆ ACC_GetComparisonResult()

uint32_t ACC_GetComparisonResult ( Acc pAcc,
uint32_t  dwStatus 
)

Return Comparison Result

Parameters
pAccPointer to an Acc instance.
dwStatusvalue of ACC_ISR

◆ ACC_SetComparisonPair()

void ACC_SetComparisonPair ( Acc pAcc,
uint8_t  ucSelplus,
uint8_t  ucSelminus 
)

Return the Channel Converted Data

Parameters
pAccPointer to an Acc instance.
ucSelplusinput applied on ACC SELPLUS
ucSelminusinput applied on ACC SELMINUS