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

master
gdisirio 2009-08-30 08:49:10 +00:00
parent 576d80eb63
commit 49c40ba106
16 changed files with 217 additions and 196 deletions

View File

@ -64,150 +64,3 @@
* - @subpage testsuite * - @subpage testsuite
* . * .
*/ */
/**
* @page testsuite Test Suite
* <h2>Description</h2>
* Most of the ChibiOS/RT demos link a set of software modules (test suite) in
* order to verify the proper working of the kernel, the port and the demo
* itself.<br>
* Each Test Module performs a series of tests on a specified subsystem or
* subsystems and can report a failure/success status and/or a performance
* index as the test suite output.<br>
* The test suite is usually activated in the demo applications by pressing a
* button on the target board, see the readme into the various demos
* directories. The test suite output is usually sent through a serial port and
* can be examined by using a terminal emulator program.
*
* <h2>Test Modules</h2>
* - @subpage test_threads
* - @subpage test_dynamic
* - @subpage test_msg
* - @subpage test_sem
* - @subpage test_mtx
* - @subpage test_events
* - @subpage test_mbox
* - @subpage test_queues
* - @subpage test_heap
* - @subpage test_pools
* - @subpage test_benchmarks
* .
*/
/**
* @defgroup IO I/O Support
* @brief I/O related services.
* @details This section contains the I/O related services.
*
* The I/O subsystem is a collection of device driver poertable interfaces and
* platform dependent implementations.<br>
* Under ChibiOS/RT a device driver is split in two layers:
* - High Level Device Driver (<b>HLD</b>). This layer contains the definitions
* of the driver's APIs and the platform independent part of the driver.<br>
* An HLD is composed by two files:
* - @<driver@>.c, the high level implementation file. This file must be
* included in the Makefile in order to use the driver.
* - @<driver@>.h, the high level header file. This file must be included
* by the application code in order to access the driver's APIs.
* .
* - Low Level Device Driver (<b>LLD</b>). This layer contains the platform
* dependent part of the driver.<br>
* A LLD is composed by two files:
* - @<driver@>_lld.c, the low level implementation file. This file must be
* included in the Makefile in order to use the driver.
* - @<driver@>_lld.h, the high level header file. This file is implicitly
* included by the HLD header file.
* .
* .
* <h2>Available Device Drivers</h2>
* The I/O subsystem currently includes support for:
* - @ref PAL.
* - @ref SERIAL.
* .
*/
/**
* @defgroup PAL I/O Ports Abstraction Layer (PAL)
* @brief I/O Ports Abstraction Layer
* @details This module defines an abstract interface for digital I/O ports.
* Note that most I/O ports functions are just macros. The macros
* have default software implementations that can be redefined in a
* @ref PAL_LLD if the target hardware supports special features like, as
* example, atomic bit set/reset/masking. Please refer to the ports specific
* documentation for details.<br>
* The @ref PAL has the advantage to make the access to the I/O ports platform
* independent and still be optimized for the specific architectures.<br>
* Note that the @ref PAL_LLD may also offer non standard macro and functions
* in order to support specific features but, of course, the use of such
* interfaces would not be portable. Such interfaces shall be marked with
* the architecture name inside the function names.
*
* <h2>Implementation Rules</h2>
* In implementing an @ref PAL_LLD there are some rules/behaviors that
* should be respected.
*
* <h3>Writing on input pads</h3>
* The behavior is not specified but there are implementations better than
* others, this is the list of possible implementations, preferred options
* are on top:
* -# The written value is not actually output but latched, should the pads
* be reprogrammed as outputs the value would be in effect.
* -# The write operation is ignored.
* -# The write operation has side effects, as example disabling/enabling
* pull up/down resistors or changing the pad direction. This scenario is
* discouraged, please try to avoid this scenario.
* .
* <h3>Reading from output pads</h3>
* The behavior is not specified but there are implementations better than
* others, this is the list of possible implementations, preferred options
* are on top:
* -# The actual pads states are read (not the output latch).
* -# The output latch value is read (regardless of the actual pads states).
* -# Unspecified, please try to avoid this scenario.
* .
* <h3>Writing unused or unimplemented port bits</h3>
* The behavior is not specified.
*
* <h3>Reading from unused or unimplemented port bits</h3>
* The behavior is not specified.
*
* <h3>Reading or writing on pins associated to other functionalities</h3>
* The behavior is not specified.
*
* <h2>Usage</h2>
* The use of I/O ports requires the inclusion of the header file @p pal.h,
* this file is not automatically included @p ch.h like the other header
* files.
*
* @ingroup IO
*/
/**
* @defgroup PAL_LLD PAL Low Level Driver
* @brief @ref PAL low level driver template.
* @details This file is a template for an I/O port low level driver.
*
* @ingroup PAL
*/
/**
* @defgroup SERIAL Serial Driver
* @brief Generic Serial Drivers.
* @details This module implements a generic full duplex serial driver. The
* driver implements a @p SerialDriver interface and uses I/O Queues for
* communication between the upper and the lower driver. Event flags are used
* to notify the application about incoming data, outgoing data and other I/O
* events.<br>
* The module also contains functions that make the implementation of the
* interrupt service routines much easier.<br>
*
* @ingroup IO
*/
/**
* @defgroup SERIAL_LLD Serial Low Level Driver
* @brief @ref SERIAL low level driver template.
* @details This file is a template for a serial low level driver.
*
* @ingroup SERIAL
*/

