board.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2019 ML!PA Consulting GmbH
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 "at24mac.h"
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
34 #define AT24MAC_PARAM_I2C_DEV I2C_DEV(1)
35 #define AT24MAC_PARAM_I2C_ADDR (0x5E)
36 #define AT24MAC_PARAM_TYPE AT24MAC4XX
37 #define AT24CXXX_PARAM_ADDR (0x56)
38 
44 #define ATCA_PARAM_I2C I2C_DEV(1)
45 
50 static inline int _at24mac_get_eui48(const void *arg, eui48_t *addr)
51 {
52  return at24mac_get_eui48((uintptr_t)arg, addr);
53 }
54 
60 #define EUI48_PROVIDER_FUNC _at24mac_get_eui48
61 
67 #define LED0_PIN GPIO_PIN(PC, 18)
68 
69 #define LED_PORT PORT->Group[PC]
70 #define LED0_MASK (1 << 18)
71 
72 #define LED0_ON (LED_PORT.OUTCLR.reg = LED0_MASK)
73 #define LED0_OFF (LED_PORT.OUTSET.reg = LED0_MASK)
74 #define LED0_TOGGLE (LED_PORT.OUTTGL.reg = LED0_MASK)
75 
81 #define BTN0_PORT PORT->Group[PB]
82 #define BTN0_PIN GPIO_PIN(PB, 31)
83 #define BTN0_MODE GPIO_IN_PU
84 
90 #define XTIMER_WIDTH (32)
91 #define XTIMER_HZ (1000000ul)
92 
97 void board_init(void);
98 
99 #ifdef __cplusplus
100 }
101 #endif
102 
103 #endif /* BOARD_H */
104 
_at24mac_get_eui48
static int _at24mac_get_eui48(const void *arg, eui48_t *addr)
AT24Mac provides a EUI-48.
Definition: board.h:50
eui48_t
Data type to represent an EUI-48.
Definition: eui48.h:35
at24mac_get_eui48
int at24mac_get_eui48(at24mac_t dev, eui48_t *addr)
Get the unique EUI48 address from a AT24MAC4xx chip.
board_init
void board_init(void)
Board level initialization.
at24mac.h