52 #include "dev/button-sensor.h" 60 #include "lib/random.h" 61 #include "lib/sensors.h" 69 #include "ieee-addr.h" 78 #define LOG_MODULE "OpenMote CC2538" 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) {
113 short_addr = ext_addr[7];
114 short_addr |= ext_addr[6] << 8;
116 NETSTACK_RADIO.set_value(RADIO_PARAM_PAN_ID, IEEE802154_PANID);
117 NETSTACK_RADIO.set_value(RADIO_PARAM_16BIT_ADDR, short_addr);
119 NETSTACK_RADIO.set_object(RADIO_PARAM_64BIT_ADDR, ext_addr, 8);
140 #if USB_SERIAL_CONF_ENABLE 145 i2c_init(I2C_SDA_PORT, I2C_SDA_PIN, I2C_SCL_PORT, I2C_SCL_PIN, I2C_SCL_NORMAL_BUS_SPEED);
172 LOG_INFO(
"%s\n", BOARD_STRING);
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.
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.
void soc_print_info(void)
Prints SoC information.
Header file with register manipulation macro definitions.
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.
#define INTERRUPTS_ENABLE()
Enables all CPU interrupts.
void board_init(void)
Board specific iniatialisation.
Header file for cc2538's UART-like I/O 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.
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 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.
void platform_init_stage_three()
Final stage of platform driver initialisation.
void crypto_disable(void)
Disables the AES/SHA cryptoprocessor.
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.
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.
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.