|
#define | DAC_OK 0 |
|
#define | DAC_ERROR 1 |
|
#define | DAC_ERROR_LOCK 2 |
|
#define | DACC_CHANNEL_0 0 |
|
#define | DACC_CHANNEL_1 1 |
|
#define | DACC_SoftReset(pDACC) ((pDACC)->DACC_CR = DACC_CR_SWRST) |
|
#define | DACC_CfgModeReg(pDACC, mode) { (pDACC)->DACC_MR = (mode); } |
|
#define | DACC_GetModeReg(pDACC) ((pDACC)->DACC_MR) |
|
#define | DACC_CfgTrigger(pDACC, mode) { (pDACC)->DACC_TRIGR = (mode); } |
|
#define | DACC_EnableChannel(pDACC, channel) {(pDACC)->DACC_CHER = (1 << (channel));} |
|
#define | DACC_DisableChannel(pDACC, channel) {(pDACC)->DACC_CHDR = (1 << (channel));} |
|
#define | DACC_EnableIt(pDACC, mode) {(pDACC)->DACC_IER = (mode);} |
|
#define | DACC_DisableIt(pDACC, mode) {(pDACC)->DACC_IDR = (mode);} |
|
#define | DACC_GetStatus(pDACC) ((pDACC)->DACC_ISR) |
|
#define | DACC_GetChannelStatus(pDACC) ((pDACC)->DACC_CHSR) |
|
#define | DACC_GetInterruptMaskStatus(pDACC) ((pDACC)->DACC_IMR) |
|
Purpose
Interface for configuration the Analog-to-Digital Converter (DACC) peripheral.
Usage
- Configurate the pins for DACC
- Initialize the DACC with DACC_Initialize().
- Select the active channel using DACC_EnableChannel()
- Start the conversion with DACC_StartConversion()
- Wait the end of the conversion by polling status with DACC_GetStatus()
- Finally, get the converted data using DACC_GetConvertedData()