49#include "contiki-net.h"
67#include "lib/random.h"
68#include "lib/sensors.h"
69#include "button-sensor.h"
73#include "board-peripherals.h"
75#include "driverlib/driverlib_release.h"
81#define LOG_MODULE "CC26x0/CC13x0"
82#define LOG_LEVEL LOG_LEVEL_MAIN
87#ifdef BOARD_CONF_HAS_SENSORS
88#define BOARD_HAS_SENSORS BOARD_CONF_HAS_SENSORS
90#define BOARD_HAS_SENSORS 1
98 for(k = 0; k < 800; ++k) {
99 j = k > 400 ? 800 - k : k;
102 for(i = 0; i < j; ++i) {
106 for(i = 0; i < 400 - j; ++i) {
124 short_addr = ext_addr[7];
125 short_addr |= ext_addr[6] << 8;
138 ti_lib_vims_mode_set(VIMS_BASE, VIMS_MODE_ENABLED);
139 ti_lib_vims_configure(VIMS_BASE,
true,
true);
141 ti_lib_int_master_disable();
161 ti_lib_aon_ioc_freeze_disable();
162 HWREG(AON_SYSCTL_BASE + AON_SYSCTL_O_SLEEPCTL) = 1;
163 ti_lib_sys_ctrl_aon_sync();
165 ti_lib_int_enable(INT_AON_GPIO_EDGE);
166 ti_lib_int_master_enable();
178#if TI_UART_CONF_ENABLE
212 LOG_DBG(
"With DriverLib v%u.%u\n", DRIVERLIB_RELEASE_GROUP,
213 DRIVERLIB_RELEASE_BUILD);
214 LOG_INFO(BOARD_STRING
"\n");
215 LOG_DBG(
"IEEE 802.15.4: %s, Sub-GHz: %s, BLE: %s, Prop: %s\n",
216 ti_lib_chipinfo_supports_ieee_802_15_4() ==
true ?
"Yes" :
"No",
217 ti_lib_chipinfo_chip_family_is_cc13xx() ==
true ?
"Yes" :
"No",
218 ti_lib_chipinfo_supports_ble() ==
true ?
"Yes" :
"No",
219 ti_lib_chipinfo_supports_proprietary() ==
true ?
"Yes" :
"No");
220 LOG_INFO(
" RF: Channel %d", chan);
223 LOG_INFO_(
", PANID 0x%04X", pan);
void ble_eui64_addr_cpy_to(uint8_t *dst)
Copy the node's EUI64 address that is based on its factory BLE address to a destination memory area.
Header file for the CC13xx/CC26xx UART driver.
802.15.4 frame creation and parsing functions
Header file for the GPIO HAL.
void soc_rtc_init(void)
Initialise the CC13XX/CC26XX AON RTC module.
void ieee_addr_cpy_to(uint8_t *dst, uint8_t len)
Copy the node's IEEE address to a destination memory area.
void random_init(unsigned short seed)
Seed the cc2538 random number generator.
void platform_init_stage_three()
Final stage of platform driver initialisation.
void platform_init_stage_one(void)
Basic (Stage 1) platform driver initialisation.
void platform_idle()
The platform's idle/sleep function.
void platform_init_stage_two()
Stage 2 of platform driver initialisation.
void lpm_drop()
Drop the cortex to sleep / deep sleep and shut down peripherals.
void lpm_init()
Initialise the low-power mode management module.
void oscillators_select_lf_xosc(void)
Set the LF clock source to be the LF XOSC.
void board_init(void)
Board specific iniatialisation.
void cc26xx_uart_init()
Initialises the UART controller, configures I/O control and interrupts.
void cc26xx_uart_set_input(int(*input)(unsigned char c))
Assigns a callback to be called when the UART receives a byte.
void leds_init(void)
Initialise the LED HAL.
uint8_t leds_mask_t
An OR mask datatype to represents multiple LEDs.
void gpio_hal_init()
Initialise the GPIO HAL.
void leds_on(leds_mask_t leds)
Turn on multiple LEDs.
void leds_off(leds_mask_t leds)
Turn off multiple LEDs.
linkaddr_t linkaddr_node_addr
The link-layer address of the node.
void process_start(struct process *p, process_data_t data)
Start a process.
int radio_value_t
Each radio has a set of parameters that designate the current configuration and state of the radio.
@ RADIO_RESULT_OK
The parameter was set/read successfully.
@ RADIO_PARAM_CHANNEL
Channel used for radio communication.
@ RADIO_PARAM_64BIT_ADDR
Long (64 bits) address for the radio, which is used by the address filter.
@ RADIO_PARAM_PAN_ID
The personal area network identifier (PAN ID), which is used by the h/w frame filtering functionality...
@ RADIO_PARAM_16BIT_ADDR
The short address (16 bits) for the radio, which is used by the h/w filter.
Header file for the LED HAL.
Header file for the logging system.
#define IEEE802154_DEFAULT_CHANNEL
The default channel for IEEE 802.15.4 networks.
Node-id (simple 16-bit identifiers) handling.
Header file for the CC13xx/CC26xx oscillator control.
Header file for the CC13xx/CC26xx RF core driver.
Header file for the real-time timer module.
Generic serial I/O process header filer.
int serial_line_input_byte(unsigned char c)
Get one byte of input from the serial driver.
Header file for the CC13xx/CC26xx AON RTC driver.
Header file with macros which rename TI CC26xxware functions.
Header file for the cc2538 UART driver.