LPCOpen Platform for LPC18XX/43XX microcontrollers  18XX43XX
LPCOpen Platform for the NXP LPC18XX/43XX family of Microcontrollers
Functions
adc_18xx_43xx.c File Reference
#include "chip.h"

Go to the source code of this file.

Functions

STATIC INLINE uint8_t getFullConvClk (void)
 
STATIC CHIP_CCU_CLK_T Chip_ADC_GetClockIndex (LPC_ADC_T *pADC)
 
STATIC uint8_t getClkDiv (LPC_ADC_T *pADC, bool burstMode, uint32_t adcRate, uint8_t clks)
 
void setStartMode (LPC_ADC_T *pADC, uint8_t start_mode)
 
Status readAdcVal (LPC_ADC_T *pADC, uint8_t channel, uint16_t *data)
 
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. More...
 
void Chip_ADC_DeInit (LPC_ADC_T *pADC)
 Shutdown ADC. More...
 
Status Chip_ADC_ReadValue (LPC_ADC_T *pADC, uint8_t channel, uint16_t *data)
 Read the ADC value from a channel. More...
 
FlagStatus Chip_ADC_ReadStatus (LPC_ADC_T *pADC, uint8_t channel, uint32_t StatusType)
 Read the ADC channel status. More...
 
void Chip_ADC_Int_SetChannelCmd (LPC_ADC_T *pADC, uint8_t channel, FunctionalState NewState)
 Enable/Disable interrupt for ADC channel. More...
 
void Chip_ADC_SetStartMode (LPC_ADC_T *pADC, ADC_START_MODE_T mode, ADC_EDGE_CFG_T EdgeOption)
 Select the mode starting the AD conversion. More...
 
void Chip_ADC_SetSampleRate (LPC_ADC_T *pADC, ADC_CLOCK_SETUP_T *ADCSetup, uint32_t rate)
 Set the ADC Sample rate. More...
 
void Chip_ADC_SetResolution (LPC_ADC_T *pADC, ADC_CLOCK_SETUP_T *ADCSetup, ADC_RESOLUTION_T resolution)
 Set the ADC accuracy bits. More...
 
void Chip_ADC_EnableChannel (LPC_ADC_T *pADC, ADC_CHANNEL_T channel, FunctionalState NewState)
 Enable or disable the ADC channel on ADC peripheral. More...
 
void Chip_ADC_SetBurstCmd (LPC_ADC_T *pADC, FunctionalState NewState)
 Enable burst mode. More...
 
Status Chip_ADC_ReadByte (LPC_ADC_T *pADC, ADC_CHANNEL_T channel, uint8_t *data)
 Read the ADC value and convert it to 8bits value. More...
 

Function Documentation

STATIC CHIP_CCU_CLK_T Chip_ADC_GetClockIndex ( LPC_ADC_T pADC)

Definition at line 53 of file adc_18xx_43xx.c.

STATIC uint8_t getClkDiv ( LPC_ADC_T pADC,
bool  burstMode,
uint32_t  adcRate,
uint8_t  clks 
)

Definition at line 68 of file adc_18xx_43xx.c.

STATIC INLINE uint8_t getFullConvClk ( void  )

Definition at line 47 of file adc_18xx_43xx.c.

Status readAdcVal ( LPC_ADC_T pADC,
uint8_t  channel,
uint16_t *  data 
)

Definition at line 102 of file adc_18xx_43xx.c.

void setStartMode ( LPC_ADC_T pADC,
uint8_t  start_mode 
)

Definition at line 94 of file adc_18xx_43xx.c.