arduino-mkrzero/include/board.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Inria
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 
22 #ifndef BOARD_H
23 #define BOARD_H
24 
25 #include "cpu.h"
26 #include "periph_conf.h"
27 #include "board_common.h"
28 #include "arduino_pinmap.h"
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
38 #define SDCARD_SPI_PARAM_SPI (SPI_DEV(1))
39 #define SDCARD_SPI_PARAM_CS (GPIO_PIN(PA, 14))
40 #define SDCARD_SPI_PARAM_CLK (GPIO_PIN(PA, 13))
41 #define SDCARD_SPI_PARAM_MOSI (GPIO_PIN(PA, 12))
42 #define SDCARD_SPI_PARAM_MISO (GPIO_PIN(PA, 15))
43 #define SDCARD_SPI_PARAM_POWER (GPIO_UNDEF)
44 
45 #define SDCARD_SPI_PARAM_POWER_AH (true)
46 
51 #define CARD_DETECT_PIN (GPIO_PIN(PA, 27))
52 
57 #define LED0_PIN GPIO_PIN(PB, 8)
58 
59 #define LED_PORT PORT->Group[PB]
60 #define LED0_MASK (1 << 8)
61 
62 #define LED0_ON (LED_PORT.OUTSET.reg = LED0_MASK)
63 #define LED0_OFF (LED_PORT.OUTCLR.reg = LED0_MASK)
64 #define LED0_TOGGLE (LED_PORT.OUTTGL.reg = LED0_MASK)
65 
67 #ifdef __cplusplus
68 }
69 #endif
70 
71 #endif /* BOARD_H */
72