From 74328c0fc0a8d46c97b954ab153d44ac2891ed04 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Tue, 8 Dec 2009 21:38:05 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1404 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/platforms/Win32/hal_lld.c | 2 ++ os/hal/platforms/Win32/serial_lld.c | 4 ++++ os/hal/platforms/Win32/serial_lld.h | 4 ++++ 3 files changed, 10 insertions(+) (limited to 'os/hal/platforms/Win32') diff --git a/os/hal/platforms/Win32/hal_lld.c b/os/hal/platforms/Win32/hal_lld.c index 9051e90dc..43eff9781 100644 --- a/os/hal/platforms/Win32/hal_lld.c +++ b/os/hal/platforms/Win32/hal_lld.c @@ -81,11 +81,13 @@ void hal_lld_init(void) { void ChkIntSources(void) { LARGE_INTEGER n; +#if CH_HAL_USE_SERIAL if (sd_lld_interrupt_pending()) { if (chSchIsRescRequiredExI()) chSchDoRescheduleI(); return; } +#endif // Interrupt Timer simulation (10ms interval). QueryPerformanceCounter(&n); diff --git a/os/hal/platforms/Win32/serial_lld.c b/os/hal/platforms/Win32/serial_lld.c index c8543799f..18266ef6b 100644 --- a/os/hal/platforms/Win32/serial_lld.c +++ b/os/hal/platforms/Win32/serial_lld.c @@ -27,6 +27,8 @@ #include "ch.h" #include "hal.h" +#if CH_HAL_USE_SERIAL || defined(__DOXYGEN__) + /** @brief Serial driver 1 identifier.*/ #if USE_WIN32_SERIAL1 || defined(__DOXYGEN__) SerialDriver SD1; @@ -248,4 +250,6 @@ bool_t sd_lld_interrupt_pending(void) { outint(&SD1) || outint(&SD2); } +#endif /* CH_HAL_USE_SERIAL */ + /** @} */ diff --git a/os/hal/platforms/Win32/serial_lld.h b/os/hal/platforms/Win32/serial_lld.h index e831b83bd..a74028b8b 100644 --- a/os/hal/platforms/Win32/serial_lld.h +++ b/os/hal/platforms/Win32/serial_lld.h @@ -27,6 +27,8 @@ #ifndef _SERIAL_LLD_H_ #define _SERIAL_LLD_H_ +#if CH_HAL_USE_SERIAL || defined(__DOXYGEN__) + /*===========================================================================*/ /* Driver pre-compile time settings. */ /*===========================================================================*/ @@ -166,6 +168,8 @@ extern "C" { #endif /** @endcond*/ +#endif /* CH_HAL_USE_SERIAL */ + #endif /* _SERIAL_LLD_H_ */ /** @} */ -- cgit v1.2.3