50 #include "dev/button-sensor.h" 58 #include "usb/usb-serial.h" 59 #include "lib/random.h" 60 #include "lib/sensors.h" 68 #include "ieee-addr.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);
261 radio_phy_overhead(
void) {
264 return (
unsigned)ret;
268 radio_byte_air_time(
void) {
271 return (
unsigned)ret;
275 radio_delay_before_tx(
void) {
278 return (
unsigned)ret;
282 radio_delay_before_rx(
void) {
285 return (
unsigned)ret;
289 radio_delay_before_detect(
void) {
292 return (
unsigned)ret;
296 radio_tsch_timeslot_timing(
void) {
299 NETSTACK_RADIO.get_object(RADIO_CONST_TSCH_TIMING, &ret,
sizeof(ret));
The delay in usec between turning on the radio and it being actually listening (able to hear a preamb...
Header file for the cc2538 UART driver.
#define SERIAL_LINE_CONF_UART
UART to use with serial line.
Header file for the cc2538 RF driver.
void usb_serial_init()
Initialise the Serial-over-USB process.
void platform_init_stage_two()
Stage 2 of platform driver initialisation.
The delay in usec between a call to the radio API's transmit function and the end of SFD transmission...
void platform_idle()
The platform's idle/sleep function.
Header file for the cc2538 AES/SHA cryptoprocessor driver.
Header file for the link-layer address representation
void leds_init(void)
Initialise the LED HAL.
void uart_init(uint8_t uart)
Initialises the UART controller, configures I/O control and interrupts.
The short address (16 bits) for the radio, which is used by the h/w filter.
void soc_print_info(void)
Prints SoC information.
Channel used for radio communication.
Header file with register manipulation macro definitions.
int radio_value_t
Each radio has a set of parameters that designate the current configuration and state of the radio...
void leds_on(unsigned char leds)
Turn on multiple LEDs.
void leds_off(unsigned char leds)
Turn off multiple LEDs.
Header file with register, macro and function declarations for the cc2538 micro-DMA controller module...
linkaddr_t linkaddr_node_addr
The link-layer address of the node.
void ieee_addr_cpy_to(uint8_t *dst, uint8_t len)
Copy the node's IEEE address to a destination memory area.
#define IEEE802154_DEFAULT_CHANNEL
The default channel for IEEE 802.15.4 networks.
int serial_line_input_byte(unsigned char c)
Get one byte of input from the serial driver.
The physical layer header (PHR) + MAC layer footer (MFR) overhead in bytes.
#define INTERRUPTS_ENABLE()
Enables all CPU interrupts.
void board_init(void)
Board specific iniatialisation.
The personal area network identifier (PAN ID), which is used by the h/w frame filtering functionality...
int8_t rtcc_init(void)
Initialize the RTCC, configures the I2C bus, interrupts and registers.
void uart_set_input(uint8_t uart, int(*input)(unsigned char c))
Assigns a callback to be called when the UART receives a byte.
The air time of one byte in usec, e.g.
void soc_init()
Common initialisation routine for all CC2538-based platforms.
802.15.4 frame creation and parsing functions
Header file with prototypes for interrupt control on the cc2538 Cortex-M3 micro.
Header file for the RE-Mote RF antenna switch.
void platform_init_stage_three()
Final stage of platform driver initialisation.
void crypto_disable(void)
Disables the AES/SHA cryptoprocessor.
The delay in usec between the end of SFD reception for an incoming frame and the radio API starting t...
Header file with macro and function declarations for the cc2538 SoC.
void random_init(unsigned short seed)
Seed the cc2538 random number generator.
void udma_init()
Initialise the uDMA driver.
Long (64 bits) address for the radio, which is used by the address filter.
Generic serial I/O process header filer.
Include file for the Contiki low-layer network stack (NETSTACK)
Header file for the logging system
Header file for the LED HAL.
void platform_init_stage_one(void)
Basic (Stage 1) platform driver initialisation.
int8_t rtcc_set_time_date(simple_td_map *data)
Set the time and date.
uint8_t leds_mask_t
An OR mask datatype to represents multiple LEDs.
void process_start(struct process *p, process_data_t data)
Start a process.
void usb_serial_set_input(int(*input)(unsigned char c))
Set an input hook for bytes received over USB.
void crypto_init(void)
Enables and resets the AES/SHA cryptoprocessor.