aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/src/main.dox6
-rw-r--r--ports/MSP430/pal_lld.c2
-rw-r--r--ports/MSP430/pal_lld.h2
-rw-r--r--ports/MSP430/port.dox12
-rw-r--r--src/templates/pal_lld.h23
5 files changed, 36 insertions, 9 deletions
diff --git a/docs/src/main.dox b/docs/src/main.dox
index fecca64f9..3d6c605c5 100644
--- a/docs/src/main.dox
+++ b/docs/src/main.dox
@@ -365,12 +365,10 @@
* documentation for details.<br>
* The @ref PAL has the advantage to make the access to the I/O ports platform
* independent and still be optimized for the specific architectures.<br>
- * Currently the I/O ports interface does not handle physical port programming
- * like direction, pull up/down resistors etc. The interface only allows input
- * and output operations but this may change in future releases.<br>
* Note that the @ref PAL_LLD may also offer non standard macro and functions
* in order to support specific features but, of course, the use of such
- * interfaces would not be portable.
+ * interfaces would not be portable. Such interfaces shall be marked with
+ * the architecture name inside the function names.
*
* <h2>Implementation Rules</h2>
* In implementing an @ref PAL_LLD there are some rules/behaviors that
diff --git a/ports/MSP430/pal_lld.c b/ports/MSP430/pal_lld.c
index 9b8652263..c5f59c2e9 100644
--- a/ports/MSP430/pal_lld.c
+++ b/ports/MSP430/pal_lld.c
@@ -30,7 +30,7 @@
/**
* @brief MSP430 I/O ports configuration.
*
- * @param[in] the MSP430 ports configuration
+ * @param[in] config the MSP430 ports configuration
*
* @note The @p PxIFG, @p PxIE and @p PxSEL registers are cleared. @p PxOUT
* and @p PxDIR are configured as specified.
diff --git a/ports/MSP430/pal_lld.h b/ports/MSP430/pal_lld.h
index cb47b4259..9f977c8c2 100644
--- a/ports/MSP430/pal_lld.h
+++ b/ports/MSP430/pal_lld.h
@@ -212,7 +212,7 @@ typedef union __ioport * ioportid_t;
* @brief Low level PAL subsystem initialization.
* @details In MSP430 programs all the ports as input.
*
- * @param[in] the MSP430 ports configuration
+ * @param[in] config the MSP430 ports configuration
*/
#define pal_lld_init(config) _pal_lld_init(config)
diff --git a/ports/MSP430/port.dox b/ports/MSP430/port.dox
index 3300f4441..e91670709 100644
--- a/ports/MSP430/port.dox
+++ b/ports/MSP430/port.dox
@@ -98,8 +98,16 @@
* - Output latched regardless of the pad setting.
* - Direct read of input pads regardless of the pad setting.
* .
- * The only non atomic operations are bus/group writing.
- *
+ * The only non atomic operations are bus/group writing and pads/group/bus
+ * setup.<br>
+ * The supported setup modes are:
+ * - @p PAL_MODE_RESET.
+ * - @p PAL_MODE_UNCONNECTED.
+ * - @p PAL_MODE_INPUT.
+ * - @p PAL_MODE_OUTPUT_PUSHPULL.
+ * .
+ * The macros for the other modes are disabled, any attempt to setup an invalid
+ * mode is ignored.
* @ingroup MSP430_DRIVERS
*/
diff --git a/src/templates/pal_lld.h b/src/templates/pal_lld.h
index 96cfe872d..8f0482969 100644
--- a/src/templates/pal_lld.h
+++ b/src/templates/pal_lld.h
@@ -32,6 +32,25 @@
/*===========================================================================*/
/**
+ * @brief Generic I/O ports static initializer.
+ * @details An instance of this structure must be passed to @p palInit() at
+ * system startup time in order to initialized the digital I/O
+ * subsystem. This represents only the initial setup, specific pads
+ * or whole ports can be reprogrammed at later time.
+ *
+ * @note This structure content is architecture dependent. The nome should be
+ * changed to include the architecture name following this pattern:<br>
+ * - <ARCH><CELL>Config.
+ * .
+ * As example:<br>
+ * - MSP430DIOConfig.
+ * .
+ */
+typedef struct {
+
+} GenericConfig;
+
+/**
* @brief Width, in bits, of an I/O port.
*/
#define PAL_IOPORTS_WIDTH 32
@@ -73,8 +92,10 @@ typedef uint32_t ioportid_t;
/**
* @brief Low level PAL subsystem initialization.
+ *
+ * @param[in] config the architecture-dependent ports configuration
*/
-#define pal_lld_init()
+#define pal_lld_init(config)
/**
* @brief Reads the physical I/O port states.