mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
boards: slwstk6000b: add support
This commit is contained in:
parent
b40cf3075e
commit
2a8712a04f
5
boards/slwstk6000b/Makefile
Normal file
5
boards/slwstk6000b/Makefile
Normal file
@ -0,0 +1,5 @@
|
||||
MODULE = board
|
||||
|
||||
DIRS = $(RIOTBOARD)/common/silabs
|
||||
|
||||
include $(RIOTBASE)/Makefile.base
|
9
boards/slwstk6000b/Makefile.dep
Normal file
9
boards/slwstk6000b/Makefile.dep
Normal file
@ -0,0 +1,9 @@
|
||||
ifneq (,$(filter saul_default,$(USEMODULE)))
|
||||
USEMODULE += saul_gpio
|
||||
USEMODULE += si7021
|
||||
endif
|
||||
|
||||
# include board common dependencies
|
||||
include $(RIOTBOARD)/common/silabs/Makefile.dep
|
||||
|
||||
include $(RIOTCPU)/efm32/Makefile.dep
|
14
boards/slwstk6000b/Makefile.features
Normal file
14
boards/slwstk6000b/Makefile.features
Normal file
@ -0,0 +1,14 @@
|
||||
# Put defined MCU peripherals here (in alphabetical order)
|
||||
FEATURES_PROVIDED += periph_adc
|
||||
FEATURES_PROVIDED += periph_gpio
|
||||
FEATURES_PROVIDED += periph_i2c
|
||||
FEATURES_PROVIDED += periph_rtc
|
||||
FEATURES_PROVIDED += periph_rtt
|
||||
FEATURES_PROVIDED += periph_spi
|
||||
FEATURES_PROVIDED += periph_timer
|
||||
FEATURES_PROVIDED += periph_uart
|
||||
|
||||
# The board MPU family (used for grouping by the CI system)
|
||||
FEATURES_MCU_GROUP = cortex_m4_2
|
||||
|
||||
-include $(RIOTCPU)/efm32/Makefile.features
|
27
boards/slwstk6000b/Makefile.include
Normal file
27
boards/slwstk6000b/Makefile.include
Normal file
@ -0,0 +1,27 @@
|
||||
include $(RIOTBOARD)/slwstk6000b/module-info.mk
|
||||
|
||||
# add module specific includes
|
||||
export INCLUDES += -I$(RIOTBOARD)/slwstk6000b/modules/$(BOARD_MODULE)/include
|
||||
|
||||
# define the cpu used by SLWSTK6000B
|
||||
export CPU = efm32
|
||||
export CPU_MODEL = $(MODULE_CPU)
|
||||
|
||||
# set default port depending on operating system
|
||||
PORT_LINUX ?= /dev/ttyACM0
|
||||
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*)))
|
||||
|
||||
# setup serial terminal
|
||||
include $(RIOTMAKE)/tools/serial.inc.mk
|
||||
|
||||
# setup JLink for flashing
|
||||
export JLINK_DEVICE := $(MODULE_JLINK_DEVICE)
|
||||
include $(RIOTMAKE)/tools/jlink.inc.mk
|
||||
|
||||
# add board common drivers
|
||||
USEMODULE += boards_common_silabs
|
||||
USEMODULE += silabs_aem
|
||||
USEMODULE += silabs_bc
|
||||
|
||||
# include board common
|
||||
include $(RIOTBOARD)/common/silabs/Makefile.include
|
39
boards/slwstk6000b/board.c
Normal file
39
boards/slwstk6000b/board.c
Normal file
@ -0,0 +1,39 @@
|
||||
/*
|
||||
* Copyright (C) 2015-2018 Freie Universität Berlin
|
||||
*
|
||||
* This file is subject to the terms and conditions of the GNU Lesser
|
||||
* General Public License v2.1. See the file LICENSE in the top level
|
||||
* directory for more details.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ingroup boards_slwstk6000b
|
||||
* @{
|
||||
*
|
||||
* @file
|
||||
* @brief Board specific implementations SLWSTK6000B board
|
||||
*
|
||||
* @author Hauke Petersen <hauke.petersen@fu-berlin.de>
|
||||
* @author Bas Stottelaar <basstottelaar@gmail.com>
|
||||
*
|
||||
* @}
|
||||
*/
|
||||
|
||||
#include "board.h"
|
||||
#include "board_common.h"
|
||||
#include "periph/gpio.h"
|
||||
|
||||
void board_init(void)
|
||||
{
|
||||
/* initialize the CPU */
|
||||
cpu_init();
|
||||
|
||||
/* perform common board initialization */
|
||||
board_common_init();
|
||||
|
||||
#ifdef MODULE_SI7021
|
||||
/* initialize the Si7021 sensor */
|
||||
gpio_init(SI7021_EN_PIN, GPIO_OUT);
|
||||
gpio_set(SI7021_EN_PIN);
|
||||
#endif
|
||||
}
|
117
boards/slwstk6000b/include/board.h
Normal file
117
boards/slwstk6000b/include/board.h
Normal file
@ -0,0 +1,117 @@
|
||||
/*
|
||||
* Copyright (C) 2015-2018 Freie Universität Berlin
|
||||
*
|
||||
* This file is subject to the terms and conditions of the GNU Lesser
|
||||
* General Public License v2.1. See the file LICENSE in the top level
|
||||
* directory for more details.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup boards_slwstk6000b Silicon Labs SLWSTK6000B starter kit
|
||||
* @ingroup boards
|
||||
* @brief Support for the Silicon Labs SLWSTK6000B starter kit
|
||||
* @{
|
||||
*
|
||||
* @file
|
||||
* @brief Board specific definitions for the SLWSTK6000B starter kit
|
||||
*
|
||||
* @author Hauke Petersen <hauke.petersen@fu-berlin.de>
|
||||
* @author Bas Stottelaar <basstottelaar@gmail.com>
|
||||
* @author Kai Beckmann <kai.beckmann@hs-rm.de>
|
||||
*/
|
||||
|
||||
#ifndef BOARD_H
|
||||
#define BOARD_H
|
||||
|
||||
#include "cpu.h"
|
||||
#include "periph_conf.h"
|
||||
#include "periph/gpio.h"
|
||||
#include "periph/spi.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @name Xtimer configuration
|
||||
*
|
||||
* The timer runs at 250 KHz to increase accuracy.
|
||||
* @{
|
||||
*/
|
||||
#define XTIMER_HZ (250000UL)
|
||||
#define XTIMER_WIDTH (16)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name Board controller configuration
|
||||
*
|
||||
* Define the GPIO pin to enable the BC, to allow serial communication
|
||||
* via the USB port.
|
||||
* @{
|
||||
*/
|
||||
#define BC_PIN MODULE_PIN_F5
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name Push button pin definitions
|
||||
* @{
|
||||
*/
|
||||
#define PB0_PIN MODULE_PIN_F12
|
||||
#define PB1_PIN MODULE_PIN_F13
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name LED pin definitions
|
||||
* @{
|
||||
*/
|
||||
#define LED0_PIN MODULE_PIN_F10
|
||||
#define LED1_PIN MODULE_PIN_F11
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name Macros for controlling the on-board LEDs
|
||||
* @{
|
||||
*/
|
||||
#define LED0_ON gpio_set(LED0_PIN)
|
||||
#define LED0_OFF gpio_clear(LED0_PIN)
|
||||
#define LED0_TOGGLE gpio_toggle(LED0_PIN)
|
||||
#define LED1_ON gpio_set(LED1_PIN)
|
||||
#define LED1_OFF gpio_clear(LED1_PIN)
|
||||
#define LED1_TOGGLE gpio_toggle(LED1_PIN)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name Display configuration
|
||||
*
|
||||
* Connection to the on-board Sharp Memory LCD (LS013B7DH03).
|
||||
* @{
|
||||
*/
|
||||
#define DISP_SPI SPI_DEV(0)
|
||||
#define DISP_COM_PIN MODULE_PIN_F18
|
||||
#define DISP_CS_PIN MODULE_PIN_F17
|
||||
#define DISP_EN_PIN MODULE_PIN_F14
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name Temperature sensor configuration
|
||||
*
|
||||
* Connection to the on-board temperature/humidity sensor (Si7021).
|
||||
* @{
|
||||
*/
|
||||
#define SI7021_I2C I2C_DEV(0)
|
||||
#define SI7021_EN_PIN MODULE_PIN_P37
|
||||
|
||||
#define SI70XX_PARAM_I2C_DEV SI7021_I2C
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @brief Initialize the board (GPIO, sensors, clocks).
|
||||
*/
|
||||
void board_init(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* BOARD_H */
|
||||
/** @} */
|
63
boards/slwstk6000b/include/gpio_params.h
Normal file
63
boards/slwstk6000b/include/gpio_params.h
Normal file
@ -0,0 +1,63 @@
|
||||
/*
|
||||
* Copyright (C) 2016-2017 Bas Stottelaar <basstottelaar@gmail.com>
|
||||
*
|
||||
* This file is subject to the terms and conditions of the GNU Lesser
|
||||
* General Public License v2.1. See the file LICENSE in the top level
|
||||
* directory for more details.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ingroup boards_slwstk6000b
|
||||
* @{
|
||||
*
|
||||
* @file
|
||||
* @brief Board specific configuration of direct mapped GPIOs
|
||||
*
|
||||
* @author Bas Stottelaar <basstottelaar@gmail.com>
|
||||
*/
|
||||
|
||||
#ifndef GPIO_PARAMS_H
|
||||
#define GPIO_PARAMS_H
|
||||
|
||||
#include "board.h"
|
||||
#include "saul/periph.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief GPIO pin configuration
|
||||
*/
|
||||
static const saul_gpio_params_t saul_gpio_params[] =
|
||||
{
|
||||
{
|
||||
.name = "LED 0",
|
||||
.pin = LED0_PIN,
|
||||
.mode = GPIO_OUT
|
||||
},
|
||||
{
|
||||
.name = "LED 1",
|
||||
.pin = LED1_PIN,
|
||||
.mode = GPIO_OUT
|
||||
},
|
||||
{
|
||||
.name = "Button 1",
|
||||
.pin = PB0_PIN,
|
||||
.mode = GPIO_IN_PU,
|
||||
.flags = SAUL_GPIO_INVERTED
|
||||
},
|
||||
{
|
||||
.name = "Button 2",
|
||||
.pin = PB1_PIN,
|
||||
.mode = GPIO_IN_PU,
|
||||
.flags = SAUL_GPIO_INVERTED
|
||||
}
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* GPIO_PARAMS_H */
|
||||
/** @} */
|
194
boards/slwstk6000b/include/periph_conf.h
Normal file
194
boards/slwstk6000b/include/periph_conf.h
Normal file
@ -0,0 +1,194 @@
|
||||
/*
|
||||
* Copyright (C) 2015-2018 Freie Universität Berlin
|
||||
*
|
||||
* This file is subject to the terms and conditions of the GNU Lesser
|
||||
* General Public License v2.1. See the file LICENSE in the top level
|
||||
* directory for more details.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ingroup boards_slwstk6000b
|
||||
* @{
|
||||
*
|
||||
* @file
|
||||
* @brief Configuration of CPU peripherals for the SLWSTK6000B starter kit
|
||||
*
|
||||
* @author Hauke Petersen <hauke.petersen@fu-berlin.de>
|
||||
* @author Bas Stottelaar <basstottelaar@gmail.com>
|
||||
* @author Kai Beckmann <kai.beckmann@hs-rm.de>
|
||||
*/
|
||||
|
||||
#ifndef PERIPH_CONF_H
|
||||
#define PERIPH_CONF_H
|
||||
|
||||
#include "cpu.h"
|
||||
#include "periph_cpu.h"
|
||||
#include "em_cmu.h"
|
||||
#include "board_module.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Internal macro to calculate *_NUMOF based on config.
|
||||
*/
|
||||
#define PERIPH_NUMOF(config) (sizeof(config) / sizeof(config[0]))
|
||||
|
||||
/**
|
||||
* @name Clock configuration
|
||||
* @{
|
||||
*/
|
||||
#ifndef CLOCK_HF
|
||||
#define CLOCK_HF cmuSelect_HFXO
|
||||
#endif
|
||||
#ifndef CLOCK_CORE_DIV
|
||||
#define CLOCK_CORE_DIV cmuClkDiv_1
|
||||
#endif
|
||||
#ifndef CLOCK_LFA
|
||||
#define CLOCK_LFA cmuSelect_LFRCO
|
||||
#endif
|
||||
#ifndef CLOCK_LFB
|
||||
#define CLOCK_LFB cmuSelect_LFRCO
|
||||
#endif
|
||||
#ifndef CLOCK_LFE
|
||||
#define CLOCK_LFE cmuSelect_LFRCO
|
||||
#endif
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name ADC configuration
|
||||
* @{
|
||||
*/
|
||||
static const adc_conf_t adc_config[] = {
|
||||
{
|
||||
.dev = ADC0,
|
||||
.cmu = cmuClock_ADC0,
|
||||
}
|
||||
};
|
||||
|
||||
static const adc_chan_conf_t adc_channel_config[] = {
|
||||
{
|
||||
.dev = 0,
|
||||
.input = adcPosSelTEMP,
|
||||
.reference = adcRef1V25,
|
||||
.acq_time = adcAcqTime8
|
||||
},
|
||||
{
|
||||
.dev = 0,
|
||||
.input = adcPosSelAVDD,
|
||||
.reference = adcRef5V,
|
||||
.acq_time = adcAcqTime8
|
||||
}
|
||||
};
|
||||
|
||||
#define ADC_DEV_NUMOF PERIPH_NUMOF(adc_config)
|
||||
#define ADC_NUMOF PERIPH_NUMOF(adc_channel_config)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name I2C configuration
|
||||
* @{
|
||||
*/
|
||||
static const i2c_conf_t i2c_config[] = {
|
||||
{
|
||||
.dev = I2C0,
|
||||
.sda_pin = MODULE_PIN_P13,
|
||||
.scl_pin = MODULE_PIN_P12,
|
||||
.loc = I2C_ROUTELOC0_SDALOC_LOC16 |
|
||||
I2C_ROUTELOC0_SCLLOC_LOC14,
|
||||
.cmu = cmuClock_I2C0,
|
||||
.irq = I2C0_IRQn
|
||||
}
|
||||
};
|
||||
|
||||
#define I2C_NUMOF PERIPH_NUMOF(i2c_config)
|
||||
#define I2C_0_ISR isr_i2c0
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @brief RTC configuration
|
||||
*/
|
||||
#define RTC_NUMOF (1U)
|
||||
|
||||
/**
|
||||
* @name RTT configuration
|
||||
* @{
|
||||
*/
|
||||
#define RTT_NUMOF (1U)
|
||||
|
||||
#define RTT_MAX_VALUE (0xFFFFFFFF)
|
||||
#define RTT_FREQUENCY (1U)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name SPI configuration
|
||||
* @{
|
||||
*/
|
||||
static const spi_dev_t spi_config[] = {
|
||||
{
|
||||
.dev = USART1,
|
||||
.mosi_pin = MODULE_PIN_F16,
|
||||
.miso_pin = MODULE_PIN_P3,
|
||||
.clk_pin = MODULE_PIN_F15,
|
||||
.loc = USART_ROUTELOC0_RXLOC_LOC11 |
|
||||
USART_ROUTELOC0_TXLOC_LOC11 |
|
||||
USART_ROUTELOC0_CLKLOC_LOC11,
|
||||
.cmu = cmuClock_USART1,
|
||||
.irq = USART1_RX_IRQn
|
||||
}
|
||||
};
|
||||
|
||||
#define SPI_NUMOF PERIPH_NUMOF(spi_config)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name Timer configuration
|
||||
*
|
||||
* The implementation uses two timers in cascade mode.
|
||||
* @{
|
||||
*/
|
||||
static const timer_conf_t timer_config[] = {
|
||||
{
|
||||
{
|
||||
.dev = TIMER0,
|
||||
.cmu = cmuClock_TIMER0
|
||||
},
|
||||
{
|
||||
.dev = TIMER1,
|
||||
.cmu = cmuClock_TIMER1
|
||||
},
|
||||
.irq = TIMER1_IRQn
|
||||
}
|
||||
};
|
||||
|
||||
#define TIMER_NUMOF PERIPH_NUMOF(timer_config)
|
||||
#define TIMER_0_ISR isr_timer1
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name UART configuration
|
||||
* @{
|
||||
*/
|
||||
static const uart_conf_t uart_config[] = {
|
||||
{
|
||||
.dev = USART0,
|
||||
.rx_pin = MODULE_PIN_F7,
|
||||
.tx_pin = MODULE_PIN_F6,
|
||||
.loc = USART_ROUTELOC0_RXLOC_LOC0 |
|
||||
USART_ROUTELOC0_TXLOC_LOC0,
|
||||
.cmu = cmuClock_USART0,
|
||||
.irq = USART0_RX_IRQn
|
||||
}
|
||||
};
|
||||
|
||||
#define UART_NUMOF PERIPH_NUMOF(uart_config)
|
||||
#define UART_0_ISR_RX isr_usart0_rx
|
||||
/** @} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* PERIPH_CONF_H */
|
||||
/** @} */
|
20
boards/slwstk6000b/module-info.mk
Normal file
20
boards/slwstk6000b/module-info.mk
Normal file
@ -0,0 +1,20 @@
|
||||
# Define the default board module.
|
||||
BOARD_MODULE ?= slwrb4162a
|
||||
|
||||
# Find the header file that should exist if the module is supported.
|
||||
MODULE_HEADER = $(wildcard $(RIOTBOARD)/slwstk6000b/modules/$(BOARD_MODULE)/include/board_module.h)
|
||||
|
||||
ifeq (,$(MODULE_HEADER))
|
||||
$(error Header file for $(BOARD_MODULE) is missing)
|
||||
endif
|
||||
|
||||
# Lookup up CPU information using grep.
|
||||
MODULE_INFO = $(shell grep $(BOARD_MODULE) $(RIOTBOARD)/slwstk6000b/modules.txt)
|
||||
|
||||
ifeq (,$(MODULE_INFO))
|
||||
$(error Unable to read module information for $(BOARD_MODULE))
|
||||
endif
|
||||
|
||||
# Export variables to use in this build.
|
||||
export MODULE_CPU = $(word 2, $(MODULE_INFO))
|
||||
export MODULE_JLINK_DEVICE = $(word 3, $(MODULE_INFO))
|
24
boards/slwstk6000b/modules.txt
Normal file
24
boards/slwstk6000b/modules.txt
Normal file
@ -0,0 +1,24 @@
|
||||
# This file contains the supported modules by the SLWSTK6000B wireless starter
|
||||
# kit. See Silicon Labs website for more information.
|
||||
|
||||
# The intended usage is to grep for the exact module name, and split by spaces
|
||||
# to get the required information.
|
||||
|
||||
# Module - CPU - JLink Device
|
||||
slwrb4150a efr32mg1p233f256gm48 efr32mg1pxxxf256
|
||||
slwrb4150b efr32mg1p233f256gm48 efr32mg1pxxxf256
|
||||
slwrb4151a efr32mg1p232f256gm48 efr32mg1pxxxf256
|
||||
slwrb4152a efr32mg1p232f256gm48 efr32mg1pxxxf256
|
||||
slwrb4153a efr32mg1p132f256gm48 efr32mg1pxxxf256
|
||||
slwrb4154a efr32mg1p732f256gm32 efr32mg1pxxxf256
|
||||
slwrb4158a efr32mg13p733f512gm48 efr32mg13p733f512gm48
|
||||
slwrb4159a efr32mg13p632f512gm48 efr32mg13p632f512gm48
|
||||
slwrb4161a efr32mg12p432f1024gl125 efr32mg12p432f1024gl125
|
||||
slwrb4162a efr32mg12p332f1024gl125 efr32mg12p332f1024gl125
|
||||
slwrb4163a efr32mg12p433f1024gl125 efr32mg12p433f1024gl125
|
||||
slwrb4164a efr32mg12p433f1024gl125 efr32mg12p433f1024gl125
|
||||
slwrb4167a efr32mg13p733f512gm48 efr32mg13p733f512gm48
|
||||
slwrb4168a efr32mg13p732f512gm48 efr32mg13p732f512gm48
|
||||
slwrb4169a efr32mg14p733f256gm48 efr32mg14p733f256gm48
|
||||
slwrb4169b efr32mg14p733f256gm48 efr32mg14p733f256gm48
|
||||
slwrb4170a efr32mg12p433f1024gm68 efr32mg12p433f1024gm68
|
111
boards/slwstk6000b/modules/slwrb4150a/include/board_module.h
Normal file
111
boards/slwstk6000b/modules/slwrb4150a/include/board_module.h
Normal file
@ -0,0 +1,111 @@
|
||||
/*
|
||||
* Copyright (C) 2018 Bas Stottelaar <basstottelaar@gmail.com>
|
||||
*
|
||||
* This file is subject to the terms and conditions of the GNU Lesser
|
||||
* General Public License v2.1. See the file LICENSE in the top level
|
||||
* directory for more details.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ingroup boards_slwstk6000b
|
||||
* @{
|
||||
*
|
||||
* @file
|
||||
* @brief Specific definitions for SLWRB4150A module.
|
||||
*
|
||||
*
|
||||
* @author Bas Stottelaar <basstottelaar@gmail.com>
|
||||
*/
|
||||
|
||||
#ifndef BOARD_MODULE_H
|
||||
#define BOARD_MODULE_H
|
||||
|
||||
#include "periph/gpio.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @name Pins on the SLWRB4150A module.
|
||||
*
|
||||
* @note The pin numbers refer to the board module, not the base board.
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
#define MODULE_PIN_F0 GPIO_PIN(PF, 1)
|
||||
#define MODULE_PIN_F1 GPIO_PIN(PF, 0)
|
||||
#define MODULE_PIN_F2 GPIO_PIN(PF, 2)
|
||||
#define MODULE_PIN_F3 GPIO_PIN(PF, 3)
|
||||
#define MODULE_PIN_F4 GPIO_UNDEF
|
||||
#define MODULE_PIN_F5 GPIO_PIN(PA, 5)
|
||||
#define MODULE_PIN_F6 GPIO_PIN(PA, 0)
|
||||
#define MODULE_PIN_F7 GPIO_PIN(PA, 1)
|
||||
#define MODULE_PIN_F8 GPIO_PIN(PA, 2)
|
||||
#define MODULE_PIN_F9 GPIO_PIN(PA, 3)
|
||||
#define MODULE_PIN_F10 GPIO_PIN(PF, 4)
|
||||
#define MODULE_PIN_F11 GPIO_PIN(PF, 5)
|
||||
#define MODULE_PIN_F12 GPIO_PIN(PF, 6)
|
||||
#define MODULE_PIN_F13 GPIO_PIN(PF, 7)
|
||||
#define MODULE_PIN_F14 GPIO_PIN(PD, 15)
|
||||
#define MODULE_PIN_F15 GPIO_PIN(PC, 8)
|
||||
#define MODULE_PIN_F16 GPIO_PIN(PC, 6)
|
||||
#define MODULE_PIN_F17 GPIO_PIN(PD, 15)
|
||||
#define MODULE_PIN_F18 GPIO_PIN(PD, 13)
|
||||
#define MODULE_PIN_F19 GPIO_PIN(PB, 13)
|
||||
#define MODULE_PIN_F20 GPIO_PIN(PB, 12)
|
||||
#define MODULE_PIN_F21 GPIO_PIN(PB, 11)
|
||||
#define MODULE_PIN_P0 GPIO_PIN(PA, 2)
|
||||
#define MODULE_PIN_P1 GPIO_PIN(PC, 6)
|
||||
#define MODULE_PIN_P2 GPIO_PIN(PA, 3)
|
||||
#define MODULE_PIN_P3 GPIO_PIN(PC, 7)
|
||||
#define MODULE_PIN_P4 GPIO_PIN(PF, 6)
|
||||
#define MODULE_PIN_P5 GPIO_PIN(PC, 8)
|
||||
#define MODULE_PIN_P6 GPIO_PIN(PF, 7)
|
||||
#define MODULE_PIN_P7 GPIO_PIN(PC, 9)
|
||||
#define MODULE_PIN_P8 GPIO_PIN(PF, 4)
|
||||
#define MODULE_PIN_P9 GPIO_PIN(PA, 0)
|
||||
#define MODULE_PIN_P10 GPIO_PIN(PF, 3)
|
||||
#define MODULE_PIN_P11 GPIO_PIN(PA, 1)
|
||||
#define MODULE_PIN_P12 GPIO_PIN(PC, 10)
|
||||
#define MODULE_PIN_P13 GPIO_PIN(PC, 11)
|
||||
#define MODULE_PIN_P14 GPIO_PIN(PA, 4)
|
||||
#define MODULE_PIN_P15 GPIO_UNDEF
|
||||
#define MODULE_PIN_P16 GPIO_PIN(PA, 5)
|
||||
#define MODULE_PIN_P17 GPIO_UNDEF
|
||||
#define MODULE_PIN_P18 GPIO_PIN(PB, 11)
|
||||
#define MODULE_PIN_P19 GPIO_UNDEF
|
||||
#define MODULE_PIN_P20 GPIO_PIN(PB, 12)
|
||||
#define MODULE_PIN_P21 GPIO_UNDEF
|
||||
#define MODULE_PIN_P22 GPIO_PIN(PB, 13)
|
||||
#define MODULE_PIN_P23 GPIO_UNDEF
|
||||
#define MODULE_PIN_P24 GPIO_PIN(PF, 0)
|
||||
#define MODULE_PIN_P25 GPIO_UNDEF
|
||||
#define MODULE_PIN_P26 GPIO_PIN(PF, 1)
|
||||
#define MODULE_PIN_P27 GPIO_UNDEF
|
||||
#define MODULE_PIN_P28 GPIO_PIN(PF, 2)
|
||||
#define MODULE_PIN_P29 GPIO_UNDEF
|
||||
#define MODULE_PIN_P30 GPIO_UNDEF
|
||||
#define MODULE_PIN_P31 GPIO_PIN(PD, 13)
|
||||
#define MODULE_PIN_P32 GPIO_PIN(PF, 5)
|
||||
#define MODULE_PIN_P33 GPIO_PIN(PD, 14)
|
||||
#define MODULE_PIN_P34 GPIO_UNDEF
|
||||
#define MODULE_PIN_P35 GPIO_PIN(PD, 15)
|
||||
#define MODULE_PIN_P36 GPIO_UNDEF
|
||||
#define MODULE_PIN_P37 GPIO_PIN(PD, 15)
|
||||
#define MODULE_PIN_P38 GPIO_UNDEF
|
||||
#define MODULE_PIN_P39 GPIO_UNDEF
|
||||
#define MODULE_PIN_P40 GPIO_UNDEF
|
||||
#define MODULE_PIN_P41 GPIO_UNDEF
|
||||
#define MODULE_PIN_P42 GPIO_UNDEF
|
||||
#define MODULE_PIN_P43 GPIO_UNDEF
|
||||
#define MODULE_PIN_P44 GPIO_UNDEF
|
||||
#define MODULE_PIN_P45 GPIO_UNDEF
|
||||
/** @} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* BOARD_MODULE_H */
|
||||
/** @} */
|
111
boards/slwstk6000b/modules/slwrb4162a/include/board_module.h
Normal file
111
boards/slwstk6000b/modules/slwrb4162a/include/board_module.h
Normal file
@ -0,0 +1,111 @@
|
||||
/*
|
||||
* Copyright (C) 2018 Bas Stottelaar <basstottelaar@gmail.com>
|
||||
*
|
||||
* This file is subject to the terms and conditions of the GNU Lesser
|
||||
* General Public License v2.1. See the file LICENSE in the top level
|
||||
* directory for more details.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ingroup boards_slwstk6000b
|
||||
* @{
|
||||
*
|
||||
* @file
|
||||
* @brief Specific definitions for SLWRB4162A module.
|
||||
*
|
||||
*
|
||||
* @author Bas Stottelaar <basstottelaar@gmail.com>
|
||||
*/
|
||||
|
||||
#ifndef BOARD_MODULE_H
|
||||
#define BOARD_MODULE_H
|
||||
|
||||
#include "periph/gpio.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @name Pins on the SLWRB4162A module.
|
||||
*
|
||||
* @note The pin numbers refer to the board module, not the base board.
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
#define MODULE_PIN_F0 GPIO_PIN(PF, 1)
|
||||
#define MODULE_PIN_F1 GPIO_PIN(PF, 0)
|
||||
#define MODULE_PIN_F2 GPIO_PIN(PF, 2)
|
||||
#define MODULE_PIN_F3 GPIO_PIN(PF, 3)
|
||||
#define MODULE_PIN_F4 GPIO_UNDEF
|
||||
#define MODULE_PIN_F5 GPIO_PIN(PA, 5)
|
||||
#define MODULE_PIN_F6 GPIO_PIN(PA, 0)
|
||||
#define MODULE_PIN_F7 GPIO_PIN(PA, 1)
|
||||
#define MODULE_PIN_F8 GPIO_PIN(PA, 2)
|
||||
#define MODULE_PIN_F9 GPIO_PIN(PA, 3)
|
||||
#define MODULE_PIN_F10 GPIO_PIN(PF, 4)
|
||||
#define MODULE_PIN_F11 GPIO_PIN(PF, 5)
|
||||
#define MODULE_PIN_F12 GPIO_PIN(PF, 6)
|
||||
#define MODULE_PIN_F13 GPIO_PIN(PF, 7)
|
||||
#define MODULE_PIN_F14 GPIO_PIN(PD, 15)
|
||||
#define MODULE_PIN_F15 GPIO_PIN(PC, 8)
|
||||
#define MODULE_PIN_F16 GPIO_PIN(PC, 6)
|
||||
#define MODULE_PIN_F17 GPIO_PIN(PD, 14)
|
||||
#define MODULE_PIN_F18 GPIO_PIN(PD, 13)
|
||||
#define MODULE_PIN_F19 GPIO_PIN(PB, 12)
|
||||
#define MODULE_PIN_F20 GPIO_PIN(PB, 12)
|
||||
#define MODULE_PIN_F21 GPIO_PIN(PB, 11)
|
||||
#define MODULE_PIN_P0 GPIO_PIN(PD, 8)
|
||||
#define MODULE_PIN_P1 GPIO_PIN(PA, 6)
|
||||
#define MODULE_PIN_P2 GPIO_PIN(PD, 9)
|
||||
#define MODULE_PIN_P3 GPIO_PIN(PA, 7)
|
||||
#define MODULE_PIN_P4 GPIO_PIN(PD, 10)
|
||||
#define MODULE_PIN_P5 GPIO_PIN(PA, 8)
|
||||
#define MODULE_PIN_P6 GPIO_PIN(PD, 11)
|
||||
#define MODULE_PIN_P7 GPIO_PIN(PA, 9)
|
||||
#define MODULE_PIN_P8 GPIO_PIN(PD, 12)
|
||||
#define MODULE_PIN_P9 GPIO_PIN(PB, 6)
|
||||
#define MODULE_PIN_P10 GPIO_PIN(PC, 9)
|
||||
#define MODULE_PIN_P11 GPIO_PIN(PB, 7)
|
||||
#define MODULE_PIN_P12 GPIO_PIN(PC, 10)
|
||||
#define MODULE_PIN_P13 GPIO_PIN(PC, 11)
|
||||
#define MODULE_PIN_P14 GPIO_PIN(PB, 8)
|
||||
#define MODULE_PIN_P15 GPIO_PIN(PB, 9)
|
||||
#define MODULE_PIN_P16 GPIO_PIN(PC, 4)
|
||||
#define MODULE_PIN_P17 GPIO_PIN(PC, 5)
|
||||
#define MODULE_PIN_P18 GPIO_UNDEF
|
||||
#define MODULE_PIN_P19 GPIO_UNDEF
|
||||
#define MODULE_PIN_P20 GPIO_PIN(PF, 12)
|
||||
#define MODULE_PIN_P21 GPIO_PIN(PF, 14)
|
||||
#define MODULE_PIN_P22 GPIO_PIN(PF, 15)
|
||||
#define MODULE_PIN_P23 GPIO_PIN(PI, 0)
|
||||
#define MODULE_PIN_P24 GPIO_PIN(PI, 1)
|
||||
#define MODULE_PIN_P25 GPIO_PIN(PI, 2)
|
||||
#define MODULE_PIN_P26 GPIO_PIN(PI, 3)
|
||||
#define MODULE_PIN_P27 GPIO_PIN(PJ, 14)
|
||||
#define MODULE_PIN_P28 GPIO_PIN(PJ, 15)
|
||||
#define MODULE_PIN_P29 GPIO_PIN(PK, 0)
|
||||
#define MODULE_PIN_P30 GPIO_PIN(PK, 1)
|
||||
#define MODULE_PIN_P31 GPIO_PIN(PK, 2)
|
||||
#define MODULE_PIN_P32 GPIO_UNDEF
|
||||
#define MODULE_PIN_P33 GPIO_PIN(PA, 0)
|
||||
#define MODULE_PIN_P34 GPIO_PIN(PA, 1)
|
||||
#define MODULE_PIN_P35 GPIO_PIN(PA, 2)
|
||||
#define MODULE_PIN_P36 GPIO_PIN(PA, 3)
|
||||
#define MODULE_PIN_P37 GPIO_PIN(PB, 10)
|
||||
#define MODULE_PIN_P38 GPIO_UNDEF
|
||||
#define MODULE_PIN_P39 GPIO_UNDEF
|
||||
#define MODULE_PIN_P40 GPIO_UNDEF
|
||||
#define MODULE_PIN_P41 GPIO_PIN(PF, 8)
|
||||
#define MODULE_PIN_P42 GPIO_PIN(PF, 9)
|
||||
#define MODULE_PIN_P43 GPIO_PIN(PF, 10)
|
||||
#define MODULE_PIN_P44 GPIO_PIN(PF, 11)
|
||||
#define MODULE_PIN_P45 GPIO_PIN(PF, 12)
|
||||
/** @} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* BOARD_MODULE_H */
|
||||
/** @} */
|
Loading…
Reference in New Issue
Block a user