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 Thomas Stilwell <stilwellt@openlabs.co>
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
22
#include "cpu.h"
23
#include "
periph_conf.h
"
24
25
#ifdef __cplusplus
26
extern
"C"
27
{
28
#endif
29
30
/*
31
* NMI shares a pin with DAC output and ADC input. Holding the pin low during
32
* reset will cause a hang unless NMI is disabled. It can be enabled in
33
* applications where the pin is not held low during reset.
34
*/
35
#define KINETIS_FOPT 0xFB
/* disable NMI (0xFF to enable) */
36
41
#define LED0_PIN GPIO_PIN(PORT_B, 0)
42
#define LED0_MASK (1 << 0)
43
#define LED0_ON (GPIOB->PCOR = LED0_MASK)
44
#define LED0_OFF (GPIOB->PSOR = LED0_MASK)
45
#define LED0_TOGGLE (GPIOB->PTOR = LED0_MASK)
52
#if IS_ACTIVE(KINETIS_XTIMER_SOURCE_PIT)
53
/* PIT xtimer configuration */
54
#define XTIMER_DEV (TIMER_PIT_DEV(0))
55
#define XTIMER_CHAN (0)
56
/* Default xtimer settings should work on the PIT */
57
#else
58
/* LPTMR xtimer configuration */
59
#define XTIMER_DEV (TIMER_LPTMR_DEV(0))
60
#define XTIMER_CHAN (0)
61
/* LPTMR is 16 bits wide and runs at 32768 Hz (clocked by the RTC) */
62
#define XTIMER_WIDTH (16)
63
#define XTIMER_BACKOFF (16)
64
#define XTIMER_ISR_BACKOFF (5)
65
#define XTIMER_HZ (32768ul)
66
#endif
74
#ifndef PTB3_OUTPUT_OSC32K
75
#define PTB3_OUTPUT_OSC32K (0)
76
#endif
77
83
#ifndef PTB3_OUTPUT_OSCERCLK
84
#define PTB3_OUTPUT_OSCERCLK (0)
85
#endif
86
87
#ifdef __cplusplus
88
}
89
#endif
90
periph_conf.h
Peripheral MCU configuration for the Zigduino board.
Generated on Thu Jun 26 2025 14:14:43 by
1.9.1