RTEMS: bsps/arm/atsam/contrib/libraries/libchip/source/acc.c File Reference

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
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.
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

  pAcc | Pointer to an Acc instance.
  idAcc | ACC identifier
  ucSelplus | input connected to inp, 0~7
  ucSelminus | input connected to inm,0~7
  wAc_en | Analog comparator enabled/disabled
  wEdge | CF flag triggering mode
  wInvert | INVert 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

  pAcc | Pointer to an Acc instance.
  dwStatus | value of ACC_ISR

## ◆ ACC_SetComparisonPair()

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

Return the Channel Converted Data

Parameters

  pAcc | Pointer to an Acc instance.
  ucSelplus | input applied on ACC SELPLUS
  ucSelminus | input applied on ACC SELMINUS