40 #include "lib/sensors.h" 41 #include "srf06/als-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_ioc_pin_type_gpio_input(BOARD_IOID_ALS_OUT);
68 ti_lib_gpio_set_dio(BOARD_IOID_ALS_PWR);
70 ti_lib_aux_adc_select_input(ADC_COMPB_IN_AUXIO7);
73 ti_lib_gpio_clear_dio(BOARD_IOID_ALS_PWR);
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();
void aux_ctrl_unregister_consumer(aux_consumer_module_t *consumer)
Deregister a module that no longer requires access to the AUX power domain.
Header file with macros which rename TI CC26xxware functions.
void clock_delay_usec(uint16_t dt)
Delay a given number of microseconds.
Timer library header file.
Header file for the CC13xx/CC26xx ADC driver.
Header file for the management of the CC13xx/CC26xx AUX domain.
void aux_ctrl_register_consumer(aux_consumer_module_t *consumer)
Register a module that no longer requires access to the AUX power domain.
The data structure to be used for modules that require access to AUX.
const struct sensors_sensor als_sensor
Exports a global symbol to be used by the sensor API.