38#include "nordic_common.h"
41#include "nrf_drv_config.h"
42#include "nrf_drv_gpiote.h"
43#ifdef SOFTDEVICE_PRESENT
44#include "softdevice_handler.h"
49#include "contiki-net.h"
51#include "lib/sensors.h"
59#define LOG_MODULE "NRF52DK"
60#define LOG_LEVEL LOG_LEVEL_MAIN
62#if defined(SOFTDEVICE_PRESENT) && PLATFORM_INDICATE_BLE_STATE
63PROCESS(ble_iface_observer,
"BLE interface observer");
71 static struct etimer led_timer;
86 }
else if(ev == PROCESS_EVENT_TIMER &&
etimer_expired(&led_timer)) {
103#ifdef SOFTDEVICE_PRESENT
105 SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_XTAL_20_PPM, NULL);
107#ifdef PLATFORM_HAS_BUTTON
108 if (!nrf_drv_gpiote_is_init()) {
109 nrf_drv_gpiote_init();
129#if SLIP_ARCH_CONF_ENABLE
130 #error Platform does not support SLIP
137#ifdef SOFTDEVICE_PRESENT
146#if defined(SOFTDEVICE_PRESENT) && NETSTACK_CONF_WITH_IPV6
156#ifdef SOFTDEVICE_PRESENT
A MAC protocol implementation that uses nRF52 IPSP implementation as a link layer.
void random_init(unsigned short seed)
Seed the cc2538 random number generator.
PROCESS_THREAD(cc2538_rf_process, ev, data)
Implementation of the cc2538 RF driver process.
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 lpm_drop()
Drop the cortex to sleep / deep sleep and shut down peripherals.
void board_init(void)
Board specific iniatialisation.
#define CLOCK_SECOND
A second, measured in system clock time.
void leds_init(void)
Initialise the LED HAL.
void leds_on(unsigned char leds)
Turn on multiple LEDs.
void leds_off(unsigned char leds)
Turn off multiple LEDs.
void leds_toggle(unsigned char leds)
Toggle multiple LEDs.
void etimer_reset(struct etimer *et)
Reset an event timer with the same interval as was previously set.
void etimer_stop(struct etimer *et)
Stop a pending event timer.
int etimer_expired(struct etimer *et)
Check if an event timer has expired.
void etimer_set(struct etimer *et, clock_time_t interval)
Set an event timer.
void linkaddr_set_node_addr(linkaddr_t *t)
Set the address of the current node.
void ble_get_mac(uint8_t addr[8])
Return device EUI64 MAC address.
process_event_t ble_event_interface_deleted
This event is broadcast when BLE connection is destroyed.
void ble_advertising_init(const char *name)
Initialize BLE advertising data.
void ble_stack_init(void)
Initialize and enable the BLE stack.
void ble_advertising_start(void)
Start BLE advertising.
process_event_t ble_event_interface_added
This event is broadcast when BLE connection is established.
void uart0_init(unsigned long ubr)
Initalize the RS232 port.
#define DEVICE_NAME
Device name used in BLE undirected advertisement.
#define PROCESS(name, strname)
Declare a process.
#define PROCESS_WAIT_EVENT()
Wait for an event to be posted to the process.
#define PROCESS_BEGIN()
Define the beginning of a process.
#define PROCESS_END()
Define the end of a process.
void process_start(struct process *p, process_data_t data)
Start a process.
Header file for the LED HAL.
Header file for the logging system.
Generic serial I/O process header filer.
int serial_line_input_byte(unsigned char c)
Get one byte of input from the serial driver.