RTEMS 6.3
Loading...
Searching...
No Matches
adc-defs.h File Reference

ADC library for the lpc176x bsp. More...

#include <bsp.h>
#include <bsp/io.h>
#include <bsp/lpc176x.h>
#include <bsp/adc.h>

Go to the source code of this file.

Data Structures

struct  lpc176x_adc_device
 The ADC low-level device. More...
struct  lpc176x_adc_pin_map
 Represents the pin and function for each ADC input. More...

Macros

#define MAX_ADC_CLK   13000000u
#define ADC_RANGE   0xFFFu
#define ADC_NUMBER_VALID(number)
#define ADC_CR_SEL(val)
#define ADC_CR_SEL_GET(val)
#define ADC_CR_SEL_SET(reg, val)
#define ADC_CR_CLKDIV(val)
#define ADC_CR_CLKDIV_GET(reg)
#define ADC_CR_CLKDIV_SET(reg, val)
#define ADC_CR_BURST   BSP_BIT32( 16 )
#define ADC_CR_CLKS(val)
#define ADC_CR_PDN   BSP_BIT32( 21 )
#define ADC_CR_START_NOW   BSP_BIT32( 24 )
#define ADC_CR_START(val)
#define ADC_CR_EDGE   BSP_BIT32( 27 )
#define ADC_DR_VALUE(reg)
#define ADC_DR_OVERRUN   BSP_BIT32( 30 )
#define ADC_DR_DONE   BSP_BIT32( 31 )
#define ADC_DATA_CONVERSION_DONE(val)

Enumerations

enum  lpc176x_adc_number {
  ADC_0 , ADC_1 , ADC_2 , ADC_3 ,
  ADC_4 , ADC_5 , ADC_6 , ADC_7 ,
  ADC_DEVICES_COUNT
}
 The ADC inputs of the board.

Detailed Description

ADC library for the lpc176x bsp.

Macro Definition Documentation

◆ ADC_CR_CLKDIV

#define ADC_CR_CLKDIV ( val)
Value:
BSP_FLD32( val, 8, 15 )

◆ ADC_CR_CLKDIV_GET

#define ADC_CR_CLKDIV_GET ( reg)
Value:
BSP_FLD32GET( reg, 8, 15 )

◆ ADC_CR_CLKDIV_SET

#define ADC_CR_CLKDIV_SET ( reg,
val )
Value:
BSP_FLD32SET( reg, val, 8, 15 )

◆ ADC_CR_CLKS

#define ADC_CR_CLKS ( val)
Value:
BSP_FLD32( val, 17, 19 )

◆ ADC_CR_SEL

#define ADC_CR_SEL ( val)
Value:
BSP_FLD32( val, 0, 7 )

◆ ADC_CR_SEL_GET

#define ADC_CR_SEL_GET ( val)
Value:
BSP_FLD32GET( val, 0, 7 )

◆ ADC_CR_SEL_SET

#define ADC_CR_SEL_SET ( reg,
val )
Value:
BSP_FLD32SET( reg, val, 0, 7 )

◆ ADC_CR_START

#define ADC_CR_START ( val)
Value:
BSP_FLD32( val, 24, 26 )

◆ ADC_DATA_CONVERSION_DONE

#define ADC_DATA_CONVERSION_DONE ( val)
Value:
( ( val & ADC_DR_DONE ) != 0u )

◆ ADC_DR_VALUE

#define ADC_DR_VALUE ( reg)
Value:
BSP_FLD32GET( reg, 4, 15 )

◆ ADC_NUMBER_VALID

#define ADC_NUMBER_VALID ( number)
Value:
( ( (uint32_t) number ) < \
ADC_DEVICES_COUNT )