Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
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
20
#ifndef BOARD_H
21
#define BOARD_H
22
23
#include "cpu.h"
24
#include "
periph/gpio.h
"
25
26
#include "
at24mac.h
"
27
#include "
net/eui_provider.h
"
28
29
#ifdef __cplusplus
30
extern
"C"
{
31
#endif
32
37
#define AT24MAC_PARAM_I2C_DEV I2C_DEV(0)
38
#define AT24MAC_PARAM_TYPE AT24MAC6XX
39
44
static
inline
int
_at24mac_get_eui64
(
const
void
*arg,
eui64_t
*addr)
45
{
46
return
at24mac_get_eui64
((uintptr_t)arg, addr);
47
}
48
54
#define EUI64_PROVIDER_FUNC _at24mac_get_eui64
55
#define EUI64_PROVIDER_TYPE NETDEV_AT86RF2XX
56
#define EUI64_PROVIDER_INDEX 0
57
63
#define LED_PORT PORTE
64
#define LED_PORT_DDR DDRE
65
66
#define LED0_PIN GPIO_PIN(PORT_E, 4)
/* RED */
67
#define LED1_PIN GPIO_PIN(PORT_E, 3)
/* YELLOW */
68
69
#define LED0_MASK (1 << 4)
70
#define LED1_MASK (1 << 3)
71
72
#define LED0_MODE GPIO_OUT
73
#define LED0_OFF (LED_PORT |= LED0_MASK)
74
#define LED0_ON (LED_PORT &= ~LED0_MASK)
75
#define LED0_TOGGLE (LED_PORT ^= LED0_MASK)
76
77
#define LED1_MODE GPIO_OUT
78
#define LED1_OFF (LED_PORT |= LED1_MASK)
79
#define LED1_ON (LED_PORT &= ~LED1_MASK)
80
#define LED1_TOGGLE (LED_PORT ^= LED1_MASK)
81
82
87
#define LED_PANIC LED0_ON
88
95
#define DS18_PARAM_PIN GPIO_PIN(PORT_D, 7)
96
#define DS18_PARAM_PULL (GPIO_IN_PU)
97
102
#define XTIMER_DEV TIMER_DEV(0)
103
#define XTIMER_CHAN (0)
104
#define XTIMER_WIDTH (16)
105
#define XTIMER_HZ (62500UL)
106
115
#define BOOTLOADER_CLEARS_WATCHDOG_AND_PASSES_MCUSR 0
116
122
#define CPU_ATMEGA_CLK_SCALE_INIT CPU_ATMEGA_CLK_SCALE_DIV1
123
129
#define MODULE_ATMEGA_PCINT0
130
#define BTN0_PIN GPIO_PIN(PORT_B, 0)
131
#define BTN0_MODE GPIO_IN
132
137
void
board_init
(
void
);
138
139
#ifdef __cplusplus
140
}
141
#endif
142
143
#endif
/* BOARD_H */
144
at24mac_get_eui64
int at24mac_get_eui64(at24mac_t dev, eui64_t *addr)
Get the unique EUI64 address from a AT24MAC6xx chip.
eui_provider.h
EUI-48 and EUI-64 address provider.
gpio.h
Low-level GPIO peripheral driver interface definitions.
eui64_t
Data type to represent an EUI-64.
Definition:
eui64.h:55
board_init
void board_init(void)
Board level initialization.
_at24mac_get_eui64
static int _at24mac_get_eui64(const void *arg, eui64_t *addr)
AT24Mac provides a EUI-64, this is also printed on the board.
Definition:
board.h:44
at24mac.h
Generated on Tue Nov 24 2020 19:46:49 by
1.8.17