aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/platforms/STM8L
diff options
context:
space:
mode:
Diffstat (limited to 'os/hal/platforms/STM8L')
-rw-r--r--os/hal/platforms/STM8L/pal_lld.c2
-rw-r--r--os/hal/platforms/STM8L/pal_lld.h5
2 files changed, 6 insertions, 1 deletions
diff --git a/os/hal/platforms/STM8L/pal_lld.c b/os/hal/platforms/STM8L/pal_lld.c
index e4c3001c6..5480ad28c 100644
--- a/os/hal/platforms/STM8L/pal_lld.c
+++ b/os/hal/platforms/STM8L/pal_lld.c
@@ -69,7 +69,7 @@ void _pal_lld_setgroupmode(ioportid_t port,
ioportmask_t mask,
uint_fast8_t mode) {
- switch (mode & PAL_MODE_MASK) {
+ switch (mode) {
case PAL_MODE_RESET:
case PAL_MODE_INPUT_PULLUP:
port->DDR &= ~mask;
diff --git a/os/hal/platforms/STM8L/pal_lld.h b/os/hal/platforms/STM8L/pal_lld.h
index f42973218..a8ae458f3 100644
--- a/os/hal/platforms/STM8L/pal_lld.h
+++ b/os/hal/platforms/STM8L/pal_lld.h
@@ -87,6 +87,11 @@ typedef struct {
typedef uint8_t ioportmask_t;
/**
+ * @brief Digital I/O modes.
+ */
+typedef uint8_t iomode_t;
+
+/**
* @brief Port Identifier.
*/
typedef GPIO_TypeDef *ioportid_t;