Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
Loading...
Searching...
No Matches
board.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2020 Benjamin Valentin
3
*
4
* This file is subject to the terms and conditions of the GNU Lesser
5
* General Public License v2.1. See the file LICENSE in the top level
6
* directory for more details.
7
*/
8
19
#ifndef BOARD_H
20
#define BOARD_H
21
22
#include "board_common.h"
23
24
#ifdef __cplusplus
25
extern
"C"
{
26
#endif
27
32
#define LED0_PIN GPIO_PIN(0, 30)
33
#define LED1_PIN GPIO_PIN(0, 31)
34
35
#define LED_PORT (NRF_P0)
36
#define LED0_MASK (1 << 30)
37
#define LED1_MASK (1 << 31)
38
#define LED_MASK (LED0_MASK | LED1_MASK)
39
40
#define LED0_ON (LED_PORT->OUTCLR = LED0_MASK)
41
#define LED0_OFF (LED_PORT->OUTSET = LED0_MASK)
42
#define LED0_TOGGLE (LED_PORT->OUT ^= LED0_MASK)
43
44
#define LED1_ON (LED_PORT->OUTCLR = LED1_MASK)
45
#define LED1_OFF (LED_PORT->OUTSET = LED1_MASK)
46
#define LED1_TOGGLE (LED_PORT->OUT ^= LED1_MASK)
53
#define BTN0_PIN GPIO_PIN(0, 21)
54
#define BTN0_MODE GPIO_IN_PU
55
#define BTN1_PIN GPIO_PIN(0, 29)
56
#define BTN1_MODE GPIO_IN_PU
63
#define WS281X_TIMER_DEV TIMER_DEV(1)
64
#define WS281X_TIMER_MAX_VALUE TIMER_1_MAX_VALUE
67
#ifdef __cplusplus
68
}
69
#endif
70
71
#endif
/* BOARD_H */
Generated on Sun Dec 22 2024 10:22:27 by
1.9.8