![]() |
LPCOpen Platform
v1.03
LPCOpen Platform for NXP LPC Microcontrollers
|
#include "sys_config.h"#include "cmsis.h"Go to the source code of this file.
Data Structures | |
| struct | IP_ADC_001_T |
| 10 or 12-bit ADC register block structure More... | |
Macros | |
| #define | ADC_ACC_10BITS |
| #define | ADC_DR_RESULT(n) ((((n) >> 6) & 0x3FF)) |
| ADC register support bitfields and mask. | |
| #define | ADC_CR_BITACC(n) ((((n) & 0x7) << 17)) |
| #define | ADC_DR_DONE(n) (((n) >> 31)) |
| #define | ADC_DR_OVERRUN(n) ((((n) >> 30) & (1UL))) |
| #define | ADC_CR_CH_SEL(n) ((1UL << (n))) |
| #define | ADC_CR_CLKDIV(n) ((((n) & 0xFF) << 8)) |
| #define | ADC_CR_BURST ((1UL << 16)) |
| #define | ADC_CR_PDN ((1UL << 21)) |
| #define | ADC_CR_START_MASK ((7UL << 24)) |
| #define | ADC_CR_START_MODE_SEL(SEL) ((SEL << 24)) |
| #define | ADC_CR_START_NOW ((1UL << 24)) |
| #define | ADC_CR_START_CTOUT15 ((2UL << 24)) |
| #define | ADC_CR_START_CTOUT8 ((3UL << 24)) |
| #define | ADC_CR_START_ADCTRIG0 ((4UL << 24)) |
| #define | ADC_CR_START_ADCTRIG1 ((5UL << 24)) |
| #define | ADC_CR_START_MCOA2 ((6UL << 24)) |
| #define | ADC_CR_EDGE ((1UL << 27)) |
| #define | ADC_CONFIG_MASK (ADC_CR_CLKDIV(0xFF) | ADC_CR_BITACC(0x07) | ADC_CR_PDN) |
Enumerations | |
| enum | IP_ADC_STATUS_T { ADC_DR_DONE_STAT, ADC_DR_OVERRUN_STAT, ADC_DR_ADINT_STAT } |
| ADC status register used for IP drivers. More... | |
Functions | |
| void | IP_ADC_Init (IP_ADC_001_T *pADC, uint8_t div, uint8_t bitsAcc, uint32_t flag) |
| Initialize for ADC. | |
| void | IP_ADC_DeInit (IP_ADC_001_T *pADC) |
| Shutdown ADC. | |
| void | IP_ADC_SetBurstMode (IP_ADC_001_T *pADC, FunctionalState NewState) |
| Set burst mode for ADC. | |
| Status | IP_ADC_Get_Val (IP_ADC_001_T *pADC, uint8_t channel, uint16_t *data) |
| Get the ADC value. | |
| FlagStatus | IP_ADC_GetStatus (IP_ADC_001_T *pADC, uint8_t channel, uint32_t StatusType) |
| Get ADC Channel status from ADC data register. | |
| void | IP_ADC_EdgeStartConfig (IP_ADC_001_T *pADC, uint8_t edge_mode) |
| Set the edge start condition. | |
| void | IP_ADC_SetChannelNumber (IP_ADC_001_T *pADC, uint8_t channel, FunctionalState NewState) |
| Enable/Disable ADC channel number. | |
| void | IP_ADC_SetStartMode (IP_ADC_001_T *pADC, uint8_t start_mode) |
| Set start mode for ADC. | |
| void | IP_ADC_Int_Enable (IP_ADC_001_T *pADC, uint8_t channel, FunctionalState NewState) |
| Enable/Disable interrupt for ADC channel. | |