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) 2015 Rakendra Thapa <rakendrathapa@gmail.com>
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
19
#ifndef BOARD_H
20
#define BOARD_H
21
22
#include "cpu.h"
23
#include "
periph/uart.h
"
24
#include "
periph/timer.h
"
25
26
#ifdef __cplusplus
27
extern
"C"
{
28
#endif
29
34
#define BTN0_PIN GPIO_PIN(5, 4)
35
#define BTN1_PIN GPIO_PIN(5, 0)
36
37
#define BTN0_MODE GPIO_IN_PU
38
#define BTN1_MODE GPIO_IN_PU
45
#define LED0_PIN GPIO_PIN(5, 1)
46
#define LED1_PIN GPIO_PIN(5, 2)
47
#define LED2_PIN GPIO_PIN(5, 3)
48
53
#define LED_PORT() (GPIO_PORTF_DATA_R)
54
#define LED0_MASK (1 << 7)
55
#define LED1_MASK (1 << 2)
56
#define LED2_MASK (1 << 1)
57
58
#define LED0_ON (LED_PORT() |= LED0_MASK)
59
#define LED0_OFF (LED_PORT() &= ~LED0_MASK)
60
#define LED0_TOGGLE (LED_PORT() ^= LED0_MASK)
61
62
#define LED1_ON (LED_PORT() |= LED1_MASK)
63
#define LED1_OFF (LED_PORT() &= ~LED1_MASK)
64
#define LED1_TOGGLE (LED_PORT() ^= LED1_MASK)
65
66
#define LED2_ON (LED_PORT() |= LED2_MASK)
67
#define LED2_OFF (LED_PORT() &= ~LED2_MASK)
68
#define LED2_TOGGLE (LED_PORT() ^= LED2_MASK)
75
#define CONFIG_ZTIMER_USEC_TYPE ZTIMER_TYPE_PERIPH_TIMER
76
#define CONFIG_ZTIMER_USEC_DEV TIMER_DEV(0)
77
#define CONFIG_ZTIMER_USEC_MIN (8)
80
#ifdef __cplusplus
81
}
82
#endif
83
84
#endif
/* BOARD_H */
timer.h
Low-level timer peripheral driver interface definitions.
uart.h
Low-level UART peripheral driver interface definition.
Generated on Sat Nov 23 2024 01:58:05 by
1.9.8