mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-24 22:13:52 +01:00
Merge pull request #13795 from francois-berder/pic32-saul
boards: pic32*: Add GPIO SAUL configuration
This commit is contained in:
commit
fdaf1ac6fe
3
boards/pic32-clicker/Makefile.dep
Normal file
3
boards/pic32-clicker/Makefile.dep
Normal file
@ -0,0 +1,3 @@
|
||||
ifneq (,$(filter saul_default,$(USEMODULE)))
|
||||
USEMODULE += saul_gpio
|
||||
endif
|
||||
51
boards/pic32-clicker/include/gpio_params.h
Normal file
51
boards/pic32-clicker/include/gpio_params.h
Normal file
@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright (C) 2020 Francois Berder
|
||||
*
|
||||
* 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_pic32-wifire
|
||||
* @{
|
||||
*
|
||||
* @file
|
||||
* @brief Configuration of SAUL mapped GPIO pins
|
||||
*
|
||||
* @author Francois Berder <fberder@outlook.fr>
|
||||
*/
|
||||
|
||||
#ifndef GPIO_PARAMS_H
|
||||
#define GPIO_PARAMS_H
|
||||
|
||||
#include "board.h"
|
||||
#include "saul/periph.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief GPIO configuration
|
||||
*/
|
||||
static const saul_gpio_params_t saul_gpio_params[] =
|
||||
{
|
||||
{
|
||||
.name = "LD1",
|
||||
.pin = LED1_PIN,
|
||||
.mode = GPIO_OUT,
|
||||
},
|
||||
{
|
||||
.name = "LD2",
|
||||
.pin = LED2_PIN,
|
||||
.mode = GPIO_OUT,
|
||||
},
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* GPIO_PARAMS_H */
|
||||
/** @} */
|
||||
3
boards/pic32-wifire/Makefile.dep
Normal file
3
boards/pic32-wifire/Makefile.dep
Normal file
@ -0,0 +1,3 @@
|
||||
ifneq (,$(filter saul_default,$(USEMODULE)))
|
||||
USEMODULE += saul_gpio
|
||||
endif
|
||||
60
boards/pic32-wifire/include/gpio_params.h
Normal file
60
boards/pic32-wifire/include/gpio_params.h
Normal file
@ -0,0 +1,60 @@
|
||||
/*
|
||||
* Copyright (C) 2020 Francois Berder
|
||||
*
|
||||
* 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_pic32-wifire
|
||||
* @{
|
||||
*
|
||||
* @file
|
||||
* @brief Configuration of SAUL mapped GPIO pins
|
||||
*
|
||||
* @author Francois Berder <fberder@outlook.fr>
|
||||
*/
|
||||
|
||||
#ifndef GPIO_PARAMS_H
|
||||
#define GPIO_PARAMS_H
|
||||
|
||||
#include "board.h"
|
||||
#include "saul/periph.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief GPIO configuration
|
||||
*/
|
||||
static const saul_gpio_params_t saul_gpio_params[] =
|
||||
{
|
||||
{
|
||||
.name = "LD1",
|
||||
.pin = LED1_PIN,
|
||||
.mode = GPIO_OUT,
|
||||
},
|
||||
{
|
||||
.name = "LD2",
|
||||
.pin = LED2_PIN,
|
||||
.mode = GPIO_OUT,
|
||||
},
|
||||
{
|
||||
.name = "LD3",
|
||||
.pin = LED3_PIN,
|
||||
.mode = GPIO_OUT,
|
||||
},
|
||||
{
|
||||
.name = "LD4",
|
||||
.pin = LED4_PIN,
|
||||
.mode = GPIO_OUT,
|
||||
},
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* GPIO_PARAMS_H */
|
||||
Loading…
x
Reference in New Issue
Block a user