40 #include "lib/sensors.h"
43 #include "dev/adc-sensor.h"
51 .clocks = AUX_WUC_ADI_CLOCK | AUX_WUC_ANAIF_CLOCK | AUX_WUC_SMPH_CLOCK
55 config(
int type,
int enable)
59 ti_lib_ioc_pin_type_gpio_output(BOARD_IOID_ALS_PWR);
62 ti_lib_ioc_pin_type_gpio_output(BOARD_IOID_ALS_PWR);
63 ti_lib_ioc_port_configure_set(BOARD_IOID_ALS_OUT, IOC_PORT_GPIO,
65 ti_lib_gpio_dir_mode_set(BOARD_ALS_OUT, GPIO_DIR_MODE_IN);
68 ti_lib_gpio_pin_write(BOARD_ALS_PWR, 1);
70 ti_lib_aux_adc_select_input(ADC_COMPB_IN_AUXIO7);
73 ti_lib_gpio_pin_write(BOARD_ALS_PWR, 0);
88 ti_lib_aux_adc_enable_sync(AUXADC_REF_VDDS_REL, AUXADC_SAMPLE_TIME_2P7_US,
89 AUXADC_TRIGGER_MANUAL);
90 ti_lib_aux_adc_gen_manual_trigger();
91 val = ti_lib_aux_adc_read_fifo();
92 ti_lib_aux_adc_disable();
103 SENSORS_SENSOR(als_sensor, ALS_SENSOR, value, config, status);
void aux_ctrl_register_consumer(aux_consumer_module_t *consumer)
Register a module that no longer requires access to the AUX power domain.
Header file with macros which rename TI CC26xxware functions.
Header file for the management of the CC13xx/CC26xx AUX domain.
Timer library header file.
The data structure to be used for modules that require access to AUX.
void aux_ctrl_unregister_consumer(aux_consumer_module_t *consumer)
Deregister a module that no longer requires access to the AUX power domain.
void clock_delay_usec(uint16_t dt)
Delay a given number of microseconds.
Header file for the SmartRF06EB + CC13xx/CC26xxEM ALS Driver.