diff --git a/demos/ARMCM3-STM32F103-GCC/board.c b/demos/ARMCM3-STM32F103-GCC/board.c index 11a47e828..6c8bf8c0a 100644 --- a/demos/ARMCM3-STM32F103-GCC/board.c +++ b/demos/ARMCM3-STM32F103-GCC/board.c @@ -112,7 +112,7 @@ void hwinit1(void) { /* * Other subsystems initialization. */ - sd_lld_init(); + sdInit(); /* * ChibiOS/RT initialization. diff --git a/os/io/serial.c b/os/io/serial.c index 05d258841..30a17ed48 100644 --- a/os/io/serial.c +++ b/os/io/serial.c @@ -68,7 +68,15 @@ static const struct SerialDriverVMT vmt = { }; /** - * @brief Initializes a generic full duplex driver. + * @brief Serial Driver initialization. + */ +void sdInit(void) { + + sd_lld_init(); +} + +/** + * @brief Initializes a generic full duplex driver object. * @details The HW dependent part of the initialization has to be performed * outside, usually in the hardware initialization code. * @@ -84,7 +92,7 @@ static const struct SerialDriverVMT vmt = { * some data is written in the Queue. The value can be * @p NULL. */ -void sdInit(SerialDriver *sdp, qnotify_t inotify, qnotify_t onotify) { +void sdObjectInit(SerialDriver *sdp, qnotify_t inotify, qnotify_t onotify) { sdp->vmt = &vmt; chEvtInit(&sdp->d1.ievent); diff --git a/os/io/serial.h b/os/io/serial.h index acfb2500f..a70dcf7c4 100644 --- a/os/io/serial.h +++ b/os/io/serial.h @@ -99,7 +99,8 @@ struct _SerialDriver { #ifdef __cplusplus extern "C" { #endif - void sdInit(SerialDriver *sdp, qnotify_t inotify, qnotify_t onotify); + void sdInit(void); + void sdObjectInit(SerialDriver *sdp, qnotify_t inotify, qnotify_t onotify); void sdStart(SerialDriver *sdp, const SerialDriverConfig *config); void sdStop(SerialDriver *sdp); void sdIncomingDataI(SerialDriver *sdp, uint8_t b); diff --git a/os/io/templates/pal_lld.c b/os/io/templates/pal_lld.c new file mode 100644 index 000000000..b830de338 --- /dev/null +++ b/os/io/templates/pal_lld.c @@ -0,0 +1,30 @@ +/* + 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 . +*/ + +/** + * @file os/io/templates/pal_lld.c + * @brief PAL subsystem low level driver template + * @addtogroup PAL_LLD + * @{ + */ + +#include +#include + +/** @} */ diff --git a/os/io/templates/pal_lld.h b/os/io/templates/pal_lld.h index f594dd143..cd68f605d 100644 --- a/os/io/templates/pal_lld.h +++ b/os/io/templates/pal_lld.h @@ -18,8 +18,8 @@ */ /** - * @file src/templates/pal_lld.h - * @brief PAL subsystem low level driver template + * @file os/io/templates/pal_lld.h + * @brief PAL subsystem low level driver header template * @addtogroup PAL_LLD * @{ */ @@ -91,7 +91,7 @@ typedef uint32_t ioportid_t; /*===========================================================================*/ /* Implementation, some of the following macros could be implemented as */ -/* functions, if so please put them in a file named pal_lld.c. */ +/* functions, if so please put them in pal_lld.c. */ /*===========================================================================*/ /** diff --git a/os/ports/GCC/ARMCM3/STM32F103/serial_lld.c b/os/ports/GCC/ARMCM3/STM32F103/serial_lld.c index bf06195be..f58f7aad0 100644 --- a/os/ports/GCC/ARMCM3/STM32F103/serial_lld.c +++ b/os/ports/GCC/ARMCM3/STM32F103/serial_lld.c @@ -212,17 +212,17 @@ CH_IRQ_HANDLER(VectorDC) { void sd_lld_init(void) { #if USE_STM32_USART1 - sdInit(&COM1, NULL, notify1); + sdObjectInit(&COM1, NULL, notify1); GPIOA->CRH = (GPIOA->CRH & 0xFFFFF00F) | 0x000004B0; #endif #if USE_STM32_USART2 - sdInit(&COM2, NULL, notify2); + sdObjectInit(&COM2, NULL, notify2); GPIOA->CRL = (GPIOA->CRL & 0xFFFF00FF) | 0x00004B00; #endif #if USE_STM32_USART3 - sdInit(&COM3, NULL, notify3); + sdObjectInit(&COM3, NULL, notify3); GPIOB->CRH = (GPIOB->CRH & 0xFFFF00FF) | 0x00004B00; #endif } diff --git a/readme.txt b/readme.txt index 0b64784e9..0b16a0f11 100644 --- a/readme.txt +++ b/readme.txt @@ -1,64 +1,3 @@ -***************************************************************************** -*** Directories structure *** -***************************************************************************** - -./readme.txt - This file. -./license.txt - GPL3 license file. -./src/ - ChibiOS/RT portable kernel source files. -./src/include/ - ChibiOS/RT include files. -./src/lib/ - ChibiOS/RT library code that can be included into - user applications but is not part of the core system. - The code in this directory is meant to be portable, - generic and architecture independent. -./src/templates/ - ChibiOS/RT non portable source templates, new ports - are started by copying the templates into a new - directory under ./demos/ and/or ./ports/. -./ports/ - Architecture specific portable files. -./demos/ - Demo programs for specific architectures/boards. -./ext/ - External libraries or other code not part of - ChibiOS/RT but used in the demo applications. -./test/ - Test suite code. -./test/coverage - Code coverage test application. -./docs/src - Documentation sources. -./docs/rsc - Documentation resources. -./docs/Doxyfile - Doxygen project file. -./docs/index.html - ChibiOS/RT documentation. - The documentation is also available on the project - web page: http://chibios.sourceforge.net/ -./docs/reports - Test reports on the various targets. - -***************************************************************************** -*** Current ports/demos *** -***************************************************************************** -Current ports under ./demos: - -ARM7-LPC214x-GCC - ChibiOS/RT port for ARM7 LPC2148, the demo targets - the Olimex LPC-P2148 board. This port can be easily - modified for any processor into the LPC2000 family or - other boards. The demo can be compiled using YAGARTO - or any other GCC-based ARM toolchain. Full demo. -ARM7-LPC214x-GCC-min - Minimal demo for LPC214X. -ARM7-LPC214x-G++ - Yet another LPC214X demo but this one is done using - G++ in order to provide a C++ template project to the - ChibiOS/RT users. -ARM7-AT91SAM7X-GCC - Port for Atmel AT91SAM7X256. The demo program targets - the Olimex SAM7-EX256 board. -ARM7-AT91SAM7X-WEB-GCC - Port for Atmel AT91SAM7X256. The web demo program - targets the Olimex SAM7-EX256 board. -ARMCM3-ST32F103-GCC - ARM Cortex-M3 port. The demo targets the Olimex - STM32-P103 board. -AVR-AVRmega128-GCC - Port on AVRmega128. A special thanks to Vladimir for - the work done on the AVR port. The demo program - targets the Olimex AVR-MT-128 mini terminal board. -AVR-AT90CANx-GCC - Port on AVR AT90CAN128, not tested on hardware yet. It - ran correctly in the simulator. -MSP430-MSP430x1611-GCC - Port on Texas Instruments MSP430F1611, the demo - targets the Olimex MSP430-P1611 board. -Win32-MinGW - ChibiOS/RT simulator and demo into a WIN32 process, - MinGW version. -GNU-Linux-GCC - ChibiOS/RT simulator for x86 Linux systems, it is - still work in progress but already running. - ***************************************************************************** *** Releases *** *****************************************************************************