Defines | Enumerations

hal/nrf24le1/hal_adc.h File Reference

Interface functions for the analog-to-digital converter (ADC). More...

#include <stdint.h>
#include <stdbool.h>

Go to the source code of this file.

Defines

#define ADC_STARTUP_CNT   1;
#define HAL_INP_AIN0   0x00
#define HAL_INP_AIN1   0x01
#define HAL_INP_AIN2   0x02
#define HAL_INP_AIN3   0x03
#define HAL_INP_AIN4   0x04
#define HAL_INP_AIN5   0x05
#define HAL_INP_AIN6   0x06
#define HAL_INP_AIN7   0x07
#define HAL_INP_AIN8   0x08
#define HAL_INP_AIN9   0x09
#define HAL_INP_AIN10   0x0A
#define HAL_INP_AIN11   0x0B
#define HAL_INP_AIN12   0x0C
#define HAL_INP_AIN13   0x0D
#define HAL_INP_VDD1_3   0x0E
#define HAL_INP_VDD2_3   0x0F

Enumerations

enum  hal_adc_input_channel_t {
  HAL_ADC_INP_AIN0 = 0x00, HAL_ADC_INP_AIN1 = 0x01, HAL_ADC_INP_AIN2 = 0x02, HAL_ADC_INP_AIN3 = 0x03,
  HAL_ADC_INP_AIN4 = 0x04, HAL_ADC_INP_AIN5 = 0x05, HAL_ADC_INP_AIN6 = 0x06, HAL_ADC_INP_AIN7 = 0x07,
  HAL_ADC_INP_AIN8 = 0x08, HAL_ADC_INP_AIN9 = 0x09, HAL_ADC_INP_AIN10 = 0x0A, HAL_ADC_INP_AIN11 = 0x0B,
  HAL_ADC_INP_AIN12 = 0x0C, HAL_ADC_INP_AIN13 = 0x0D, HAL_ADC_INP_VDD1_3 = 0x0E, HAL_ADC_INP_VDD2_3 = 0x0F
}
enum  hal_adc_reference_t { HAL_ADC_REF_INT = 0x00, HAL_ADC_REF_VDD = 0x01, HAL_ADC_REF_AIN3 = 0x02, HAL_ADC_REF_AIN9 = 0x03 }
enum  hal_adc_input_mode_t { HAL_ADC_SINGLE = 0x00, HAL_ADC_DIFF_AIN2 = 0x01, HAL_ADC_DIFF_AIN6 = 0x02 }
enum  hal_adc_conversion_mode_t { HAL_ADC_SINGLE_STEP = 0x00, HAL_ADC_CONTINOUS = 0x01 }
enum  hal_adc_sampling_rate_t { HAL_ADC_2KSPS = 0x00, HAL_ADC_4KSPS = 0x01, HAL_ADC_8KSPS = 0x02, HAL_ADC_16KSPS = 0x03 }
enum  hal_adc_power_down_delay_t { HAL_ADC_PDD_0US = 0x00, HAL_ADC_PDD_6US = 0x01, HAL_ADC_PDD_24US = 0x02, HAL_ADC_PDD_INF = 0x03 }
enum  hal_adc_acq_window_t { HAL_ADC_AQW_075US = 0x00, HAL_ADC_AQW_3US = 0x01, HAL_ADC_AQW_12US = 0x02, HAL_ADC_AQW_36US = 0x03 }
enum  hal_adc_resolution_t { HAL_ADC_RES_6BIT = 0x00, HAL_ADC_RES_8BIT = 0x01, HAL_ADC_RES_10BIT = 0x02, HAL_ADC_RES_12BIT = 0x03 }
enum  hal_adc_data_just_t { HAL_ADC_JUST_LEFT = 0x00, HAL_ADC_JUST_RIGHT = 0x01 }
enum  hal_adc_overflow_t { HAL_ADC_FLOW_NONE = 0x00, HAL_ADC_FLOW_OVER = 0x01, HAL_ADC_FLOW_UNDER = 0x02, HAL_ADC_FLOW_BOTH = 0x03 }

Functions

SETUP FUNCTIONS
void hal_adc_set_input_channel (hal_adc_input_channel_t chsel)
void hal_adc_set_reference (hal_adc_reference_t refsel)
void hal_adc_set_input_mode (hal_adc_input_mode_t input_mode)
void hal_adc_set_conversion_mode (hal_adc_conversion_mode_t conv_mode)
void hal_adc_set_sampling_rate (hal_adc_sampling_rate_t rate)
void hal_adc_set_power_down_delay (hal_adc_power_down_delay_t pdd)
void hal_adc_set_acq_window (hal_adc_acq_window_t tacq)
void hal_adc_set_resolution (hal_adc_resolution_t res)
void hal_adc_set_data_just (hal_adc_data_just_t just)
OPERATION FUNCTIONS
void hal_adc_start (void)
uint8_t hal_adc_read_LSB (void)
uint8_t hal_adc_read_MSB (void)
STATUS FUNCTIONS
_Bool hal_adc_busy (void)
hal_adc_overflow_t hal_adc_get_overflow_status (void)

Detailed Description

Interface functions for the analog-to-digital converter (ADC).

Definition in file hal_adc.h.