diff options
Diffstat (limited to 'os/hal/platforms/LPC214x')
-rw-r--r-- | os/hal/platforms/LPC214x/hal_lld.c | 70 | ||||
-rw-r--r-- | os/hal/platforms/LPC214x/hal_lld.h | 63 | ||||
-rw-r--r-- | os/hal/platforms/LPC214x/lpc214x_ssp.c | 5 | ||||
-rw-r--r-- | os/hal/platforms/LPC214x/pal_lld.c | 4 | ||||
-rw-r--r-- | os/hal/platforms/LPC214x/pal_lld.h | 6 | ||||
-rw-r--r-- | os/hal/platforms/LPC214x/platform.mk | 8 | ||||
-rw-r--r-- | os/hal/platforms/LPC214x/serial_lld.c | 7 | ||||
-rw-r--r-- | os/hal/platforms/LPC214x/vic.c | 4 |
8 files changed, 151 insertions, 16 deletions
diff --git a/os/hal/platforms/LPC214x/hal_lld.c b/os/hal/platforms/LPC214x/hal_lld.c new file mode 100644 index 000000000..09d5c639d --- /dev/null +++ b/os/hal/platforms/LPC214x/hal_lld.c @@ -0,0 +1,70 @@ +/*
+ ChibiOS/RT - Copyright (C) 2006-2007 Giovanni Di Sirio.
+
+ This file is part of ChibiOS/RT.
+
+ ChibiOS/RT is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ ChibiOS/RT is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/**
+ * @file templates/hal_lld.c
+ * @brief HAL Driver subsystem low level driver source template
+ * @addtogroup HAL_LLD
+ * @{
+ */
+
+#include "ch.h"
+#include "hal.h"
+
+/*===========================================================================*/
+/* Low Level Driver exported variables. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Low Level Driver local variables. */
+/*===========================================================================*/
+
+/**
+ * @brief PAL setup.
+ * @details Digital I/O ports static configuration as defined in @p board.h.
+ */
+const LPC214xFIOConfig pal_default_config =
+{
+ VAL_PINSEL0,
+ VAL_PINSEL1,
+ VAL_PINSEL2,
+ {VAL_FIO0PIN, VAL_FIO0DIR},
+ {VAL_FIO1PIN, VAL_FIO1DIR}
+};
+
+/*===========================================================================*/
+/* Low Level Driver local functions. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Low Level Driver interrupt handlers. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Low Level Driver exported functions. */
+/*===========================================================================*/
+
+/**
+ * @brief Low level HAL driver initialization.
+ */
+void hal_lld_init(void) {
+
+}
+
+/** @} */
diff --git a/os/hal/platforms/LPC214x/hal_lld.h b/os/hal/platforms/LPC214x/hal_lld.h new file mode 100644 index 000000000..40345ec72 --- /dev/null +++ b/os/hal/platforms/LPC214x/hal_lld.h @@ -0,0 +1,63 @@ +/*
+ ChibiOS/RT - Copyright (C) 2006-2007 Giovanni Di Sirio.
+
+ This file is part of ChibiOS/RT.
+
+ ChibiOS/RT is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ ChibiOS/RT is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/**
+ * @file templates/hal_lld.h
+ * @brief HAL subsystem low level driver header template
+ * @addtogroup HAL_LLD
+ * @{
+ */
+
+#ifndef _HAL_LLD_H_
+#define _HAL_LLD_H_
+
+#include "lpc214x.h"
+#include "vic.h"
+
+/*===========================================================================*/
+/* Driver pre-compile time settings. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Driver constants. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Derived constants and error checks. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Driver data structures and types. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* External declarations. */
+/*===========================================================================*/
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+ void hal_lld_init(void);
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _HAL_LLD_H_ */
+
+/** @} */
diff --git a/os/hal/platforms/LPC214x/lpc214x_ssp.c b/os/hal/platforms/LPC214x/lpc214x_ssp.c index af9915395..d6b465483 100644 --- a/os/hal/platforms/LPC214x/lpc214x_ssp.c +++ b/os/hal/platforms/LPC214x/lpc214x_ssp.c @@ -24,10 +24,9 @@ * @{
*/
-#include <ch.h>
-#include <pal.h>
+#include "ch.h""
+#include "hal.h"
-#include "lpc214x.h"
#include "lpc214x_ssp.h"
#if LPC214x_SSP_USE_MUTEX
diff --git a/os/hal/platforms/LPC214x/pal_lld.c b/os/hal/platforms/LPC214x/pal_lld.c index 666afef55..5a024fff8 100644 --- a/os/hal/platforms/LPC214x/pal_lld.c +++ b/os/hal/platforms/LPC214x/pal_lld.c @@ -24,8 +24,8 @@ * @{
*/
-#include <ch.h>
-#include <pal.h>
+#include "ch.h"
+#include "hal.h"
/**
* @brief LPC214x I/O ports configuration.
diff --git a/os/hal/platforms/LPC214x/pal_lld.h b/os/hal/platforms/LPC214x/pal_lld.h index 565b3333a..f007abda8 100644 --- a/os/hal/platforms/LPC214x/pal_lld.h +++ b/os/hal/platforms/LPC214x/pal_lld.h @@ -27,8 +27,6 @@ #ifndef _PAL_LLD_H_
#define _PAL_LLD_H_
-#include "lpc214x.h"
-
/*===========================================================================*/
/* Unsupported modes and specific modes */
/*===========================================================================*/
@@ -54,7 +52,7 @@ typedef struct { /**
* @brief LPC214x FIO static initializer.
* @details An instance of this structure must be passed to @p palInit() at
- * system startup time in order to initialized the digital I/O
+ * system startup time in order to initialize the digital I/O
* subsystem. This represents only the initial setup, specific pads
* or whole ports can be reprogrammed at later time.
*/
@@ -237,6 +235,8 @@ typedef FIO * ioportid_t; (port)->FIO_DIR = (dir); \
}
+extern const LPC214xFIOConfig pal_default_config;
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/os/hal/platforms/LPC214x/platform.mk b/os/hal/platforms/LPC214x/platform.mk new file mode 100644 index 000000000..3625b157f --- /dev/null +++ b/os/hal/platforms/LPC214x/platform.mk @@ -0,0 +1,8 @@ +# List of all the LPC214x platform files.
+PLATFORMSRC = ${CHIBIOS}/os/hal/platforms/LPC214x/hal_lld.c \
+ ${CHIBIOS}/os/hal/platforms/LPC214x/pal_lld.c \
+ ${CHIBIOS}/os/hal/platforms/LPC214x/serial_lld.c \
+ ${CHIBIOS}/os/hal/platforms/LPC214x/vic.c
+
+# Required include directories
+PLATFORMINC = ${CHIBIOS}/os/hal/platforms/LPC214x
diff --git a/os/hal/platforms/LPC214x/serial_lld.c b/os/hal/platforms/LPC214x/serial_lld.c index c7db717b2..e7ccc6dd0 100644 --- a/os/hal/platforms/LPC214x/serial_lld.c +++ b/os/hal/platforms/LPC214x/serial_lld.c @@ -24,11 +24,8 @@ * @{
*/
-#include <ch.h>
-#include <serial.h>
-
-#include "board.h"
-#include "vic.h"
+#include "ch.h"
+#include "hal.h"
#if USE_LPC214x_UART0 || defined(__DOXYGEN__)
/** @brief UART0 serial driver identifier.*/
diff --git a/os/hal/platforms/LPC214x/vic.c b/os/hal/platforms/LPC214x/vic.c index 685830063..b94b4b53f 100644 --- a/os/hal/platforms/LPC214x/vic.c +++ b/os/hal/platforms/LPC214x/vic.c @@ -24,9 +24,7 @@ * @{
*/
-#include <ch.h>
-
-#include "lpc214x.h"
+#include "ch.h"
/**
* @brief VIC Initialization.
|