Kamcho Library 02.00.03
lib.kamcho.02.00.03.287
|
Go to the source code of this file.
Data Structures | |
struct | ADC_SFRS_t |
A structure to represent Special Function Registers for ADC block. More... | |
Functions | |
static __INLINE void | f_ADC_SelectChannel (uint8_t channel) |
Select ADC channel. More... | |
static __INLINE void | f_ADC_ClkDiv (uint8_t div) |
Set ADC clock divider. More... | |
static __INLINE void | f_ADC_SampleCycle (uint8_t cycle) |
Set ADC sample cycle. More... | |
static __INLINE uint8_t | f_ADC_Read (void) |
Read ADC result. More... | |
static __INLINE void | f_ADC_Start (void) |
Start ADC conversion. More... | |
static __INLINE uint8_t | f_ADC_ConversionInProgress () |
Check ADC progress. More... | |
static __INLINE void | f_ADC_ReferenceHigh (uint8_t val) |
Set ADC high reference level. More... | |
static __INLINE void | f_ADC_ReferenceLow (uint8_t val) |
Set ADC low reference level. More... | |
static __INLINE void | f_ADC_ReferenceGain (uint8_t val) |
Set ADC reference gain. More... | |
static __INLINE void | f_ADC_SetRefSourceVDD (void) |
Select VDD as ADC reference source. More... | |
static __INLINE void | f_ADC_SetRefSourceBandGap (void) |
Select band gap as ADC reference source. More... | |
static __INLINE void | f_ADC_EnableStreamingMode (void) |
Enable ADC streaming mode. More... | |
static __INLINE void | f_ADC_DisableStreamingMode (void) |
Disable ADC streaming mode. More... | |
static __INLINE void | f_ADC_EnableCalibrationMode (void) |
Enable ADC calibration mode. More... | |
static __INLINE void | f_ADC_DisableCalibrationMode (void) |
Disable ADC calibration mode. More... | |
static __INLINE void | f_ADC_EnableOffsetCalMode (void) |
Enable ADC offset calibration mode. More... | |
static __INLINE void | f_ADC_EnableDoubleSample (void) |
Enable ADC double sample mode. More... | |
static __INLINE void | f_ADC_DisableDoubleSample (void) |
Disable ADC double sample mode. More... | |
This file is proprietary to Indie Semiconductor. All rights reserved. Reproduction or distribution, in whole or in part, is forbidden except by express written permission of Indie Semiconductor.
#define ADC_SFRS ((__IO ADC_SFRS_t *) (0x50000058)) |
The starting address of ADC block.
#define E_ADC_CHANNEL_GPIOA0 0 |
#define E_ADC_CHANNEL_GPIOA1 1 |
#define E_ADC_CHANNEL_GPIOA2 1 |
#define E_ADC_CHANNEL_GPIOA3 3 |
#define E_ADC_CHANNEL_GPIOA4 4 |
#define E_ADC_CHANNEL_GPIOA5 5 |
#define E_ADC_CHANNEL_GPIOA6 6 |
#define E_ADC_CHANNEL_GPIOA7 7 |
#define E_ADC_CHANNEL_GPIOB0 8 |
#define E_ADC_CHANNEL_GPIOB1 9 |
#define E_ADC_CHANNEL_GPIOB2 10 |
#define E_ADC_CHANNEL_GPIOB3 11 |
#define E_ADC_CHANNEL_GPIOB4 12 |
#define E_ADC_CHANNEL_GPIOB5 13 |
#define E_ADC_CHANNEL_GPIOB6 14 |
#define E_ADC_CHANNEL_GPIOB7 15 |
#define E_ADC_CHANNEL_GPIOC0 16 |
#define E_ADC_CHANNEL_GPIOC1 17 |
#define E_ADC_CHANNEL_GPIOC2 18 |
#define E_ADC_CHANNEL_GPIOC3 19 |
#define E_ADC_CHANNEL_GPIOC4 20 |
#define E_ADC_CHANNEL_GPIOC5 21 |
#define E_ADC_CHANNEL_GPIOC6 22 |
#define E_ADC_CHANNEL_GPIOC7 23 |
#define E_ADC_CHANNEL_GPIOD0 24 |
#define E_ADC_CHANNEL_GPIOD1 25 |
#define E_ADC_CHANNEL_GPIOD2 26 |
#define E_ADC_CHANNEL_GPIOD3 27 |
#define E_ADC_CHANNEL_GPIOD4 28 |
#define E_ADC_CHANNEL_GPIOD5 29 |
#define E_ADC_CHANNEL_GPIOD6 30 |
#define E_ADC_CHANNEL_GPIOD7 31 |
#define E_ADC_CHANNEL_GPIOE0 32 |
#define E_ADC_CHANNEL_GPIOE1 33 |
#define E_ADC_CHANNEL_GPIOE2 34 |
#define E_ADC_CHANNEL_GPIOE3 35 |
#define E_ADC_CHANNEL_GPIOE4 36 |
#define E_ADC_CHANNEL_GPIOE5 37 |
#define E_ADC_CHANNEL_GPIOE6 38 |
#define E_ADC_CHANNEL_GPIOE7 39 |
#define E_ADC_CHANNEL_PTAT 47 |
#define E_ADC_CLK_DIV16 1 |
#define E_ADC_CLK_DIV32 2 |
#define E_ADC_CLK_DIV64 3 |
#define E_ADC_CLK_DIV8 0 |
|
static |
Set ADC clock divider.
div | The enumeration for ADC clock divider. |
|
static |
Check ADC progress.
|
static |
Disable ADC calibration mode.
|
static |
Disable ADC double sample mode.
|
static |
Disable ADC streaming mode.
|
static |
Enable ADC calibration mode.
|
static |
Enable ADC double sample mode.
|
static |
Enable ADC offset calibration mode.
|
static |
Enable ADC streaming mode.
|
static |
Read ADC result.
|
static |
Set ADC reference gain.
val | The setting for reference gain. |
|
static |
Set ADC high reference level.
val | The setting for high reference. |
|
static |
Set ADC low reference level.
val | The setting for low reference. |
|
static |
Set ADC sample cycle.
cycle | The enumeration for sample cycle. |
|
static |
Select ADC channel.
channel | The enumeration of ADC channel. |
|
static |
Select band gap as ADC reference source.
|
static |
Select VDD as ADC reference source.
|
static |
Start ADC conversion.