aboutsummaryrefslogtreecommitdiffstats
path: root/src/templates
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-06-21 09:35:39 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-06-21 09:35:39 +0000
commit8183016f1cb574d923c83eab468ca37617051d78 (patch)
tree41308cf6e02ac0bc848c2a6f5733e81f576495cd /src/templates
parent1c7e52eb35c244e5855ea7978ab02d9540829e00 (diff)
downloadChibiOS-8183016f1cb574d923c83eab468ca37617051d78.tar.gz
ChibiOS-8183016f1cb574d923c83eab468ca37617051d78.tar.bz2
ChibiOS-8183016f1cb574d923c83eab468ca37617051d78.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1043 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'src/templates')
-rw-r--r--src/templates/pal_lld.h41
1 files changed, 35 insertions, 6 deletions
diff --git a/src/templates/pal_lld.h b/src/templates/pal_lld.h
index 48c91811c..96cfe872d 100644
--- a/src/templates/pal_lld.h
+++ b/src/templates/pal_lld.h
@@ -187,6 +187,21 @@ typedef uint32_t ioportid_t;
#define pal_lld_writegroup(port, mask, offset, bits)
/**
+ * @brief Pads group mode setup.
+ * @details This function programs a pads group belonging to the same port
+ * with the specified mode.
+ *
+ * @param[in] port the port identifier
+ * @param[in] mask the group mask
+ * @param[in] mode the mode
+ *
+ * @note This function is not meant to be invoked directly by the application
+ * code.
+ * @note Programming an unknown or unsupported mode is silently ignored.
+ */
+#define pal_lld_setgroupmode(port, mask, mode)
+
+/**
* @brief Reads a logical state from an I/O pad.
*
* @param[in] port the port identifier
@@ -261,18 +276,32 @@ typedef uint32_t ioportid_t;
#define pal_lld_togglepad(port, pad)
/**
- * @brief Pads mode setup.
- * @details This function programs a pads group belonging to the same port
- * with the specified mode.
+ * @brief Pad mode setup.
+ * @details This function programs a pad with the specified mode.
*
* @param[in] port the port identifier
- * @param[in] mask the group mask
- * @param[in] mode the setup mode
+ * @param[in] pad the pad number within the port
+ * @param[in] mode the mode
*
* @note This function is not meant to be invoked directly by the application
* code.
+ * @note The @ref PAL provides a default software implementation of this
+ * functionality, implement this function if can optimize it by using
+ * special hardware functionalities or special coding.
+ * @note Programming an unknown or unsupported mode is silently ignored.
*/
-#define pal_lld_setmode(port, mask, mode)
+#define pal_lld_setpadmode(port, pad, mode)
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+ ioportmask_t palReadBus(IOBus *bus);
+ void palWriteBus(IOBus *bus, ioportmask_t bits);
+ void palSetBusMode(IOBus *bus, uint_fast8_t mode);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _PAL_LLD_H_ */