git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1388 35acf78f-673a-0410-8e92-d51de3d6d3f4

This commit is contained in:
gdisirio 2009-12-08 08:28:49 +00:00
parent 4c32fd2c0f
commit 456490bf06
12 changed files with 159 additions and 27 deletions

View File

@ -44,6 +44,8 @@ LDSCRIPT = ch.ld
# Imported source files # Imported source files
CHIBIOS = ../.. CHIBIOS = ../..
include ${CHIBIOS}/os/hal/hal.mk
include ${CHIBIOS}/os/hal/platforms/LPC214x/platform.mk
include ${CHIBIOS}/os/ports/GCC/ARM7/port.mk include ${CHIBIOS}/os/ports/GCC/ARM7/port.mk
include ${CHIBIOS}/os/kernel/kernel.mk include ${CHIBIOS}/os/kernel/kernel.mk
include ${CHIBIOS}/test/test.mk include ${CHIBIOS}/test/test.mk
@ -53,11 +55,8 @@ include ${CHIBIOS}/test/test.mk
CSRC = ${PORTSRC} \ CSRC = ${PORTSRC} \
${KERNSRC} \ ${KERNSRC} \
${TESTSRC} \ ${TESTSRC} \
${CHIBIOS}/os/io/pal.c \ ${HALSRC} \
${CHIBIOS}/os/io/serial.c \ ${PLATFORMSRC} \
${CHIBIOS}/os/io/platforms/LPC214x/pal_lld.c \
${CHIBIOS}/os/io/platforms/LPC214x/serial_lld.c \
${CHIBIOS}/os/io/platforms/LPC214x/vic.c \
${CHIBIOS}/os/io/platforms/LPC214x/lpc214x_ssp.c \ ${CHIBIOS}/os/io/platforms/LPC214x/lpc214x_ssp.c \
${CHIBIOS}/os/various/evtimer.c \ ${CHIBIOS}/os/various/evtimer.c \
board.c buzzer.c mmcsd.c main.c board.c buzzer.c mmcsd.c main.c
@ -90,9 +89,7 @@ TCPPSRC =
ASMSRC = $(PORTASM) \ ASMSRC = $(PORTASM) \
${CHIBIOS}/os/ports/GCC/ARM7/LPC214x/vectors.s ${CHIBIOS}/os/ports/GCC/ARM7/LPC214x/vectors.s
INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \ INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) $(HALINC) $(PLATFORMINC) \
${CHIBIOS}/os/io \
${CHIBIOS}/os/io/platforms/LPC214x \
${CHIBIOS}/os/various \ ${CHIBIOS}/os/various \
${CHIBIOS}/os/ports/GCC/ARM7/LPC214x ${CHIBIOS}/os/ports/GCC/ARM7/LPC214x

View File

@ -54,7 +54,7 @@ typedef struct {
/** /**
* @brief AT91SAM7 PIO static initializer. * @brief AT91SAM7 PIO static initializer.
* @details An instance of this structure must be passed to @p palInit() at * @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 * subsystem. This represents only the initial setup, specific pads
* or whole ports can be reprogrammed at later time. * or whole ports can be reprogrammed at later time.
*/ */

View File

@ -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) {
}
/** @} */

View File

@ -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_ */
/** @} */

View File

@ -24,10 +24,9 @@
* @{ * @{
*/ */
#include <ch.h> #include "ch.h""
#include <pal.h> #include "hal.h"
#include "lpc214x.h"
#include "lpc214x_ssp.h" #include "lpc214x_ssp.h"
#if LPC214x_SSP_USE_MUTEX #if LPC214x_SSP_USE_MUTEX

View File

@ -24,8 +24,8 @@
* @{ * @{
*/ */
#include <ch.h> #include "ch.h"
#include <pal.h> #include "hal.h"
/** /**
* @brief LPC214x I/O ports configuration. * @brief LPC214x I/O ports configuration.

View File

@ -27,8 +27,6 @@
#ifndef _PAL_LLD_H_ #ifndef _PAL_LLD_H_
#define _PAL_LLD_H_ #define _PAL_LLD_H_
#include "lpc214x.h"
/*===========================================================================*/ /*===========================================================================*/
/* Unsupported modes and specific modes */ /* Unsupported modes and specific modes */
/*===========================================================================*/ /*===========================================================================*/
@ -54,7 +52,7 @@ typedef struct {
/** /**
* @brief LPC214x FIO static initializer. * @brief LPC214x FIO static initializer.
* @details An instance of this structure must be passed to @p palInit() at * @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 * subsystem. This represents only the initial setup, specific pads
* or whole ports can be reprogrammed at later time. * or whole ports can be reprogrammed at later time.
*/ */
@ -237,6 +235,8 @@ typedef FIO * ioportid_t;
(port)->FIO_DIR = (dir); \ (port)->FIO_DIR = (dir); \
} }
extern const LPC214xFIOConfig pal_default_config;
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif

View File

@ -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

View File

@ -24,11 +24,8 @@
* @{ * @{
*/ */
#include <ch.h> #include "ch.h"
#include <serial.h> #include "hal.h"
#include "board.h"
#include "vic.h"
#if USE_LPC214x_UART0 || defined(__DOXYGEN__) #if USE_LPC214x_UART0 || defined(__DOXYGEN__)
/** @brief UART0 serial driver identifier.*/ /** @brief UART0 serial driver identifier.*/

View File

@ -24,9 +24,7 @@
* @{ * @{
*/ */
#include <ch.h> #include "ch.h"
#include "lpc214x.h"
/** /**
* @brief VIC Initialization. * @brief VIC Initialization.

View File

@ -73,7 +73,7 @@ typedef struct {
/** /**
* @brief MSP430 I/O ports static initializer. * @brief MSP430 I/O ports static initializer.
* @details An instance of this structure must be passed to @p palInit() at * @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 * subsystem. This represents only the initial setup, specific pads
* or whole ports can be reprogrammed at later time. * or whole ports can be reprogrammed at later time.
*/ */

View File

@ -48,7 +48,7 @@ typedef struct {
/** /**
* @brief STM32 GPIO static initializer. * @brief STM32 GPIO static initializer.
* @details An instance of this structure must be passed to @p palInit() at * @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 * subsystem. This represents only the initial setup, specific pads
* or whole ports can be reprogrammed at later time. * or whole ports can be reprogrammed at later time.
*/ */