2019-11-04 14:00:56 +01:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2019 Inria
|
|
|
|
*
|
|
|
|
* This file is subject to the terms and conditions of the GNU Lesser
|
|
|
|
* General Public License v2.1. See the file LICENSE in the top level
|
|
|
|
* directory for more details.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @ingroup boards_atmega256rfr2-xpro
|
|
|
|
* @{
|
|
|
|
*
|
|
|
|
* @file
|
|
|
|
* @brief Board specific definitions for the Atmega256RFR2 Xplained Pro
|
|
|
|
*
|
|
|
|
* @author Alexandre Abadie <alexandre.abadie@inria.fr>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef BOARD_H
|
|
|
|
#define BOARD_H
|
|
|
|
|
|
|
|
#include "cpu.h"
|
|
|
|
#include "periph/gpio.h"
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Use the UART 1 for STDIO on this board
|
|
|
|
*/
|
|
|
|
#define STDIO_UART_DEV (UART_DEV(1))
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @name xtimer configuration values
|
|
|
|
*
|
2019-11-06 07:28:39 +01:00
|
|
|
* Xtimer runs at 16MHz / 64 = 250kHz
|
2019-11-04 14:00:56 +01:00
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
#define XTIMER_WIDTH (16)
|
2019-11-06 07:28:39 +01:00
|
|
|
#define XTIMER_HZ (250000UL)
|
2019-11-04 14:00:56 +01:00
|
|
|
#define XTIMER_BACKOFF (40)
|
|
|
|
/** @} */
|
|
|
|
|
2021-06-15 16:35:40 +02:00
|
|
|
/**
|
|
|
|
* @name ztimer configuration values
|
|
|
|
* @{
|
|
|
|
*/
|
2022-02-17 18:26:33 +01:00
|
|
|
#define CONFIG_ZTIMER_USEC_ADJUST_SET (132)
|
|
|
|
#define CONFIG_ZTIMER_USEC_ADJUST_SLEEP (120)
|
2021-06-15 16:35:40 +02:00
|
|
|
/** @} */
|
|
|
|
|
2019-11-04 14:00:56 +01:00
|
|
|
/**
|
|
|
|
* @name Macros for controlling the on-board LED
|
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
#define LED0_PIN GPIO_PIN(PORT_B, 4)
|
|
|
|
#define LED0_MODE GPIO_OUT
|
|
|
|
#define LED0_ENABLE_PORT DDRB |= LED0_PIN
|
|
|
|
#define LED0_ON PORTB |= LED0_PIN
|
|
|
|
#define LED0_OFF PORTB &= ~LED0_PIN
|
|
|
|
#define LED0_TOGGLE PORTB ^= LED0_PIN
|
|
|
|
/** @} */
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @name Button pin configuration
|
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
#define BTN0_PIN GPIO_PIN(PORT_E, 4)
|
|
|
|
#define BTN0_MODE GPIO_IN_PU
|
|
|
|
/** @} */
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* BOARD_H */
|
|
|
|
/** @} */
|