50#include "dev/button-sensor.h"
58#include "usb/usb-serial.h"
59#include "lib/random.h"
60#include "lib/sensors.h"
78#define LOG_MODULE "Zoul"
79#define LOG_LEVEL LOG_LEVEL_MAIN
91 for(k = 0; k < 800; ++k) {
92 j = k > 400 ? 800 - k : k;
95 for(i = 0; i < j; ++i) {
99 for(i = 0; i < 400 - j; ++i) {
109#if RTC_CONF_SET_FROM_SYS
117#if RTC_CONF_SET_FROM_SYS
119#error Could not retrieve date from system
130 LOG_INFO(
"Setting RTC from system date: %s\n", DATE);
133 td.weekdays = (uint8_t)strtol(DATE, &next, 10);
134 td.day = (uint8_t)strtol(next, &next, 10);
135 td.months = (uint8_t)strtol(next, &next, 10);
136 td.years = (uint8_t)strtol(next, &next, 10);
137 td.hours = (uint8_t)strtol(next, &next, 10);
138 td.minutes = (uint8_t)strtol(next, &next, 10);
139 td.seconds = (uint8_t)strtol(next, NULL, 10);
145 td.mode = RTCC_24H_MODE;
151 td.century = RTCC_CENTURY_20XX;
155 LOG_ERR(
"Failed to set time and date\n");
169 short_addr = ext_addr[7];
170 short_addr |= ext_addr[6] << 8;
206#if USB_SERIAL_CONF_ENABLE
226#if PLATFORM_HAS_BUTTON
238 LOG_INFO(
"%s\n", BOARD_STRING);
261radio_phy_overhead(
void) {
264 return (
unsigned)ret;
268radio_byte_air_time(
void) {
271 return (
unsigned)ret;
275radio_delay_before_tx(
void) {
278 return (
unsigned)ret;
282radio_delay_before_rx(
void) {
285 return (
unsigned)ret;
289radio_delay_before_detect(
void) {
292 return (
unsigned)ret;
296radio_tsch_timeslot_timing(
void) {
299 NETSTACK_RADIO.get_object(RADIO_CONST_TSCH_TIMING, &ret,
sizeof(ret));
Header file for the cc2538 RF driver.
Header file with prototypes for interrupt control on the cc2538 Cortex-M3 micro.
Header file for the cc2538 AES/SHA cryptoprocessor driver.
802.15.4 frame creation and parsing functions
#define INTERRUPTS_ENABLE()
Enables all CPU interrupts.
void crypto_init(void)
Enables and resets the AES/SHA cryptoprocessor.
void crypto_disable(void)
Disables the AES/SHA cryptoprocessor.
void ieee_addr_cpy_to(uint8_t *dst, uint8_t len)
void random_init(unsigned short seed)
Seed the cc2538 random number generator.
void soc_print_info(void)
Prints SoC information.
void soc_init()
Common initialisation routine for all CC2538-based platforms.
void uart_set_input(uint8_t uart, int(*input)(unsigned char c))
Assigns a callback to be called when the UART receives a byte.
void udma_init()
Initialise the uDMA driver.
void usb_serial_set_input(int(*input)(unsigned char c))
Set an input hook for bytes received over USB.
void usb_serial_init()
Initialise the Serial-over-USB process.
#define SERIAL_LINE_CONF_UART
UART to use with serial line.
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 board_init(void)
Board specific iniatialisation.
void leds_init(void)
Initialise the LED HAL.
uint8_t leds_mask_t
An OR mask datatype to represents multiple LEDs.
void uart_init(void)
Initializa the UART driver.
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_CONST_PHY_OVERHEAD
The physical layer header (PHR) + MAC layer footer (MFR) overhead in bytes.
@ RADIO_CONST_BYTE_AIR_TIME
The air time of one byte in usec, e.g.
@ RADIO_PARAM_CHANNEL
Channel used for radio communication.
@ RADIO_CONST_DELAY_BEFORE_RX
The delay in usec between turning on the radio and it being actually listening (able to hear a preamb...
@ RADIO_PARAM_64BIT_ADDR
Long (64 bits) address for the radio, which is used by the address filter.
@ RADIO_CONST_DELAY_BEFORE_TX
The delay in usec between a call to the radio API's transmit function and the end of SFD transmission...
@ RADIO_PARAM_PAN_ID
The personal area network identifier (PAN ID), which is used by the h/w frame filtering functionality...
@ RADIO_CONST_DELAY_BEFORE_DETECT
The delay in usec between the end of SFD reception for an incoming frame and the radio API starting t...
@ RADIO_PARAM_16BIT_ADDR
The short address (16 bits) for the radio, which is used by the h/w filter.
int8_t rtcc_init(void)
Initialize the RTCC, configures the I2C bus, interrupts and registers.
int8_t rtcc_set_time_date(simple_td_map *data)
Set the time and date.
Header file for the LED HAL.
Header file for the link-layer address representation.
Header file for the logging system.
#define IEEE802154_DEFAULT_CHANNEL
The default channel for IEEE 802.15.4 networks.
Include file for the Contiki low-layer network stack (NETSTACK)
Header file with register manipulation macro definitions.
Header file for the RE-Mote RF antenna switch.
Generic serial I/O process header filer.
Header file with macro and function declarations for the cc2538 SoC.
Header file for the cc2538 UART driver.
Header file with register, macro and function declarations for the cc2538 micro-DMA controller module...