![]() |
LPCOpen Platform
v1.03
LPCOpen Platform for NXP LPC Microcontrollers
|
Data Structures | |
| struct | ADC_Clock_Setup_T |
| Clock setup structure for ADC controller passed to the initialize function. More... | |
Macros | |
| #define | ADC_MAX_SAMPLE_RATE 400000 |
Functions | |
| STATIC INLINE Status | Chip_ADC_Read_Value (LPC_ADC_T *pADC, uint8_t channel, uint16_t *data) |
| Read the ADC value from a channel. | |
| STATIC INLINE FlagStatus | Chip_ADC_Read_Status (LPC_ADC_T *pADC, uint8_t channel, uint32_t StatusType) |
| Read the ADC channel status. | |
| STATIC INLINE void | Chip_ADC_Channel_Int_Cmd (LPC_ADC_T *pADC, uint8_t channel, FunctionalState NewState) |
| Enable/Disable interrupt for ADC channel. | |
| STATIC INLINE void | Chip_ADC_Global_Int_Cmd (LPC_ADC_T *pADC, FunctionalState NewState) |
| Enable/Disable global interrupt for ADC channel. | |
| void | Chip_ADC_DeInit (LPC_ADC_T *pADC) |
| Shutdown ADC. | |
| void | Chip_ADC_Init (LPC_ADC_T *pADC, ADC_Clock_Setup_T *ADCSetup) |
| Initialize the ADC peripheral and the ADC setup structure to default value. | |
| void | Chip_ADC_Set_StartMode (LPC_ADC_T *pADC, CHIP_ADC_START_MODE_T mode, CHIP_ADC_EDGE_CFG_T EdgeOption) |
| Select the mode starting the AD conversion. | |
| void | Chip_ADC_Set_SampleRate (LPC_ADC_T *pADC, ADC_Clock_Setup_T *ADCSetup, uint32_t rate) |
| Set the ADC Sample rate. | |
| void | Chip_ADC_Channel_Enable_Cmd (LPC_ADC_T *pADC, CHIP_ADC_CHANNEL_T channel, FunctionalState NewState) |
| Enable or disable the ADC channel on ADC peripheral. | |
| void | Chip_ADC_Burst_Cmd (LPC_ADC_T *pADC, FunctionalState NewState) |
| Enable burst mode. | |
| Status | Chip_ADC_Read_Byte (LPC_ADC_T *pADC, CHIP_ADC_CHANNEL_T channel, uint8_t *data) |
| Read the ADC value and convert it to 8bits value. | |
| #define ADC_MAX_SAMPLE_RATE 400000 |
Definition at line 46 of file adc_17xx_40xx.h.
| enum CHIP_ADC_CHANNEL_T |
The channels on one ADC peripheral.
Definition at line 52 of file adc_17xx_40xx.h.
| enum CHIP_ADC_EDGE_CFG_T |
Edge configuration, which controls rising or falling edge on the selected signal for the start of a conversion.
Definition at line 66 of file adc_17xx_40xx.h.
Start mode, which controls the start of an A/D conversion when the BURST bit is 0.
Definition at line 74 of file adc_17xx_40xx.h.
| void Chip_ADC_Burst_Cmd | ( | LPC_ADC_T * | pADC, |
| FunctionalState | NewState | ||
| ) |
Enable burst mode.
| pADC | : The base of ADC peripheral on the chip |
| NewState | : New state, should be:
|
Definition at line 138 of file adc_11xx.c.
| void Chip_ADC_Channel_Enable_Cmd | ( | LPC_ADC_T * | pADC, |
| CHIP_ADC_CHANNEL_T | channel, | ||
| FunctionalState | NewState | ||
| ) |
Enable or disable the ADC channel on ADC peripheral.
| pADC | : The base of ADC peripheral on the chip |
| channel | : Channel to be enable or disable |
| NewState | : New state, should be:
|
Definition at line 132 of file adc_11xx.c.
| STATIC INLINE void Chip_ADC_Channel_Int_Cmd | ( | LPC_ADC_T * | pADC, |
| uint8_t | channel, | ||
| FunctionalState | NewState | ||
| ) |
Enable/Disable interrupt for ADC channel.
| pADC | : The base of ADC peripheral on the chip |
| channel | : ADC channel to read |
| NewState | : New state, ENABLE or DISABLE |
Definition at line 124 of file adc_17xx_40xx.h.
| void Chip_ADC_DeInit | ( | LPC_ADC_T * | pADC | ) |
Shutdown ADC.
| pADC | : The base of ADC peripheral on the chip |
Definition at line 77 of file adc_11xx.c.
| STATIC INLINE void Chip_ADC_Global_Int_Cmd | ( | LPC_ADC_T * | pADC, |
| FunctionalState | NewState | ||
| ) |
Enable/Disable global interrupt for ADC channel.
| pADC | : The base of ADC peripheral on the chip |
| NewState | : New state, ENABLE or DISABLE |
Definition at line 135 of file adc_17xx_40xx.h.
| void Chip_ADC_Init | ( | LPC_ADC_T * | pADC, |
| ADC_Clock_Setup_T * | ADCSetup | ||
| ) |
Initialize the ADC peripheral and the ADC setup structure to default value.
| pADC | : The base of ADC peripheral on the chip |
| ADCSetup | : ADC setup structure to be set |
| pADC | : The base of ADC peripheral on the chip |
| ADCSetup | : ADC setup structure to be set |
Definition at line 89 of file adc_11xx.c.
| Status Chip_ADC_Read_Byte | ( | LPC_ADC_T * | pADC, |
| CHIP_ADC_CHANNEL_T | channel, | ||
| uint8_t * | data | ||
| ) |
Read the ADC value and convert it to 8bits value.
| pADC | : The base of ADC peripheral on the chip |
| channel,: | selected channel |
| data | : Storage for data |
Definition at line 145 of file adc_11xx.c.
| STATIC INLINE FlagStatus Chip_ADC_Read_Status | ( | LPC_ADC_T * | pADC, |
| uint8_t | channel, | ||
| uint32_t | StatusType | ||
| ) |
Read the ADC channel status.
| pADC | : The base of ADC peripheral on the chip |
| channel | : ADC channel to read |
| StatusType | : Status type of ADC_DR_* |
Definition at line 112 of file adc_17xx_40xx.h.
Read the ADC value from a channel.
| pADC | : The base of ADC peripheral on the chip |
| channel | : ADC channel to read |
| data | : Pointer to where to put data |
Definition at line 100 of file adc_17xx_40xx.h.
| void Chip_ADC_Set_SampleRate | ( | LPC_ADC_T * | pADC, |
| ADC_Clock_Setup_T * | ADCSetup, | ||
| uint32_t | rate | ||
| ) |
Set the ADC Sample rate.
| pADC | : The base of ADC peripheral on the chip |
| ADCSetup | : ADC setup structure to be modified |
| rate | : Sample rate, should be set so the clock for A/D converter is less than or equal to 4.5MHz. |
Definition at line 115 of file adc_11xx.c.
| void Chip_ADC_Set_StartMode | ( | LPC_ADC_T * | pADC, |
| CHIP_ADC_START_MODE_T | mode, | ||
| CHIP_ADC_EDGE_CFG_T | EdgeOption | ||
| ) |
Select the mode starting the AD conversion.
| pADC | : The base of ADC peripheral on the chip |
| mode | : Stating mode, should be :
|
| EdgeOption | : Stating Edge Condition, should be :
|
Definition at line 106 of file adc_11xx.c.