Loading...
Searching...
No Matches
board.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2015 Rakendra Thapa <rakendrathapa@gmail.com>
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
17
18#include "cpu.h"
19#include "periph/uart.h"
20#include "periph/timer.h"
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
30#define BTN0_PIN GPIO_PIN(5, 4)
31#define BTN1_PIN GPIO_PIN(5, 0)
32
33#define BTN0_MODE GPIO_IN_PU
34#define BTN1_MODE GPIO_IN_PU
36
41#define LED0_PIN GPIO_PIN(5, 1)
42#define LED1_PIN GPIO_PIN(5, 2)
43#define LED2_PIN GPIO_PIN(5, 3)
44
49#define LED_PORT() (GPIO_PORTF_DATA_R)
50#define LED0_MASK (1 << 7)
51#define LED1_MASK (1 << 2)
52#define LED2_MASK (1 << 1)
53
54#define LED0_ON (LED_PORT() |= LED0_MASK)
55#define LED0_OFF (LED_PORT() &= ~LED0_MASK)
56#define LED0_TOGGLE (LED_PORT() ^= LED0_MASK)
57
58#define LED1_ON (LED_PORT() |= LED1_MASK)
59#define LED1_OFF (LED_PORT() &= ~LED1_MASK)
60#define LED1_TOGGLE (LED_PORT() ^= LED1_MASK)
61
62#define LED2_ON (LED_PORT() |= LED2_MASK)
63#define LED2_OFF (LED_PORT() &= ~LED2_MASK)
64#define LED2_TOGGLE (LED_PORT() ^= LED2_MASK)
66
71#define CONFIG_ZTIMER_USEC_TYPE ZTIMER_TYPE_PERIPH_TIMER
72#define CONFIG_ZTIMER_USEC_DEV TIMER_DEV(0)
73#define CONFIG_ZTIMER_USEC_MIN (8)
75
76#ifdef __cplusplus
77}
78#endif
79
Low-level timer peripheral driver interface definitions.
Low-level UART peripheral driver interface definition.