137
os/io/io.dox Normal file
View File

@ -0,0 +1,137 @@
/*
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/>.
*/
/**
* @defgroup IO I/O
* @brief I/O related services.
* @details This section contains the I/O related services.
*
* The I/O subsystem is a collection of device driver poertable interfaces and
* platform dependent implementations.<br>
* Under ChibiOS/RT a device driver is split in two layers:
* - High Level Device Driver (<b>HLD</b>). This layer contains the definitions
* of the driver's APIs and the platform independent part of the driver.<br>
* An HLD is composed by two files:
* - @<driver@>.c, the high level implementation file. This file must be
* included in the Makefile in order to use the driver.
* - @<driver@>.h, the high level header file. This file must be included
* by the application code in order to access the driver's APIs.
* .
* - Low Level Device Driver (<b>LLD</b>). This layer contains the platform
* dependent part of the driver.<br>
* A LLD is composed by two files:
* - @<driver@>_lld.c, the low level implementation file. This file must be
* included in the Makefile in order to use the driver.
* - @<driver@>_lld.h, the high level header file. This file is implicitly
* included by the HLD header file.
* .
* .
* <h2>Available Device Drivers</h2>
* The I/O subsystem currently includes support for:
* - @ref PAL.
* - @ref SERIAL.
* .
*/
/**
* @defgroup PAL Ports Abstraction Layer (PAL)
* @brief I/O Ports Abstraction Layer
* @details This module defines an abstract interface for digital I/O ports.
* Note that most I/O ports functions are just macros. The macros
* have default software implementations that can be redefined in a
* @ref PAL_LLD if the target hardware supports special features like, as
* example, atomic bit set/reset/masking. Please refer to the ports specific
* documentation for details.<br>
* The @ref PAL has the advantage to make the access to the I/O ports platform
* independent and still be optimized for the specific architectures.<br>
* Note that the @ref PAL_LLD may also offer non standard macro and functions
* in order to support specific features but, of course, the use of such
* interfaces would not be portable. Such interfaces shall be marked with
* the architecture name inside the function names.
*
* <h2>Implementation Rules</h2>
* In implementing an @ref PAL_LLD there are some rules/behaviors that
* should be respected.
*
* <h3>Writing on input pads</h3>
* The behavior is not specified but there are implementations better than
* others, this is the list of possible implementations, preferred options
* are on top:
* -# The written value is not actually output but latched, should the pads
* be reprogrammed as outputs the value would be in effect.
* -# The write operation is ignored.
* -# The write operation has side effects, as example disabling/enabling
* pull up/down resistors or changing the pad direction. This scenario is
* discouraged, please try to avoid this scenario.
* .
* <h3>Reading from output pads</h3>
* The behavior is not specified but there are implementations better than
* others, this is the list of possible implementations, preferred options
* are on top:
* -# The actual pads states are read (not the output latch).
* -# The output latch value is read (regardless of the actual pads states).
* -# Unspecified, please try to avoid this scenario.
* .
* <h3>Writing unused or unimplemented port bits</h3>
* The behavior is not specified.
*
* <h3>Reading from unused or unimplemented port bits</h3>
* The behavior is not specified.
*
* <h3>Reading or writing on pins associated to other functionalities</h3>
* The behavior is not specified.
*
* <h2>Usage</h2>
* The use of I/O ports requires the inclusion of the header file @p pal.h,
* this file is not automatically included @p ch.h like the other header
* files.
*
* @ingroup IO
*/
/**
* @defgroup PAL_LLD PAL Low Level Driver template
* @brief @ref PAL low level driver template.
* @details This file is a template for an I/O port low level driver.
*
* @ingroup PAL
*/
/**
* @defgroup SERIAL Serial Driver
* @brief Generic Serial Drivers.
* @details This module implements a generic full duplex serial driver. The
* driver implements a @p SerialDriver interface and uses I/O Queues for
* communication between the upper and the lower driver. Event flags are used
* to notify the application about incoming data, outgoing data and other I/O
* events.<br>
* The module also contains functions that make the implementation of the
* interrupt service routines much easier.<br>
*
* @ingroup IO
*/
/**
* @defgroup SERIAL_LLD Serial Low Level Driver template
* @brief @ref SERIAL low level driver template.
* @details This file is a template for a serial low level driver.
*
* @ingroup SERIAL
*/

