aboutsummaryrefslogtreecommitdiffstats
path: root/os
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2017-09-13 14:14:44 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2017-09-13 14:14:44 +0000
commit412b535d51444cbe5f6b5d22fee9d308ee40eb36 (patch)
tree00599fe2cf8bfab0d1844342e189eca69df679f4 /os
parent792d0a0c42d40e5cf75782e2cbb0ebb198360882 (diff)
downloadChibiOS-412b535d51444cbe5f6b5d22fee9d308ee40eb36.tar.gz
ChibiOS-412b535d51444cbe5f6b5d22fee9d308ee40eb36.tar.bz2
ChibiOS-412b535d51444cbe5f6b5d22fee9d308ee40eb36.zip
Updated LLD templates with latest changes.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10578 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os')
-rw-r--r--os/hal/templates/hal_pal_lld.h27
-rw-r--r--os/hal/templates/hal_spi_lld.h26
-rw-r--r--os/hal/templates/hal_usb_lld.h7
3 files changed, 60 insertions, 0 deletions
diff --git a/os/hal/templates/hal_pal_lld.h b/os/hal/templates/hal_pal_lld.h
index 814b76741..71d916dcd 100644
--- a/os/hal/templates/hal_pal_lld.h
+++ b/os/hal/templates/hal_pal_lld.h
@@ -117,6 +117,11 @@ typedef uint32_t ioline_t;
*/
typedef uint32_t ioportid_t;
+/**
+ * @brief Type of an pad identifier.
+ */
+typedef uint32_t iopadid_t;
+
/*===========================================================================*/
/* I/O Ports Identifiers. */
/*===========================================================================*/
@@ -400,8 +405,30 @@ typedef uint32_t ioportid_t;
} while (false)
+/**
+ * @brief Returns a PAL event structure associated to a pad.
+ *
+ * @param[in] port port identifier
+ * @param[in] pad pad number within the port
+ *
+ * @notapi
+ */
+#define pal_lld_get_pad_event(port, pad) \
+ &_pal_events[0]; (void)(port); (void)pad
+
+/**
+ * @brief Returns a PAL event structure associated to a line.
+ *
+ * @param[in] line line identifier
+ *
+ * @notapi
+ */
+#define pal_lld_get_line_event(line) \
+ &_pal_events[0]; (void)line
+
#if !defined(__DOXYGEN__)
extern const PALConfig pal_default_config;
+extern palevent_t _pal_events[1];
#endif
#ifdef __cplusplus
diff --git a/os/hal/templates/hal_spi_lld.h b/os/hal/templates/hal_spi_lld.h
index f6dd9d579..c209a3dd4 100644
--- a/os/hal/templates/hal_spi_lld.h
+++ b/os/hal/templates/hal_spi_lld.h
@@ -80,6 +80,32 @@ typedef struct {
* @brief Operation complete callback or @p NULL.
*/
spicallback_t end_cb;
+#if (SPI_SELECT_MODE == SPI_SELECT_MODE_LINE) || defined(__DOXYGEN__)
+ /**
+ * @brief The chip select line.
+ */
+ ioportid_t ssline;
+#endif
+#if (SPI_SELECT_MODE == SPI_SELECT_MODE_PORT) || defined(__DOXYGEN__)
+ /**
+ * @brief The chip select port.
+ */
+ ioportid_t ssport;
+ /**
+ * @brief The chip select port mask.
+ */
+ uint8fast_t ssmask;
+#endif
+#if (SPI_SELECT_MODE == SPI_SELECT_MODE_PAD) || defined(__DOXYGEN__)
+ /**
+ * @brief The chip select port.
+ */
+ ioportid_t ssport;
+ /**
+ * @brief The chip select pad number.
+ */
+ uint_fast8_t sspad;
+#endif
/* End of the mandatory fields.*/
} SPIConfig;
diff --git a/os/hal/templates/hal_usb_lld.h b/os/hal/templates/hal_usb_lld.h
index a57214a37..c3a66ee3d 100644
--- a/os/hal/templates/hal_usb_lld.h
+++ b/os/hal/templates/hal_usb_lld.h
@@ -336,6 +336,13 @@ struct USBDriver {
*/
#define usb_lld_disconnect_bus(usbp)
+/**
+ * @brief Start of host wake-up procedure.
+ *
+ * @notapi
+ */
+#define usb_lld_wakeup_host(usbp)
+
/*===========================================================================*/
/* External declarations. */
/*===========================================================================*/