|
STC15W408AS library 0.18.0
|

Go to the source code of this file.
Macros | |
| #define | ADC_START_BIT_POS 3 |
| ADC CONTR register ADC_START bit position. | |
| #define | ADC_START_BIT_MASK bit_mask(ADC_START_BIT_POS) |
| ADC_START bit mask. | |
| #define | ADC_START_BIT (ADC_START_BIT_MASK) |
| #define | ADC_FLAG_BIT_POS 4 |
| ADC CONTR register ADC_FLAG bit position. | |
| #define | ADC_FLAG_BIT_MASK bit_mask(ADC_FLAG_BIT_POS) |
| ADC CONTR bit mask. | |
| #define | ADC_FLAG_BIT (ADC_FLAG_BIT_MASK) |
| ADC_FLAG declaration. | |
| #define | ADRJ_BIT_POS 5 |
| CLKDIV register ADRJ bit position. | |
| #define | ADRJ_BIT_MASK bit_mask(ADRJ_BIT_POS) |
| ADRJ_BIT bit mask. | |
| #define | ADRJ_BIT (ADRJ_BIT_MASK) |
| ADRJ declaration. | |
| #define | ADC_POWER_ON_MASK 0x80 |
| #define | ADC_LOW_BITS_COUNT 2 |
| ADC result shift offset. | |
| #define | ADC_LOW_BITS_MASK 0x03 |
| ADC result low bits mask. | |
init | |
ADC initialization and destroy routines | |
| #define | adc_init_input_only(p1_pin, adrj_flag, speed) |
| ADC initialization in pin input only mode. | |
| #define | adc_init_open_drain(p1_pin, adrj_flag, speed) |
| ADC initialization in pin open drain mode. | |
| #define | adc_destroy(void) |
| Deinitialize ADC module. | |
sync | |
ADC sync routines | |
| #define | adc_read_sync(value) |
| ADC read routine. | |
async | |
ADC async routines | |
| #define | adc_async_read_start() |
| Start async ADC read operation if not started. | |
| #define | is_adc_async_read_started() (test_if_bit_set(ADC_CONTR, ADC_START_BIT) && (ADC_CONTR & ADC_POWER_ON_MASK)) |
| get ADC start and power flags | |
| #define | adc_async_read_finish() (bit_clr(ADC_CONTR, ADC_FLAG_BIT)) |
| Clear ADC result ready flag. | |
| #define | adc_async_get_result() (test_if_bit_set(CLK_DIV, ADRJ_BIT) ? (ADC_RESL << ADC_LOW_BITS_COUNT) | (ADC_RES & ADC_LOW_BITS_MASK) : (ADC_RES << ADC_LOW_BITS_COUNT) | (ADC_RESL & ADC_LOW_BITS_MASK)) |
| Async get ADC result. | |
Enumerations | |
| enum | adc_speed_t { ADC_SPEED_540 = 0b00000000 , ADC_SPEED_360 = 0b00100000 , ADC_SPEED_180 = 0b01000000 , ADC_SPEED_90 = 0b01100000 } |
| ADC speed enum. More... | |
| #define ADC_POWER_ON_MASK 0x80 |
ADC CONTR register ADC_POWER_ON bit mask
| #define ADC_START_BIT (ADC_START_BIT_MASK) |
brief ADC_START_BIT declaration