LPCOpen Platform  v1.03
LPCOpen Platform for NXP LPC Microcontrollers
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
adc_13xx.h File Reference

Go to the source code of this file.

Data Structures

struct  ADC_Clock_Setup_T
 Clock setup structure for ADC controller passed to the initialize function. More...
 

Enumerations

enum  CHIP_ADC_CHANNEL_T {
  ADC_CH0 = 0, ADC_CH1, ADC_CH2, ADC_CH3,
  ADC_CH4, ADC_CH5, ADC_CH6, ADC_CH7,
  ADC_CH0 = 0, ADC_CH1, ADC_CH2, ADC_CH3,
  ADC_CH4, ADC_CH5, ADC_CH6, ADC_CH7,
  ADC_CH0 = 0, ADC_CH1, ADC_CH2, ADC_CH3,
  ADC_CH4, ADC_CH5, ADC_CH6, ADC_CH7,
  ADC_CH0 = 0, ADC_CH1, ADC_CH2, ADC_CH3,
  ADC_CH4, ADC_CH5, ADC_CH6, ADC_CH7
}
 
enum  CHIP_ADC_RESOLUTION_T {
  ADC_10BITS = 0, ADC_9BITS, ADC_8BITS, ADC_7BITS,
  ADC_6BITS, ADC_5BITS, ADC_4BITS, ADC_3BITS,
  ADC_12BITS = 0, ADC_10BITS = 1, ADC_10BITS = 0, ADC_9BITS,
  ADC_8BITS, ADC_7BITS, ADC_6BITS, ADC_5BITS,
  ADC_4BITS, ADC_3BITS
}
 
enum  CHIP_ADC_EDGE_CFG_T {
  ADC_TRIGGERMODE_RISING = 0, ADC_TRIGGERMODE_FALLING, ADC_TRIGGERMODE_RISING = 0, ADC_TRIGGERMODE_FALLING,
  ADC_TRIGGERMODE_RISING = 0, ADC_TRIGGERMODE_FALLING, ADC_TRIGGERMODE_RISING = 0, ADC_TRIGGERMODE_FALLING
}
 
enum  CHIP_ADC_START_MODE_T {
  ADC_NO_START = 0, ADC_START_NOW, ADC_START_ON_CTOUT15, ADC_START_ON_CTOUT8,
  ADC_START_ON_ADCTRIG0, ADC_START_ON_ADCTRIG1, ADC_START_ON_MCOA2, ADC_NO_START = 0,
  ADC_START_NOW, ADC_START_ON_CTOUT15, ADC_START_ON_CTOUT8, ADC_START_ON_ADCTRIG0,
  ADC_START_ON_ADCTRIG1, ADC_START_ON_MCOA2, ADC_NO_START = 0, ADC_START_NOW,
  ADC_START_ON_CTOUT15, ADC_START_ON_CTOUT8, ADC_START_ON_ADCTRIG0, ADC_START_ON_ADCTRIG1,
  ADC_START_ON_MCOA2, ADC_NO_START = 0, ADC_START_NOW, ADC_START_ON_CTOUT15,
  ADC_START_ON_CTOUT8, ADC_START_ON_ADCTRIG0, ADC_START_ON_ADCTRIG1, ADC_START_ON_MCOA2
}
 

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_Set_Resolution (LPC_ADC_T *pADC, ADC_Clock_Setup_T *ADCSetup, CHIP_ADC_RESOLUTION_T resolution)
 Set the ADC accuracy bits.
 
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.