From 412b535d51444cbe5f6b5d22fee9d308ee40eb36 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Wed, 13 Sep 2017 14:14:44 +0000 Subject: Updated LLD templates with latest changes. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10578 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/templates/hal_pal_lld.h | 27 +++++++++++++++++++++++++++ os/hal/templates/hal_spi_lld.h | 26 ++++++++++++++++++++++++++ os/hal/templates/hal_usb_lld.h | 7 +++++++ 3 files changed, 60 insertions(+) (limited to 'os/hal/templates') 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. */ /*===========================================================================*/ -- cgit v1.2.3