From e20aaf6c29fc5ca91e059bbca8194c8ad7c516b9 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Tue, 2 Jun 2009 08:37:46 +0000 Subject: [PATCH] STM32 support for I/O ports. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1009 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- ports/ARMCM3-STM32F103/port.dox | 24 +++++++++++++++++++----- src/include/ioports.h | 2 +- src/templates/ioports_lld.h | 4 ++-- 3 files changed, 22 insertions(+), 8 deletions(-) diff --git a/ports/ARMCM3-STM32F103/port.dox b/ports/ARMCM3-STM32F103/port.dox index 5c60dd188..33afd445f 100644 --- a/ports/ARMCM3-STM32F103/port.dox +++ b/ports/ARMCM3-STM32F103/port.dox @@ -19,23 +19,37 @@ /** * @defgroup STM32F103 STM32F103 Support - * @{ * @brief STM32F103 specific support. * @details The STM32F103 support includes: * - Buffered, interrupt driven, serial driver. * - A demo supporting the kernel test suite. - * + * . * @ingroup ARMCM3 */ -/** @} */ + +/** + * @defgroup STM32F103_IOPORTS I/O Ports Support + * @brief I/O Ports peripherals support. + * @details This module supports the STM32F103 GPIO controller. The STM32 + * controller is very flexible and allows to implement all the recommended + * behaviors for the I/O port driver. It supports the following features (see + * @ref IOPorts): + * - 16 bits wide ports. + * - Atomic set/reset functions. + * - Atomic set+reset function (atomic bus operations). + * - Output latched regardless of the pad setting. + * - Direct read of input pads regardless of the pad setting. + * . + * The only non atomic operation is bit toggling. + * @ingroup STM32F103 + */ /** * @defgroup STM32F103_SERIAL USART Support - * @{ * @brief USART peripherals support. * @details The serial driver supports the STM32F103 USARTs in asynchronous * mode. * * @ingroup STM32F103 */ -/** @} */ + \ No newline at end of file diff --git a/src/include/ioports.h b/src/include/ioports.h index 6ccf435af..94488640a 100644 --- a/src/include/ioports.h +++ b/src/include/ioports.h @@ -116,7 +116,7 @@ typedef struct { * for atomicity and/or portability reasons you may need to enclose port * I/O operations between @p chSysLock() and @p chSysUnlock(). */ -#define chPortToggle(port, bits) ioport_clear_lld(port, bits) +#define chPortToggle(port, bits) ioport_toggle_lld(port, bits) /** * @brief Writes a value on an I/O bus. diff --git a/src/templates/ioports_lld.h b/src/templates/ioports_lld.h index 422abe350..8420ca1c7 100644 --- a/src/templates/ioports_lld.h +++ b/src/templates/ioports_lld.h @@ -18,7 +18,7 @@ */ /** - * @file ioports_lld.h + * @file src/templates/ioports_lld.h * @brief I/O ports low level driver * @addtogroup IOPortsLLD * @{ @@ -118,7 +118,7 @@ typedef uint32_t ioportid_t; * @note This function is not meant to be invoked directly by the application * code. */ -#define ioport_clear_lld(port, bits) +#define ioport_toggle_lld(port, bits) /** * @brief Writes a value on an I/O bus.