39 #include "contiki-conf.h"
40 #include "lib/sensors.h"
44 #include "board-peripherals.h"
52 power_domains_on(
void)
55 ti_lib_prcm_power_domain_on(PRCM_DOMAIN_PERIPH);
58 while((ti_lib_prcm_power_domain_status(PRCM_DOMAIN_PERIPH)
59 != PRCM_DOMAIN_POWER_ON));
63 lpm_wakeup_handler(
void)
69 shutdown_handler(uint8_t mode)
71 if(mode == LPM_MODE_SHUTDOWN) {
73 SENSORS_DEACTIVATE(bmp_280_sensor);
74 SENSORS_DEACTIVATE(opt_3001_sensor);
75 SENSORS_DEACTIVATE(tmp_007_sensor);
76 SENSORS_DEACTIVATE(hdc_1000_sensor);
77 SENSORS_DEACTIVATE(mpu_9250_sensor);
78 ti_lib_gpio_pin_clear(BOARD_MPU_POWER);
92 LPM_MODULE(sensortag_module,
NULL, shutdown_handler, lpm_wakeup_handler,
96 configure_unused_pins(
void)
99 ti_lib_ioc_pin_type_gpio_input(BOARD_IOID_DP0);
100 ti_lib_ioc_io_port_pull_set(BOARD_IOID_DP0, IOC_IOPULL_DOWN);
101 ti_lib_ioc_pin_type_gpio_input(BOARD_IOID_DP1);
102 ti_lib_ioc_io_port_pull_set(BOARD_IOID_DP1, IOC_IOPULL_DOWN);
103 ti_lib_ioc_pin_type_gpio_input(BOARD_IOID_DP2);
104 ti_lib_ioc_io_port_pull_set(BOARD_IOID_DP2, IOC_IOPULL_DOWN);
105 ti_lib_ioc_pin_type_gpio_input(BOARD_IOID_DP3);
106 ti_lib_ioc_io_port_pull_set(BOARD_IOID_DP3, IOC_IOPULL_DOWN);
109 ti_lib_ioc_pin_type_gpio_input(BOARD_IOID_DEVPK_ID);
110 ti_lib_ioc_io_port_pull_set(BOARD_IOID_DEVPK_ID, IOC_IOPULL_UP);
118 ti_lib_ioc_pin_type_gpio_input(BOARD_IOID_AUDIO_DI);
119 ti_lib_ioc_io_port_pull_set(BOARD_IOID_AUDIO_DI, IOC_IOPULL_DOWN);
120 ti_lib_ioc_pin_type_gpio_input(BOARD_IOID_AUDIO_CLK);
121 ti_lib_ioc_io_port_pull_set(BOARD_IOID_AUDIO_CLK, IOC_IOPULL_DOWN);
124 ti_lib_ioc_pin_type_gpio_input(BOARD_IOID_DP5_UARTTX);
125 ti_lib_ioc_io_port_pull_set(BOARD_IOID_DP5_UARTTX, IOC_IOPULL_DOWN);
132 bool int_disabled = ti_lib_int_master_disable();
137 ti_lib_prcm_peripheral_run_enable(PRCM_PERIPH_GPIO);
140 ti_lib_prcm_load_set();
141 while(!ti_lib_prcm_load_get());
154 configure_unused_pins();
158 ti_lib_int_master_enable();
Header file for the Sensortag-CC26xx Buzzer.
Header file with macros which rename TI CC26xxware functions.
void buzzer_init()
Initialise the buzzer.
void board_i2c_shutdown()
Stops the I2C peripheral and restores pins to s/w control.
void lpm_register_module(lpm_registered_module_t *module)
Register a module for LPM notifications.
#define LPM_MODULE(n, m, s, w, l)
Declare a variable to be used in order to get notifications from LPM.
void ext_flash_init()
Initialise the external flash.
#define BOARD_IOID_MIC_POWER
Digital Microphone.
void board_init()
Board specific iniatialisation.
#define NULL
The null pointer.
Header file for the Sensortag-CC26xx I2C Driver.
void board_i2c_wakeup()
Enables the I2C peripheral with defaults.
void buzzer_stop()
Stop the buzzer.