View File

@ -30,7 +30,7 @@
*/ */
/** /**
* @defgroup AT91SAM7X_PAL I/O Ports Support * @defgroup AT91SAM7X_PAL AT91SAM7X I/O Ports Support
* @brief I/O Ports peripherals support. * @brief I/O Ports peripherals support.
* @details This module supports the AT91SAM7X PIO controller. The controller * @details This module supports the AT91SAM7X PIO controller. The controller
* supports the following features (see @ref PAL): * supports the following features (see @ref PAL):
@ -58,7 +58,7 @@
*/ */
/** /**
* @defgroup AT91SAM7X_SERIAL USART Support * @defgroup AT91SAM7X_SERIAL AT91SAM7X USART Support
* @brief USART peripherals support. * @brief USART peripherals support.
* @details The serial driver supports the AT91SAM7X USART peripherals. * @details The serial driver supports the AT91SAM7X USART peripherals.
* *
@ -66,7 +66,7 @@
*/ */
/** /**
* @defgroup AT91SAM7X_EMAC EMAC Support * @defgroup AT91SAM7X_EMAC AT91SAM7X EMAC Support
* @brief EMAC peripheral support. * @brief EMAC peripheral support.
* *
* @ingroup AT91SAM7X * @ingroup AT91SAM7X

View File

@ -120,13 +120,9 @@ struct _serial_driver_data {
}; };
/** /**
* @brief Generic Serial Driver static initializer. * @brief AT91SAM7X Serial Driver configuration structure.
* @details An instance of this structure must be passed to @p sdStart() * @details An instance of this structure must be passed to @p sdStart()
* in order to configure and start a serial driver operations. * in order to configure and start a serial driver operations.
*
* @note This structure content is architecture dependent, each driver
* implementation defines its own version and the custom static
* initializers.
*/ */
typedef struct { typedef struct {
uint32_t speed; uint32_t speed;

View File

@ -25,7 +25,7 @@
*/ */
/** /**
* @defgroup AVR_SERIAL USART Support * @defgroup AVR_SERIAL AVR USART Support
* @brief USART support. * @brief USART support.
* @details The serial driver supports both the AVR USARTs in asynchronous * @details The serial driver supports both the AVR USARTs in asynchronous
* mode. * mode.

View File

@ -124,13 +124,9 @@ struct _serial_driver_data {
#define UBRR(b) ((F_CPU / (b << 4)) - 1) #define UBRR(b) ((F_CPU / (b << 4)) - 1)
/** /**
* @brief Generic Serial Driver static initializer. * @brief AVR Serial Driver configuration structure.
* @details An instance of this structure must be passed to @p sdStart() * @details An instance of this structure must be passed to @p sdStart()
* in order to configure and start a serial driver operations. * in order to configure and start a serial driver operations.
*
* @note This structure content is architecture dependent, each driver
* implementation defines its own version and the custom static
* initializers.
*/ */
typedef struct { typedef struct {
uint16_t brr; uint16_t brr;

View File

@ -42,7 +42,7 @@
*/ */
/** /**
* @defgroup LPC214x_PAL I/O Ports Support * @defgroup LPC214x_PAL LPC214x I/O Ports Support
* @brief I/O Ports peripherals support. * @brief I/O Ports peripherals support.
* @details This module supports the LPC214x FIO controller. The controller * @details This module supports the LPC214x FIO controller. The controller
* supports the following features (see @ref PAL): * supports the following features (see @ref PAL):
@ -67,7 +67,7 @@
*/ */
/** /**
* @defgroup LPC214x_SERIAL UART Support * @defgroup LPC214x_SERIAL LPC214x UART Support
* @brief UART peripherals support. * @brief UART peripherals support.
* @details The serial driver supports the LPC214x UART peripherals. * @details The serial driver supports the LPC214x UART peripherals.
* *
@ -75,7 +75,7 @@
*/ */
/** /**
* @defgroup LPC214x_SSP SSP Support * @defgroup LPC214x_SSP LPC214x SSP Support
* @brief SSP peripheral support. * @brief SSP peripheral support.
* @details This SPI driver supports the LPC214x SSP peripheral. * @details This SPI driver supports the LPC214x SSP peripheral.
* *

View File

@ -136,13 +136,9 @@ struct _serial_driver_data {
}; };
/** /**
* @brief Generic Serial Driver static initializer. * @brief LPC214x Serial Driver configuration structure.
* @details An instance of this structure must be passed to @p sdStart() * @details An instance of this structure must be passed to @p sdStart()
* in order to configure and start a serial driver operations. * in order to configure and start a serial driver operations.
*
* @note This structure content is architecture dependent, each driver
* implementation defines its own version and the custom static
* initializers.
*/ */
typedef struct { typedef struct {
uint32_t speed; uint32_t speed;

View File

@ -25,7 +25,7 @@
*/ */
/** /**
* @defgroup MSP430_PAL I/O Ports Support * @defgroup MSP430_PAL MSP430 I/O Ports Support
* @brief I/O Ports peripherals support. * @brief I/O Ports peripherals support.
* @details This module supports the MSP430 Digital I/O controller. The * @details This module supports the MSP430 Digital I/O controller. The
* controller supports the following features (see @ref PAL): * controller supports the following features (see @ref PAL):
@ -51,7 +51,7 @@
*/ */
/** /**
* @defgroup MSP430_SERIAL USART Support * @defgroup MSP430_SERIAL MSP430 USART Support
* @brief USART support. * @brief USART support.
* @details The serial driver supports both the MSP430 USARTs in asynchronous * @details The serial driver supports both the MSP430 USARTs in asynchronous
* mode. * mode.

View File

@ -121,13 +121,9 @@ struct _serial_driver_data {
#define UBR(b) (SMCLK / (b)) #define UBR(b) (SMCLK / (b))
/** /**
* @brief Generic Serial Driver static initializer. * @brief MSP430 Serial Driver configuration structure.
* @details An instance of this structure must be passed to @p sdStart() * @details An instance of this structure must be passed to @p sdStart()
* in order to configure and start a serial driver operations. * in order to configure and start a serial driver operations.
*
* @note This structure content is architecture dependent, each driver
* implementation defines its own version and the custom static
* initializers.
*/ */
typedef struct { typedef struct {
uint16_t div; uint16_t div;

View File

@ -18,9 +18,9 @@
*/ */
/** /**
* @defgroup STM32F103 STM32F103 Support * @defgroup STM32 STM32 Support
* @brief STM32F103 specific support. * @brief STM32 specific support.
* @details The STM32F103 support includes: * @details The STM32 support includes:
* - I/O ports driver. * - I/O ports driver.
* - Buffered, interrupt driven, serial driver. * - Buffered, interrupt driven, serial driver.
* - A demo supporting the kernel test suite. * - A demo supporting the kernel test suite.
@ -29,9 +29,9 @@
*/ */
/** /**
* @defgroup STM32F103_PAL I/O Ports Support * @defgroup STM32_PAL STM32 I/O Ports Support
* @brief I/O Ports peripherals support. * @brief I/O Ports peripherals support.
* @details This module supports the STM32F103 GPIO controller. The controller * @details This module supports the STM3 GPIO controller. The controller
* supports the following features (see @ref PAL): * supports the following features (see @ref PAL):
* - 16 bits wide ports. * - 16 bits wide ports.
* - Atomic set/reset functions. * - Atomic set/reset functions.
@ -58,15 +58,15 @@
* resistor can change the resistor setting because the output latch is * resistor can change the resistor setting because the output latch is
* used for resistor selection. * used for resistor selection.
* . * .
* @ingroup STM32F103 * @ingroup STM32
*/ */
/** /**
* @defgroup STM32F103_SERIAL USART Support * @defgroup STM32_SERIAL STM32 USART Support
* @brief USART peripherals support. * @brief USART peripherals support.
* @details The serial driver supports the STM32F103 USARTs in asynchronous * @details The serial driver supports the STM32 USARTs in asynchronous
* mode. * mode.
* *
* @ingroup STM32F103 * @ingroup STM32
*/ */

View File

@ -18,9 +18,9 @@
*/ */
/** /**
* @file STM32F103/serial_lld.c * @file STM32/serial_lld.c
* @brief STM32F103 low level serial driver code * @brief STM32 low level serial driver code
* @addtogroup STM32F103_SERIAL * @addtogroup STM32_SERIAL
* @{ * @{
*/ */

View File

@ -18,9 +18,9 @@
*/ */
/** /**
* @file STM32F103/serial_lld.h * @file STM32/serial_lld.h
* @brief STM32F103 low level serial driver header * @brief STM32 low level serial driver header
* @addtogroup STM32F103_SERIAL * @addtogroup STM32_SERIAL
* @{ * @{
*/ */
@ -159,7 +159,7 @@ struct _serial_driver_data {
}; };
/** /**
* @brief Generic Serial Driver static initializer. * @brief STM32 Serial Driver configuration structure.
* @details An instance of this structure must be passed to @p sdStart() * @details An instance of this structure must be passed to @p sdStart()
* in order to configure and start a serial driver operations. * in order to configure and start a serial driver operations.
* *

View File

@ -78,7 +78,7 @@ struct _serial_driver_data {
}; };
/** /**
* @brief Generic Serial Driver static initializer. * @brief Generic Serial Driver configuration structure.
* @details An instance of this structure must be passed to @p sdStart() * @details An instance of this structure must be passed to @p sdStart()
* in order to configure and start a serial driver operations. * in order to configure and start a serial driver operations.
* *

View File

@ -18,7 +18,7 @@
*/ */
/** /**
* @defgroup utilities_library Utilities Library * @defgroup various Various
* @brief Utilities Library. * @brief Utilities Library.
* @details This is a collection of useful library code that is not part of * @details This is a collection of useful library code that is not part of
* the base kernel services. * the base kernel services.
@ -35,7 +35,7 @@
* @details This module allows to use the ChibiOS/RT functionalities * @details This module allows to use the ChibiOS/RT functionalities
* from C++ as classes and objects rather the traditional "C" APIs. * from C++ as classes and objects rather the traditional "C" APIs.
* *
* @ingroup utilities_library * @ingroup various
*/ */
/** /**
@ -45,5 +45,5 @@
* listening threads can use the event to perform time related activities. * listening threads can use the event to perform time related activities.
* Multiple threads can listen to the same timer. * Multiple threads can listen to the same timer.
* *
* @ingroup utilities_library * @ingroup various
*/ */

47
test/test.dox Normal file
View File

@ -0,0 +1,47 @@
/*
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/>.
*/
/**
* @page testsuite Test Suite
* <h2>Description</h2>
* Most of the ChibiOS/RT demos link a set of software modules (test suite) in
* order to verify the proper working of the kernel, the port and the demo
* itself.<br>
* Each Test Module performs a series of tests on a specified subsystem or
* subsystems and can report a failure/success status and/or a performance
* index as the test suite output.<br>
* The test suite is usually activated in the demo applications by pressing a
* button on the target board, see the readme into the various demos
* directories. The test suite output is usually sent through a serial port and
* can be examined by using a terminal emulator program.
*
* <h2>Test Modules</h2>
* - @subpage test_threads
* - @subpage test_dynamic
* - @subpage test_msg
* - @subpage test_sem
* - @subpage test_mtx
* - @subpage test_events
* - @subpage test_mbox
* - @subpage test_queues
* - @subpage test_heap
* - @subpage test_pools
* - @subpage test_benchmarks
* .
*/