Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
board.h
Go to the documentation of this file.
1
/*
2
* SPDX-FileCopyrightText: 2021 Gerson Fernando Budke
3
* SPDX-License-Identifier: LGPL-2.1-only
4
*/
5
6
#pragma once
7
18
#include "cpu.h"
19
#include "
macros/units.h
"
20
21
#ifdef __cplusplus
22
extern
"C"
{
23
#endif
24
28
#define CLOCK_CORECLOCK MHZ(32)
29
43
#ifndef STDIO_UART_BAUDRATE
44
#define STDIO_UART_BAUDRATE (115200U)
45
#endif
52
#define LED_PORT PORTQ
53
54
#define LED0_PIN GPIO_PIN(PORT_Q, 3)
55
#define LED0_MODE GPIO_OUT
56
#define LED0_MASK (PIN3_bm)
57
#define LED0_ON (LED_PORT.OUTCLR = LED0_MASK)
58
#define LED0_OFF (LED_PORT.OUTSET = LED0_MASK)
59
#define LED0_TOGGLE (LED_PORT.OUTTGL = LED0_MASK)
60
61
#define LED_PORT_MASK (LED0_MASK)
68
#define BTN0_PIN GPIO_PIN(PORT_Q, 2)
69
#define BTN0_MODE (GPIO_IN | GPIO_OPC_PU | GPIO_SLEW_RATE)
70
#define BTN0_INT_FLANK (GPIO_ISC_FALLING | GPIO_LVL_LOW)
87
#define XTIMER_DEV TIMER_DEV(0)
88
#define XTIMER_CHAN (0)
89
#define XTIMER_WIDTH (16)
90
#define XTIMER_HZ KHZ(500)
91
#define XTIMER_BACKOFF (150)
94
#ifdef __cplusplus
95
}
96
#endif
97
units.h
Unit helper macros.
Generated on Thu Jul 24 2025 16:03:56 by
1.9.1