aboutsummaryrefslogtreecommitdiffstats
path: root/os
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-02-25 10:26:57 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-02-25 10:26:57 +0000
commit9afc25656cf245314157c310847f100acb54597a (patch)
treec782cae7b4d64927e96fdf7e852a3c03e73bdbfe /os
parentc39343f7286f9d4135b40b470f5633ad044f0679 (diff)
downloadChibiOS-9afc25656cf245314157c310847f100acb54597a.tar.gz
ChibiOS-9afc25656cf245314157c310847f100acb54597a.tar.bz2
ChibiOS-9afc25656cf245314157c310847f100acb54597a.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@5317 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os')
-rw-r--r--os/hal/platforms/SPC560Pxx/hal_lld.c8
-rw-r--r--os/hal/templates/pal_lld.c29
-rw-r--r--os/hal/templates/pal_lld.h27
3 files changed, 54 insertions, 10 deletions
diff --git a/os/hal/platforms/SPC560Pxx/hal_lld.c b/os/hal/platforms/SPC560Pxx/hal_lld.c
index 505b777de..72e16be4d 100644
--- a/os/hal/platforms/SPC560Pxx/hal_lld.c
+++ b/os/hal/platforms/SPC560Pxx/hal_lld.c
@@ -152,12 +152,12 @@ void spc_clock_init(void) {
/* Enables the XOSC in order to check its functionality before proceeding
with the initialization.*/
-/* ME.DRUN.R = SPC5_ME_MC_SYSCLK_IRC | SPC5_ME_MC_IRCON | SPC5_ME_MC_XOSC0ON | \
- SPC5_ME_MC_CFLAON_NORMAL | SPC5_ME_MC_CFLAON_NORMAL |
- SPC5_ME_MC_MVRON;
+ ME.DRUN.R = SPC5_ME_MC_SYSCLK_IRC | SPC5_ME_MC_IRCON | \
+ SPC5_ME_MC_XOSC0ON | SPC5_ME_MC_CFLAON_NORMAL | \
+ SPC5_ME_MC_DFLAON_NORMAL | SPC5_ME_MC_MVRON;
if (halSPCSetRunMode(SPC5_RUNMODE_DRUN) == CH_FAILED) {
SPC5_CLOCK_FAILURE_HOOK();
- }*/
+ }
/* Initialization of the FMPLLs settings.*/
CGM.FMPLL[0].CR.R = SPC5_FMPLL0_ODF |
diff --git a/os/hal/templates/pal_lld.c b/os/hal/templates/pal_lld.c
index b6030b06e..10e2ae482 100644
--- a/os/hal/templates/pal_lld.c
+++ b/os/hal/templates/pal_lld.c
@@ -55,6 +55,35 @@
/* Driver exported functions. */
/*===========================================================================*/
+/**
+ * @brief STM32 I/O ports configuration.
+ * @details Ports A-D(E, F, G, H) clocks enabled.
+ *
+ * @param[in] config the STM32 ports configuration
+ *
+ * @notapi
+ */
+void _pal_lld_init(const PALConfig *config) {
+
+}
+
+/**
+ * @brief Pads 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
+ *
+ * @notapi
+ */
+void _pal_lld_setgroupmode(ioportid_t port,
+ ioportmask_t mask,
+ iomode_t mode) {
+
+}
+
#endif /* HAL_USE_PAL */
/** @} */
diff --git a/os/hal/templates/pal_lld.h b/os/hal/templates/pal_lld.h
index d6c898e8b..9e109e465 100644
--- a/os/hal/templates/pal_lld.h
+++ b/os/hal/templates/pal_lld.h
@@ -104,7 +104,7 @@ typedef uint32_t ioportid_t;
*
* @notapi
*/
-#define pal_lld_init(config)
+#define pal_lld_init(config) _pal_lld_init(config)
/**
* @brief Reads the physical I/O port states.
@@ -114,7 +114,7 @@ typedef uint32_t ioportid_t;
*
* @notapi
*/
-#define pal_lld_readport(port)
+#define pal_lld_readport(port) 0
/**
* @brief Reads the output latch.
@@ -126,7 +126,7 @@ typedef uint32_t ioportid_t;
*
* @notapi
*/
-#define pal_lld_readlatch(port)
+#define pal_lld_readlatch(port) 0
/**
* @brief Writes a bits mask on a I/O port.
@@ -190,7 +190,7 @@ typedef uint32_t ioportid_t;
*
* @notapi
*/
-#define pal_lld_readgroup(port, mask, offset)
+#define pal_lld_readgroup(port, mask, offset) 0
/**
* @brief Writes a group of bits.
@@ -206,7 +206,7 @@ typedef uint32_t ioportid_t;
*
* @notapi
*/
-#define pal_lld_writegroup(port, mask, offset, bits)
+#define pal_lld_writegroup(port, mask, offset, bits) (void)bits
/**
* @brief Pads group mode setup.
@@ -238,7 +238,7 @@ typedef uint32_t ioportid_t;
*
* @notapi
*/
-#define pal_lld_readpad(port, pad)
+#define pal_lld_readpad(port, pad) PAL_LOW
/**
* @brief Writes a logical state on an output pad.
@@ -312,6 +312,21 @@ typedef uint32_t ioportid_t;
*/
#define pal_lld_setpadmode(port, pad, mode)
+#if !defined(__DOXYGEN__)
+extern const PALConfig pal_default_config;
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+ void _pal_lld_init(const PALConfig *config);
+ void _pal_lld_setgroupmode(ioportid_t port,
+ ioportmask_t mask,
+ iomode_t mode);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* HAL_USE_PAL */
#endif /* _PAL_LLD_H_ */