Loading...
Searching...
No Matches
board.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2019 Robert Olsson <roolss@kth.se>
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
9#pragma once
10
21
22#include "cpu.h"
23#include "periph/gpio.h"
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
33#define AT24MAC_PARAM_I2C_DEV I2C_DEV(0)
34#define AT24MAC_PARAM_TYPE AT24MAC6XX
36
41#define LED_PORT PORTE
42#define LED_PORT_DDR DDRE
43
44#define LED0_PIN GPIO_PIN(PORT_E, 4) /* RED */
45#define LED1_PIN GPIO_PIN(PORT_E, 3) /* YELLOW */
46
47#define LED0_MASK (1 << 4)
48#define LED1_MASK (1 << 3)
49
50#define LED0_MODE GPIO_OUT
51#define LED0_OFF (LED_PORT |= LED0_MASK)
52#define LED0_ON (LED_PORT &= ~LED0_MASK)
53#define LED0_TOGGLE (LED_PORT ^= LED0_MASK)
54
55#define LED1_MODE GPIO_OUT
56#define LED1_OFF (LED_PORT |= LED1_MASK)
57#define LED1_ON (LED_PORT &= ~LED1_MASK)
58#define LED1_TOGGLE (LED_PORT ^= LED1_MASK)
60
65#define LED_PANIC LED0_ON
67
72#define DS18_PARAM_PIN GPIO_PIN(PORT_D, 7)
73#define DS18_PARAM_PULL (GPIO_IN_PU)
75
80#define XTIMER_DEV TIMER_DEV(0)
81#define XTIMER_CHAN (0)
82#define XTIMER_WIDTH (16)
83#define XTIMER_HZ (62500UL)
85
94#define BOOTLOADER_CLEARS_WATCHDOG_AND_PASSES_MCUSR 0
96
101#define CPU_ATMEGA_CLK_SCALE_INIT CPU_ATMEGA_CLK_SCALE_DIV1
103
108#define BTN0_PIN GPIO_PIN(PORT_B, 0)
109#define BTN0_MODE GPIO_IN
111
112#ifdef __cplusplus
113}
114#endif
115
Low-level GPIO peripheral driver interface definitions.