51 #include "dev/watchdog.h"
53 #include "dev/button-sensor.h"
59 #include "lib/random.h"
74 #if STARTUP_CONF_VERBOSE
75 #define PRINTF(...) printf(__VA_ARGS__)
81 #define PUTS(s) puts(s)
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) {
111 ieee_addr_cpy_to(ext_addr, 8);
113 short_addr = ext_addr[7];
114 short_addr |= ext_addr[6] << 8;
119 #if STARTUP_CONF_VERBOSE
122 printf(
"Rime configured with address ");
123 for(i = 0; i < LINKADDR_SIZE - 1; i++) {
130 NETSTACK_RADIO.set_value(RADIO_PARAM_PAN_ID, IEEE802154_PANID);
131 NETSTACK_RADIO.set_value(RADIO_PARAM_16BIT_ADDR, short_addr);
132 NETSTACK_RADIO.set_value(RADIO_PARAM_CHANNEL, CC2538_RF_CHANNEL);
133 NETSTACK_RADIO.set_object(RADIO_PARAM_64BIT_ADDR, ext_addr, 8);
174 #if USB_SERIAL_CONF_ENABLE
184 PUTS(CONTIKI_VERSION_STRING);
188 PRINTF(
"%s\n", NETSTACK_NETWORK.name);
190 PRINTF(
"%s\n", NETSTACK_MAC.name);
192 PRINTF(
"%s\n", NETSTACK_RDC.name);
214 ENERGEST_ON(ENERGEST_TYPE_CPU);
216 autostart_start(autostart_processes);
int serial_line_input_byte(unsigned char c)
Get one byte of input from the serial driver.
linkaddr_t linkaddr_node_addr
The Rime address of the node.
CCIF uip_lladdr_t uip_lladdr
Host L2 address.
802.15.4 frame creation and parsing functions
Header file for the ARM Nested Vectored Interrupt Controller.
void watchdog_start(void)
Starts the WDT in watchdog mode if enabled by user configuration, maximum interval.
Header file for the uIP TCP/IP stack.
void rtimer_init(void)
Initialize the real-time scheduler.
Header for the Contiki/uIP interface.
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 uart_init(const unsigned int uart_num, uint32_t module_clk_hz, const uint32_t baud)
Initialize UART.
Header file for the System Control Block (SCB)
void usb_serial_set_input(int(*input)(unsigned char c))
Set an input hook for bytes received over USB.
#define lpm_enter()
Drop to Deep Sleep.
#define NULL
The null pointer.
void nvic_init()
Initialises the NVIC driver.
Header file with declarations for the I/O Control module.
Header file with register, macro and function declarations for the cc2538 micro-DMA controller module...
Header file with prototypes for interrupt control on the cc2538 Cortex-M3 micro.
void gpio_init()
Initialise the GPIO module.
void clock_init(void)
Initialize the clock library.
#define lpm_init()
Initialise the LPM module.
int main(void)
This is main...
Header file with register and macro declarations for the cc2538 IEEE address driver.
void process_init(void)
Initialize the process module.
Header file with register manipulation macro definitions.
#define LEDS_YELLOW
LED2 (Yellow) -> PC1.
#define LEDS_GREEN
LED3 (Green) -> PC2.
#define INTERRUPTS_ENABLE()
Enables all CPU interrupts.
void button_sensor_init()
Common initialiser for all SmartRF Buttons.
void usb_serial_init()
Initialise the Serial-over-USB process.
void random_init(unsigned short seed)
Seed the cc2430 random number generator.
void ioc_init()
Initialise the IOC driver.
Header file for the cc2538 System Control driver.
Generic serial I/O process header filer.
void watchdog_periodic(void)
Writes the WDT clear sequence.
void ctimer_init(void)
Initialize the callback timer library.
#define LEDS_ORANGE
LED4 (Orange) -> PC3.
Header file for the Rime queue buffer management
#define SERIAL_LINE_CONF_UART
UART to use with serial line.
void process_start(struct process *p, process_data_t data)
Start a process.
void sys_ctrl_init()
Initialises the System Control Driver.
Header file for the cc2538 RF driver.
int process_run(void)
Run the system once - call poll handlers and process one event.
Header file for cc2538's UART-like I/O over USB.
void watchdog_init(void)
Copyright (c) 2014, Analog Devices, Inc.
void udma_init()
Initialise the uDMA driver.
Include file for the Contiki low-layer network stack (NETSTACK)