board.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2020 Oppila Microsystems - http://www.oppila.in
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser General
5  * Public License v2.1. See the file LICENSE in the top level directory for more
6  * details.
7  */
8 
9 #pragma once
10 
19 #include "cpu.h"
20 #include "periph/gpio.h"
21 #include "periph/spi.h"
22 #include "cc2538_eui_primary.h"
23 
24 #ifdef __cplusplus
25  extern "C" {
26 #endif
27 
32 #define LED0_PIN GPIO_PIN(3, 0)
33 #define LED1_PIN GPIO_PIN(3, 4)
34 
35 #define LED0_MASK (1 << 0)
36 #define LED1_MASK (1 << 4)
37 
38 #define LED0_ON (GPIO_D->DATA |= LED0_MASK)
39 #define LED0_OFF (GPIO_D->DATA &= ~LED0_MASK)
40 #define LED0_TOGGLE (GPIO_D->DATA ^= LED0_MASK)
41 
42 #define LED1_ON (GPIO_B->DATA |= LED1_MASK)
43 #define LED1_OFF (GPIO_B->DATA &= ~LED1_MASK)
44 #define LED1_TOGGLE (GPIO_B->DATA ^= LED1_MASK)
45 
46 #define LED_ALL_OFF LED0_OFF; \
47  LED1_OFF;
48 #define LED_ALL_ON LED0_ON; \
49  LED1_ON;
56 #define BTN0_PIN GPIO_PIN(1, 0)
57 #define BTN0_MODE GPIO_IN_PU
64 #ifndef UPDATE_CCA
65 #define UPDATE_CCA (1)
66 #endif
67 #define CCA_BACKDOOR_ENABLE (1)
68 #define CCA_BACKDOOR_PORT_A_PIN (3)
69 #define CCA_BACKDOOR_ACTIVE_LEVEL (0)
71 #define BOOT_PIN GPIO_PIN(0, CCA_BACKDOOR_PORT_A_PIN)
78 #define XTIMER_WIDTH (16)
79 #define XTIMER_BACKOFF (50)
80 #define XTIMER_ISR_BACKOFF (40)
87 #define INTERNAL_PERIPHERAL_VID (0x0451)
88 #define INTERNAL_PERIPHERAL_PID (0x16C8)
91 #ifdef __cplusplus
92 } /* end extern "C" */
93 #endif
94 
CC2538 EUI-64 provider.
Low-level GPIO peripheral driver interface definitions.
Low-level SPI peripheral driver interface definition.