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) 2021 Mesotic SAS
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 "cpu.h"
23
24
#ifdef __cplusplus
25
extern
"C"
{
26
#endif
27
35
#define CLOCK_HFCLK (32U)
37
/* LFCLK Source clock selection:*/
38
/* - CLOCK_LFCLKSRC_SRC_LFRC: 32.768 kHz RC oscillator
39
* - CLOCK_LFCLKSRC_SRC_LFXO: 32.768 kHz crystal oscillator */
40
#define CLOCK_LFCLK (CLOCK_LFCLKSRC_SRC_LFXO)
47
#define LED0_PIN GPIO_PIN(0, 2)
48
#define LED1_PIN GPIO_PIN(0, 3)
49
#define LED2_PIN GPIO_PIN(0, 4)
50
#define LED3_PIN GPIO_PIN(0, 5)
52
#define LED0_MASK (1 << 2)
53
#define LED1_MASK (1 << 3)
54
#define LED2_MASK (1 << 4)
55
#define LED3_MASK (1 << 5)
57
#define LED_PORT (NRF_P0_S)
59
#define LED0_ON (LED_PORT->OUTSET = LED0_MASK)
60
#define LED0_OFF (LED_PORT->OUTCLR = LED0_MASK)
61
#define LED0_TOGGLE (LED_PORT->OUT ^= LED0_MASK)
63
#define LED1_ON (LED_PORT->OUTSET = LED1_MASK)
64
#define LED1_OFF (LED_PORT->OUTCLR = LED1_MASK)
65
#define LED1_TOGGLE (LED_PORT->OUT ^= LED1_MASK)
67
#define LED2_ON (LED_PORT->OUTSET = LED2_MASK)
68
#define LED2_OFF (LED_PORT->OUTCLR = LED2_MASK)
69
#define LED2_TOGGLE (LED_PORT->OUT ^= LED2_MASK)
71
#define LED3_ON (LED_PORT->OUTSET = LED3_MASK)
72
#define LED3_OFF (LED_PORT->OUTCLR = LED3_MASK)
73
#define LED3_TOGGLE (LED_PORT->OUT ^= LED3_MASK)
80
#define BTN0_PIN GPIO_PIN(0, 6)
81
#define BTN0_MODE GPIO_IN_PU
82
#define BTN1_PIN GPIO_PIN(0, 7)
83
#define BTN1_MODE GPIO_IN_PU
84
#define BTN2_PIN GPIO_PIN(0, 8)
85
#define BTN2_MODE GPIO_IN_PU
86
#define BTN3_PIN GPIO_PIN(0, 9)
87
#define BTN3_MODE GPIO_IN_PU
94
#define WS281X_TIMER_DEV TIMER_DEV(1)
95
#define WS281X_TIMER_MAX_VALUE TIMER_1_MAX_VALUE
98
#ifdef __cplusplus
99
}
100
#endif
101
102
#endif
/* BOARD_H */
Generated on Wed Dec 4 2024 00:47:43 by
1.9.8