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) 2017 Eistec AB
3
*
4
* This file is subject to the terms and conditions of the GNU Lesser General
5
* Public License v2.1. See the file LICENSE in the top level directory for more
6
* details.
7
*/
8
9
#pragma once
10
21
#include "cpu.h"
22
#include "board_common.h"
23
#include "
periph_conf.h
"
24
25
#ifdef __cplusplus
26
extern
"C"
27
{
28
#endif
29
34
#define LED0_PIN GPIO_PIN(PORT_B, 0)
35
#define LED0_MASK (1 << 0)
36
#define LED0_ON (GPIOB->PCOR = LED0_MASK)
37
#define LED0_OFF (GPIOB->PSOR = LED0_MASK)
38
#define LED0_TOGGLE (GPIOB->PTOR = LED0_MASK)
39
#define LED1_PIN GPIO_PIN(PORT_C, 1)
40
#define LED1_MASK (1 << 1)
41
#define LED1_ON (GPIOC->PCOR = LED1_MASK)
42
#define LED1_OFF (GPIOC->PSOR = LED1_MASK)
43
#define LED1_TOGGLE (GPIOC->PTOR = LED1_MASK)
44
#define LED2_PIN GPIO_PIN(PORT_A, 19)
45
#define LED2_MASK (1 << 19)
46
#define LED2_ON (GPIOA->PCOR = LED2_MASK)
47
#define LED2_OFF (GPIOA->PSOR = LED2_MASK)
48
#define LED2_TOGGLE (GPIOA->PTOR = LED2_MASK)
49
#define LED3_PIN GPIO_PIN(PORT_A, 18)
50
#define LED3_MASK (1 << 18)
51
#define LED3_ON (GPIOA->PCOR = LED3_MASK)
52
#define LED3_OFF (GPIOA->PSOR = LED3_MASK)
53
#define LED3_TOGGLE (GPIOA->PTOR = LED3_MASK)
60
/* SW3, SW4 will short these pins to ground when pushed but there are no
61
* external pull resistors, use internal pull-ups on the pins */
62
/* BTN0 is mapped to SW3 */
63
#define BTN0_PIN GPIO_PIN(PORT_C, 4)
64
#define BTN0_MODE GPIO_IN_PU
65
/* BTN1 is mapped to SW4 */
66
#define BTN1_PIN GPIO_PIN(PORT_C, 5)
67
#define BTN1_MODE GPIO_IN_PU
74
#if IS_ACTIVE(KINETIS_XTIMER_SOURCE_PIT)
75
/* PIT xtimer configuration */
76
#define XTIMER_DEV (TIMER_PIT_DEV(0))
77
#define XTIMER_CHAN (0)
78
/* Default xtimer settings should work on the PIT */
79
#else
80
/* LPTMR xtimer configuration */
81
#define XTIMER_DEV (TIMER_LPTMR_DEV(0))
82
#define XTIMER_CHAN (0)
83
/* LPTMR is 16 bits wide and runs at 32768 Hz (clocked by the RTC) */
84
#define XTIMER_WIDTH (16)
85
#define XTIMER_BACKOFF (5)
86
#define XTIMER_ISR_BACKOFF (5)
87
#define XTIMER_HZ (32768ul)
88
#endif
95
#define CONFIG_ZTIMER_USEC_TYPE ZTIMER_TYPE_PERIPH_TIMER
96
#define CONFIG_ZTIMER_USEC_DEV (TIMER_PIT_DEV(0))
103
#define FRDM_NOR_SPI_DEV SPI_DEV(0)
104
#define FRDM_NOR_SPI_CLK SPI_CLK_5MHZ
105
#define FRDM_NOR_SPI_CS SPI_HWCS(0)
112
#define FXOS8700_PARAM_I2C I2C_DEV(0)
113
#define FXOS8700_PARAM_ADDR 0x1F
116
#ifdef __cplusplus
117
}
118
#endif
119
periph_conf.h
Peripheral MCU configuration for the Zigduino board.
Generated on Fri Jun 20 2025 21:02:35 by
1.9.1