55 #include "dev/watchdog.h"
57 #include "dev/button-sensor.h"
64 #include "lib/random.h"
73 #include "ieee-addr.h"
80 #if STARTUP_CONF_VERBOSE
81 #define PRINTF(...) printf(__VA_ARGS__)
87 #define PUTS(s) puts(s)
102 for(k = 0; k < 800; ++k) {
103 j = k > 400 ? 800 - k : k;
106 for(i = 0; i < j; ++i) {
110 for(i = 0; i < 400 - j; ++i) {
124 short_addr = ext_addr[7];
125 short_addr |= ext_addr[6] << 8;
130 #if STARTUP_CONF_VERBOSE
133 printf(
"Rime configured with address ");
134 for(i = 0; i < LINKADDR_SIZE - 1; i++) {
141 NETSTACK_RADIO.set_value(RADIO_PARAM_PAN_ID, IEEE802154_PANID);
142 NETSTACK_RADIO.set_value(RADIO_PARAM_16BIT_ADDR, short_addr);
143 NETSTACK_RADIO.set_value(RADIO_PARAM_CHANNEL, CC2538_RF_CHANNEL);
144 NETSTACK_RADIO.set_object(RADIO_PARAM_64BIT_ADDR, ext_addr, 8);
171 #if USB_SERIAL_CONF_ENABLE
176 i2c_init(I2C_SDA_PORT, I2C_SDA_PIN, I2C_SCL_PORT, I2C_SCL_PIN, I2C_SCL_NORMAL_BUS_SPEED);
183 PUTS(CONTIKI_VERSION_STRING);
185 #if STARTUP_CONF_VERBOSE
207 PRINTF(
"%s\n", NETSTACK_NETWORK.name);
209 PRINTF(
"%s\n", NETSTACK_MAC.name);
211 PRINTF(
"%s\n", NETSTACK_RDC.name);
213 #if NETSTACK_CONF_WITH_IPV6
224 ENERGEST_ON(ENERGEST_TYPE_CPU);
226 autostart_start(autostart_processes);
void gpio_init()
Initialise the GPIO module.
void usb_serial_init()
Initialise the Serial-over-USB process.
void uart_set_input(uint8_t uart, int(*input)(unsigned char c))
Assigns a callback to be called when the UART receives a byte.
Header file with register manipulation macro definitions.
void ieee_addr_cpy_to(uint8_t *dst, uint8_t len)
Copy the node's IEEE address to a destination memory area.
Header file for the cc2538 RF driver.
#define SERIAL_LINE_CONF_UART
UART to use with serial line.
Header file for the ARM Nested Vectored Interrupt Controller.
void lpm_init()
Initialise the low-power mode management module.
void ioc_init()
Initialise the IOC driver.
void random_init(unsigned short seed)
Seed the cc2538 random number generator.
Header file for the System Control Block (SCB)
void nvic_init()
Initialises the NVIC driver.
void clock_init(void)
Initialize the clock library.
void uart_init(uint8_t uart)
Initialises the UART controller, configures I/O control and interrupts.
void usb_serial_set_input(int(*input)(unsigned char c))
Set an input hook for bytes received over USB.
void i2c_init(uint8_t port_sda, uint8_t pin_sda, uint8_t port_scl, uint8_t pin_scl, uint32_t bus_speed)
Initialize the I2C peripheral and pins.
Header for the Contiki/uIP interface.
int process_run(void)
Run the system once - call poll handlers and process one event.
SENSORS & button_sensor
Copyright (c) 2014, Analog Devices, Inc.
void crypto_disable(void)
Disables the AES/SHA cryptoprocessor.
void sys_ctrl_init()
Initialises the System Control Driver.
#define NULL
The null pointer.
Header file with declarations for the I/O Control module.
802.15.4 frame creation and parsing functions
void board_init(void)
Board specific iniatialisation.
void watchdog_periodic(void)
Writes the WDT clear sequence.
Header file for the cc2538 System Control driver.
void crypto_init(void)
Enables and resets the AES/SHA cryptoprocessor.
Header file for the uIP TCP/IP stack.
Header file for the cc2538 AES/SHA cryptoprocessor driver.
void process_start(struct process *p, process_data_t data)
Start a process.
int main(void)
This is main...
void rtimer_init(void)
Initialize the real-time scheduler.
void watchdog_init(void)
Copyright (c) 2014, Analog Devices, Inc.
Generic serial I/O process header filer.
CCIF uip_lladdr_t uip_lladdr
Host L2 address.
Header file for the Rime queue buffer management
void process_init(void)
Initialize the process module.
Header file for cc2538's UART-like I/O over USB.
void ctimer_init(void)
Initialize the callback timer library.
linkaddr_t linkaddr_node_addr
The Rime address of the node.
Header file with register, macro and function declarations for the cc2538 micro-DMA controller module...
#define lpm_enter()
Drop to Deep Sleep.
void udma_init()
Initialise the uDMA driver.
int serial_line_input_byte(unsigned char c)
Get one byte of input from the serial driver.
void watchdog_start(void)
Starts the WDT in watchdog mode if enabled by user configuration, maximum interval.
Include file for the Contiki low-layer network stack (NETSTACK)
#define INTERRUPTS_ENABLE()
Enables all CPU interrupts.
void soc_print_info(void)
Prints SoC information.