aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--os/hal/platforms/LPC11xx/pal_lld.c12
-rw-r--r--os/hal/platforms/LPC11xx/pal_lld.h2
-rw-r--r--os/hal/platforms/LPC13xx/pal_lld.c12
-rw-r--r--os/hal/platforms/LPC13xx/pal_lld.h2
-rw-r--r--readme.txt2
5 files changed, 26 insertions, 4 deletions
diff --git a/os/hal/platforms/LPC11xx/pal_lld.c b/os/hal/platforms/LPC11xx/pal_lld.c
index 7c04673ca..d4112fe2c 100644
--- a/os/hal/platforms/LPC11xx/pal_lld.c
+++ b/os/hal/platforms/LPC11xx/pal_lld.c
@@ -87,7 +87,17 @@ void _pal_lld_setgroupmode(ioportid_t port,
ioportmask_t mask,
uint_fast8_t mode) {
- (void)port; (void)mask; (void)mode;
+ switch (mode & PAL_MODE_MASK) {
+ case PAL_MODE_RESET:
+ case PAL_MODE_INPUT:
+ port->DIR &= ~mask;
+ break;
+ case PAL_MODE_UNCONNECTED:
+ palSetPort(port, PAL_WHOLE_PORT);
+ case PAL_MODE_OUTPUT_PUSHPULL:
+ port->DIR |= mask;
+ break;
+ }
}
#endif /* CH_HAL_USE_PAL */
diff --git a/os/hal/platforms/LPC11xx/pal_lld.h b/os/hal/platforms/LPC11xx/pal_lld.h
index a1bff17f3..55f2ea2b9 100644
--- a/os/hal/platforms/LPC11xx/pal_lld.h
+++ b/os/hal/platforms/LPC11xx/pal_lld.h
@@ -85,7 +85,7 @@ typedef struct {
* @brief Whole port mask.
* @brief This macro specifies all the valid bits into a port.
*/
-#define PAL_WHOLE_PORT ((ioportmask_t)0xFFFFFFFF)
+#define PAL_WHOLE_PORT ((ioportmask_t)0xFFF)
/**
* @brief Digital I/O port sized unsigned type.
diff --git a/os/hal/platforms/LPC13xx/pal_lld.c b/os/hal/platforms/LPC13xx/pal_lld.c
index a38b79e09..f63650c0f 100644
--- a/os/hal/platforms/LPC13xx/pal_lld.c
+++ b/os/hal/platforms/LPC13xx/pal_lld.c
@@ -87,7 +87,17 @@ void _pal_lld_setgroupmode(ioportid_t port,
ioportmask_t mask,
uint_fast8_t mode) {
- (void)port; (void)mask; (void)mode;
+ switch (mode & PAL_MODE_MASK) {
+ case PAL_MODE_RESET:
+ case PAL_MODE_INPUT:
+ port->DIR &= ~mask;
+ break;
+ case PAL_MODE_UNCONNECTED:
+ palSetPort(port, PAL_WHOLE_PORT);
+ case PAL_MODE_OUTPUT_PUSHPULL:
+ port->DIR |= mask;
+ break;
+ }
}
#endif /* CH_HAL_USE_PAL */
diff --git a/os/hal/platforms/LPC13xx/pal_lld.h b/os/hal/platforms/LPC13xx/pal_lld.h
index b8dd9d4d9..9e3c33695 100644
--- a/os/hal/platforms/LPC13xx/pal_lld.h
+++ b/os/hal/platforms/LPC13xx/pal_lld.h
@@ -85,7 +85,7 @@ typedef struct {
* @brief Whole port mask.
* @brief This macro specifies all the valid bits into a port.
*/
-#define PAL_WHOLE_PORT ((ioportmask_t)0xFFFFFFFF)
+#define PAL_WHOLE_PORT ((ioportmask_t)0xFFF)
/**
* @brief Digital I/O port sized unsigned type.
diff --git a/readme.txt b/readme.txt
index ac4927ca2..06cd0484d 100644
--- a/readme.txt
+++ b/readme.txt
@@ -70,6 +70,8 @@
in the board.h file, there is no more the need to put -DSTM32F10X_xx into
the makefile.
- NEW: Added the palSetBusMode() capability to the STM8 PAL driver.
+- NEW: Added the palSetBusMode() capability to the LPC11xx and LPC13xx
+ PAL drivers.
- CHANGE: Renamed the STM32, STM8, LPC214x, AT91SAM7x, MSP430 and simulators
PAL configuration structures to PALConfig, it is better to have the same
name for this structure in all ports (like for all the other drivers).