Skip to content

Commit

Permalink
boards/serpente: add SAUL PWM integration
Browse files Browse the repository at this point in the history
  • Loading branch information
maribu committed Feb 13, 2021
1 parent 3a9f8d5 commit 50b91f3
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 60 deletions.
2 changes: 1 addition & 1 deletion boards/serpente/Makefile.dep
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ ifneq (,$(filter mtd,$(USEMODULE)))
endif

ifneq (,$(filter saul_default,$(USEMODULE)))
USEMODULE += saul_gpio
USEMODULE += saul_pwm
endif

# setup the samd21 arduino bootloader related dependencies
Expand Down
59 changes: 0 additions & 59 deletions boards/serpente/include/gpio_params.h

This file was deleted.

48 changes: 48 additions & 0 deletions boards/serpente/include/pwm_params.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/*
* Copyright (C) 2020 Marian Buschsieweke
*
* 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_serpente
* @{
*
* @file
* @brief Configuration of SAUL mapped PWM channels
*
* @author Marian Buschsieweke <marian.buschsieweke@ovgu.de>
*/

#ifndef PWM_PARAMS_H
#define PWM_PARAMS_H

#include "board.h"
#include "saul/periph.h"

#ifdef __cplusplus
extern "C" {
#endif

static const saul_pwm_rgb_params_t saul_pwm_rgb_params[] =
{
{
.name = "LED",
.channels = {
{ PWM_DEV(0), 3, SAUL_PWM_INVERTED },
{ PWM_DEV(0), 2, SAUL_PWM_INVERTED },
{ PWM_DEV(0), 4, SAUL_PWM_INVERTED }
}
}
};

#define SAUL_PWM_NO_DIMMER

#ifdef __cplusplus
}
#endif

#endif /* PWM_PARAMS_H */
/** @} */

0 comments on commit 50b91f3

Please sign in to comment.