aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--os/hal/platforms/AT91SAM7/pal_lld.c2
-rw-r--r--os/hal/platforms/AT91SAM7/pal_lld.h5
-rw-r--r--os/hal/platforms/LPC11xx/pal_lld.c2
-rw-r--r--os/hal/platforms/LPC11xx/pal_lld.h5
-rw-r--r--os/hal/platforms/LPC13xx/pal_lld.c2
-rw-r--r--os/hal/platforms/LPC13xx/pal_lld.h5
-rw-r--r--os/hal/platforms/LPC214x/pal_lld.h5
-rw-r--r--os/hal/platforms/MSP430/pal_lld.h5
-rw-r--r--os/hal/platforms/Posix/pal_lld.h5
-rw-r--r--os/hal/platforms/STM32/pal_lld.h5
-rw-r--r--os/hal/platforms/STM8L/pal_lld.c2
-rw-r--r--os/hal/platforms/STM8L/pal_lld.h5
-rw-r--r--os/hal/platforms/STM8S/pal_lld.c2
-rw-r--r--os/hal/platforms/STM8S/pal_lld.h5
-rw-r--r--os/hal/platforms/Win32/pal_lld.h5
-rw-r--r--os/hal/templates/pal_lld.h5
16 files changed, 60 insertions, 5 deletions
diff --git a/os/hal/platforms/AT91SAM7/pal_lld.c b/os/hal/platforms/AT91SAM7/pal_lld.c
index 0e2136da1..5422756ac 100644
--- a/os/hal/platforms/AT91SAM7/pal_lld.c
+++ b/os/hal/platforms/AT91SAM7/pal_lld.c
@@ -123,7 +123,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->PIO_PPUER = mask;
diff --git a/os/hal/platforms/AT91SAM7/pal_lld.h b/os/hal/platforms/AT91SAM7/pal_lld.h
index 9c5796a40..7aeb3b933 100644
--- a/os/hal/platforms/AT91SAM7/pal_lld.h
+++ b/os/hal/platforms/AT91SAM7/pal_lld.h
@@ -87,6 +87,11 @@ typedef struct {
typedef uint32_t ioportmask_t;
/**
+ * @brief Digital I/O modes.
+ */
+typedef uint32_t iomode_t;
+
+/**
* @brief Port Identifier.
* @details This type can be a scalar or some kind of pointer, do not make
* any assumption about it, use the provided macros when populating
diff --git a/os/hal/platforms/LPC11xx/pal_lld.c b/os/hal/platforms/LPC11xx/pal_lld.c
index 6ce6ba876..a78bf973f 100644
--- a/os/hal/platforms/LPC11xx/pal_lld.c
+++ b/os/hal/platforms/LPC11xx/pal_lld.c
@@ -89,7 +89,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:
port->DIR &= ~mask;
diff --git a/os/hal/platforms/LPC11xx/pal_lld.h b/os/hal/platforms/LPC11xx/pal_lld.h
index d60b4ef71..ef3f41a43 100644
--- a/os/hal/platforms/LPC11xx/pal_lld.h
+++ b/os/hal/platforms/LPC11xx/pal_lld.h
@@ -94,6 +94,11 @@ typedef struct {
typedef uint32_t ioportmask_t;
/**
+ * @brief Digital I/O modes.
+ */
+typedef uint32_t iomode_t;
+
+/**
* @brief Port Identifier.
*/
typedef LPC_GPIO_TypeDef *ioportid_t;
diff --git a/os/hal/platforms/LPC13xx/pal_lld.c b/os/hal/platforms/LPC13xx/pal_lld.c
index 6a66f1ead..719329160 100644
--- a/os/hal/platforms/LPC13xx/pal_lld.c
+++ b/os/hal/platforms/LPC13xx/pal_lld.c
@@ -89,7 +89,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:
port->DIR &= ~mask;
diff --git a/os/hal/platforms/LPC13xx/pal_lld.h b/os/hal/platforms/LPC13xx/pal_lld.h
index bbf4db0e8..1090ca2f5 100644
--- a/os/hal/platforms/LPC13xx/pal_lld.h
+++ b/os/hal/platforms/LPC13xx/pal_lld.h
@@ -94,6 +94,11 @@ typedef struct {
typedef uint32_t ioportmask_t;
/**
+ * @brief Digital I/O modes.
+ */
+typedef uint32_t iomode_t;
+
+/**
* @brief Port Identifier.
*/
typedef LPC_GPIO_TypeDef *ioportid_t;
diff --git a/os/hal/platforms/LPC214x/pal_lld.h b/os/hal/platforms/LPC214x/pal_lld.h
index 1a45cd6a9..90ea9cfae 100644
--- a/os/hal/platforms/LPC214x/pal_lld.h
+++ b/os/hal/platforms/LPC214x/pal_lld.h
@@ -90,6 +90,11 @@ typedef struct {
typedef uint32_t ioportmask_t;
/**
+ * @brief Digital I/O modes.
+ */
+typedef uint32_t iomode_t;
+
+/**
* @brief Port Identifier.
*/
typedef FIO * ioportid_t;
diff --git a/os/hal/platforms/MSP430/pal_lld.h b/os/hal/platforms/MSP430/pal_lld.h
index 31ee669a0..1c0bc5900 100644
--- a/os/hal/platforms/MSP430/pal_lld.h
+++ b/os/hal/platforms/MSP430/pal_lld.h
@@ -135,6 +135,11 @@ typedef struct {
typedef uint8_t ioportmask_t;
/**
+ * @brief Digital I/O modes.
+ */
+typedef uint16_t iomode_t;
+
+/**
* @brief Port Identifier.
* @details This type can be a scalar or some kind of pointer, do not make
* any assumption about it, use the provided macros when populating
diff --git a/os/hal/platforms/Posix/pal_lld.h b/os/hal/platforms/Posix/pal_lld.h
index 1984c06f0..d02b56dec 100644
--- a/os/hal/platforms/Posix/pal_lld.h
+++ b/os/hal/platforms/Posix/pal_lld.h
@@ -101,6 +101,11 @@ typedef struct {
typedef uint32_t ioportmask_t;
/**
+ * @brief Digital I/O modes.
+ */
+typedef uint32_t iomode_t;
+
+/**
* @brief Port Identifier.
*/
typedef sim_vio_port_t *ioportid_t;
diff --git a/os/hal/platforms/STM32/pal_lld.h b/os/hal/platforms/STM32/pal_lld.h
index 2919c91f6..53067765a 100644
--- a/os/hal/platforms/STM32/pal_lld.h
+++ b/os/hal/platforms/STM32/pal_lld.h
@@ -108,6 +108,11 @@ typedef struct {
typedef uint32_t ioportmask_t;
/**
+ * @brief Digital I/O modes.
+ */
+typedef uint32_t iomode_t;
+
+/**
* @brief Port Identifier.
* @details This type can be a scalar or some kind of pointer, do not make
* any assumption about it, use the provided macros when populating
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;
diff --git a/os/hal/platforms/STM8S/pal_lld.c b/os/hal/platforms/STM8S/pal_lld.c
index 0a9b26657..385347c97 100644
--- a/os/hal/platforms/STM8S/pal_lld.c
+++ b/os/hal/platforms/STM8S/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/STM8S/pal_lld.h b/os/hal/platforms/STM8S/pal_lld.h
index ef69d1379..0742c21ef 100644
--- a/os/hal/platforms/STM8S/pal_lld.h
+++ b/os/hal/platforms/STM8S/pal_lld.h
@@ -85,6 +85,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;
diff --git a/os/hal/platforms/Win32/pal_lld.h b/os/hal/platforms/Win32/pal_lld.h
index a1c84b13a..6ddfcdefd 100644
--- a/os/hal/platforms/Win32/pal_lld.h
+++ b/os/hal/platforms/Win32/pal_lld.h
@@ -101,6 +101,11 @@ typedef struct {
typedef uint32_t ioportmask_t;
/**
+ * @brief Digital I/O modes.
+ */
+typedef uint32_t iomode_t;
+
+/**
* @brief Port Identifier.
*/
typedef sim_vio_port_t *ioportid_t;
diff --git a/os/hal/templates/pal_lld.h b/os/hal/templates/pal_lld.h
index 8272b7c30..46f5a3d39 100644
--- a/os/hal/templates/pal_lld.h
+++ b/os/hal/templates/pal_lld.h
@@ -69,6 +69,11 @@ typedef struct {
typedef uint32_t ioportmask_t;
/**
+ * @brief Digital I/O modes.
+ */
+typedef uint32_t iomode_t;
+
+/**
* @brief Port Identifier.
* @details This type can be a scalar or some kind of pointer, do not make
* any assumption about it, use the provided macros when populating