From bede8d6781661d679475d2b60d87fb7f43cc5e8e Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sun, 25 Sep 2011 15:18:18 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3410 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/platforms/AVR/pal_lld.c | 134 ++++++++++++++++ os/hal/platforms/AVR/pal_lld.h | 265 ++++++++++++++++++++++++++++++++ os/hal/platforms/AVR/platform.dox | 14 ++ os/hal/platforms/AVR/platform.mk | 1 + os/hal/platforms/LPC11xx/pal_lld.h | 20 --- os/hal/platforms/LPC13xx/pal_lld.h | 20 --- os/hal/platforms/Posix/pal_lld.h | 8 - os/hal/platforms/STM32/GPIOv1/pal_lld.c | 2 - os/hal/platforms/STM32/GPIOv1/pal_lld.h | 12 -- os/hal/platforms/STM32/GPIOv2/pal_lld.c | 2 - os/hal/platforms/STM32/GPIOv2/pal_lld.h | 12 -- os/hal/platforms/STM8L/pal_lld.c | 2 - os/hal/platforms/STM8L/pal_lld.h | 8 - os/hal/platforms/STM8S/pal_lld.c | 2 - os/hal/platforms/STM8S/pal_lld.h | 8 - os/hal/platforms/Win32/pal_lld.h | 8 - os/hal/templates/pal_lld.h | 28 ---- 17 files changed, 414 insertions(+), 132 deletions(-) create mode 100644 os/hal/platforms/AVR/pal_lld.c create mode 100644 os/hal/platforms/AVR/pal_lld.h (limited to 'os') diff --git a/os/hal/platforms/AVR/pal_lld.c b/os/hal/platforms/AVR/pal_lld.c new file mode 100644 index 000000000..4bfd7bd04 --- /dev/null +++ b/os/hal/platforms/AVR/pal_lld.c @@ -0,0 +1,134 @@ +/* + ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010, + 2011 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 AVR/pal_lld.c + * @brief AVR GPIO low level driver code. + * + * @addtogroup PAL + * @{ + */ + +#include "ch.h" +#include "hal.h" + +#if HAL_USE_PAL || defined(__DOXYGEN__) + +/*===========================================================================*/ +/* Driver exported variables. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Driver local variables. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Driver local functions. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Driver interrupt handlers. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Driver exported functions. */ +/*===========================================================================*/ + +/** + * @brief AVR GPIO ports configuration. + * @details GPIO registers initialization. + * + * @param[in] config the AVR ports configuration + * + * @notapi + */ +void _pal_lld_init(const PALConfig *config) { + +#if defined(PORTA) || defined(__DOXYGEN__) + PORTA = config->porta.out; + DDRA = config->porta.dir; +#endif + +#if defined(PORTB) || defined(__DOXYGEN__) + PORTB = config->portb.out; + DDRB = config->portb.dir; +#endif + +#if defined(PORTC) || defined(__DOXYGEN__) + PORTC = config->portc.out; + DDRC = config->portc.dir; +#endif + +#if defined(PORTD) || defined(__DOXYGEN__) + PORTD = config->portd.out; + DDRD = config->portd.dir; +#endif + +#if defined(PORTE) || defined(__DOXYGEN__) + PORTE = config->porte.out; + DDRE = config->porte.dir; +#endif +} + +/** + * @brief Pads mode setup. + * @details This function programs a pads group belonging to the same port + * with the specified mode. + * + * @param[in] port the port identifier + * @param[in] mask the group mask + * @param[in] mode the mode + * + * @note This function is not meant to be invoked directly by the application + * code. + * @note @p PAL_MODE_UNCONNECTED is implemented as output as recommended by + * the AVR Family User's Guide. Unconnected pads are set to input + * with pull-up by default. + * + * @notapi + * + * TODO: check PAL_MODE_UNCONNECTED mode recommended for AVR + */ +void _pal_lld_setgroupmode(ioportid_t port, + ioportmask_t mask, + iomode_t mode) { + + switch (mode) { + case PAL_MODE_RESET: + case PAL_MODE_INPUT: + port->dir &= ~mask; + break; + case PAL_MODE_INPUT_ANALOG: + port->dir &= ~mask; + port->out &= ~mask; + break; + case PAL_MODE_UNCONNECTED: + case PAL_MODE_INPUT_PULLUP: + port->dir &= ~mask; + port->out |= mask; + case PAL_MODE_OUTPUT_PUSHPULL: + port->dir |= mask; + break; + } +} + +#endif /* HAL_USE_PAL */ + +/** @} */ diff --git a/os/hal/platforms/AVR/pal_lld.h b/os/hal/platforms/AVR/pal_lld.h new file mode 100644 index 000000000..a2d1f8714 --- /dev/null +++ b/os/hal/platforms/AVR/pal_lld.h @@ -0,0 +1,265 @@ +/* + ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010, + 2011 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 AVR/pal_lld.h + * @brief AVR GPIO low level driver header. + * + * @addtogroup PAL + * @{ + */ + +#ifndef _PAL_LLD_H_ +#define _PAL_LLD_H_ + +#if HAL_USE_PAL || defined(__DOXYGEN__) + +/*===========================================================================*/ +/* Unsupported modes and specific modes */ +/*===========================================================================*/ + +#undef PAL_MODE_INPUT_PULLDOWN +#undef PAL_MODE_OUTPUT_OPENDRAIN + +/*===========================================================================*/ +/* I/O Ports Types and constants. */ +/*===========================================================================*/ + +/** + * @brief Width, in bits, of an I/O port. + */ +#define PAL_IOPORTS_WIDTH 8 + +/** + * @brief Whole port mask. + * @brief This macro specifies all the valid bits into a port. + */ +#define PAL_WHOLE_PORT ((ioportmask_t)0xFF) + +/** + * @brief AVR setup registers. + */ +typedef struct { + uint8_t out; + uint8_t dir; +} avr_gpio_setup_t; + +typedef struct { + volatile uint8_t in; + volatile uint8_t dir; + volatile uint8_t out; +} avr_gpio_registers_t; + +/** + * @brief Generic I/O ports 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 + * subsystem. This represents only the initial setup, specific pads + * or whole ports can be reprogrammed at later time. + */ +typedef struct { +#if defined(PORTA) || defined(__DOXYGEN__) + avr_gpio_setup_t porta; +#endif +#if defined(PORTB) || defined(__DOXYGEN__) + avr_gpio_setup_t portb; +#endif +#if defined(PORTC) || defined(__DOXYGEN__) + avr_gpio_setup_t portc; +#endif +#if defined(PORTD) || defined(__DOXYGEN__) + avr_gpio_setup_t portd; +#endif +#if defined(PORTE) || defined(__DOXYGEN__) + avr_gpio_setup_t porte; +#endif +} PALConfig; + +/** + * @brief Digital I/O port sized unsigned type. + */ +typedef uint8_t ioportmask_t; + +/** + * @brief Digital I/O modes. + */ +typedef uint8_t iomode_t; + +/** + * @brief Port Identifier. + * @details This type can be a scalar or some kind of pointer, do not make + * any assumption about it, use the provided macros when populating + * variables of this type. + */ +typedef avr_gpio_registers_t *ioportid_t; + +/*===========================================================================*/ +/* I/O Ports Identifiers. */ +/*===========================================================================*/ + +#if defined(PORTA) || defined(__DOXYGEN__) +/** + * @brief GPIO port A identifier. + */ +#define IOPORT1 ((volatile avr_gpio_registers_t *)&PINA) +#endif + +#if defined(PORTB) || defined(__DOXYGEN__) +/** + * @brief GPIO port B identifier. + */ +#define IOPORT2 ((volatile avr_gpio_registers_t *)&PINB) +#endif + +#if defined(PORTC) || defined(__DOXYGEN__) +/** + * @brief GPIO port C identifier. + */ +#define IOPORT3 ((volatile avr_gpio_registers_t *)&PINC) +#endif + +#if defined(PORTD) || defined(__DOXYGEN__) +/** + * @brief GPIO port D identifier. + */ +#define IOPORT4 ((volatile avr_gpio_registers_t *)&PIND) +#endif + +#if defined(PORTE) || defined(__DOXYGEN__) +/** + * @brief GPIO port E identifier. + */ +#define IOPORT5 ((volatile avr_gpio_registers_t *)&PINE) +#endif + +/*===========================================================================*/ +/* Implementation, some of the following macros could be implemented as */ +/* functions, if so please put them in pal_lld.c. */ +/*===========================================================================*/ + +/** + * @brief Low level PAL subsystem initialization. + * + * @param[in] config the architecture-dependent ports configuration + * + * @notapi + */ +#define pal_lld_init(config) _pal_lld_init(config) + +/** + * @brief Reads the physical I/O port states. + * + * @param[in] port the port identifier + * @return The port bits. + * + * @notapi + */ +#define pal_lld_readport(port) ((port)->in) + +/** + * @brief Reads the output latch. + * @details The purpose of this function is to read back the latched output + * value. + * + * @param[in] port the port identifier + * @return The latched logical states. + * + * @notapi + */ +#define pal_lld_readlatch(port) ((port)->out) + +/** + * @brief Writes a bits mask on a I/O port. + * + * @param[in] port the port identifier + * @param[in] bits the bits to be written on the specified port + * + * @notapi + */ +#define pal_lld_writeport(port, bits) ((port)->out = bits) + +/** + * @brief Pads group mode setup. + * @details This function programs a pads group belonging to the same port + * with the specified mode. + * @note Programming an unknown or unsupported mode is silently ignored. + * + * @param[in] port the port identifier + * @param[in] mask the group mask + * @param[in] mode the mode + * + * @notapi + */ +#define pal_lld_setgroupmode(port, mask, mode) _pal_lld_setgroupmode(port, mask, mode) + +/** + * @brief Sets a pad logical state to @p PAL_HIGH. + * + * @param[in] port the port identifier + * @param[in] pad the pad number within the port + * + * @notapi + */ +#define pal_lld_setpad(port, pad) \ +__asm__ __volatile__ \ +( \ + "sbi %0,%1\n\t" \ + : \ + : "I" (_SFR_IO_ADDR(port->out)), \ + "I" (pad) \ + \ +) + +/** + * @brief Clears a pad logical state to @p PAL_LOW. + * + * @param[in] port the port identifier + * @param[in] pad the pad number within the port + * + * @notapi + */ +#define pal_lld_clearpad(port, pad) \ +__asm__ __volatile__ \ +( \ + "cbi %0,%1\n\t" \ + : \ + : "I" (_SFR_IO_ADDR(port->out)), \ + "I" (pad) \ + \ +) + +extern ROMCONST PALConfig pal_default_config; + +#ifdef __cplusplus +extern "C" { +#endif + void _pal_lld_init(const PALConfig *config); + void _pal_lld_setgroupmode(ioportid_t port, + ioportmask_t mask, + iomode_t mode); +#ifdef __cplusplus +} +#endif + +#endif /* HAL_USE_PAL */ + +#endif /* _PAL_LLD_H_ */ + +/** @} */ diff --git a/os/hal/platforms/AVR/platform.dox b/os/hal/platforms/AVR/platform.dox index bc29954b6..2ac2256b9 100644 --- a/os/hal/platforms/AVR/platform.dox +++ b/os/hal/platforms/AVR/platform.dox @@ -35,6 +35,20 @@ * @ingroup AVR_DRIVERS */ +/** + * @defgroup AVR_PAL AVR PAL Support + * @details The AVR PAL driver uses the GPIO peripherals. + * + * @section avr_pal_1 Supported HW resources + * - GPIOA. + * - GPIOB. + * - GPIOC. + * - GPIOD. + * - GPIOE. + * . + * @ingroup AVR_DRIVERS + */ + /** * @defgroup AVR_SERIAL AVR Serial Support * @details The AVR Serial driver uses the USART peripherals in a diff --git a/os/hal/platforms/AVR/platform.mk b/os/hal/platforms/AVR/platform.mk index fdc5390bb..e31413c79 100644 --- a/os/hal/platforms/AVR/platform.mk +++ b/os/hal/platforms/AVR/platform.mk @@ -1,5 +1,6 @@ # List of all the AVR platform files. PLATFORMSRC = ${CHIBIOS}/os/hal/platforms/AVR/hal_lld.c \ + ${CHIBIOS}/os/hal/platforms/AVR/pal_lld.c \ ${CHIBIOS}/os/hal/platforms/AVR/serial_lld.c # Required include directories diff --git a/os/hal/platforms/LPC11xx/pal_lld.h b/os/hal/platforms/LPC11xx/pal_lld.h index b46362aeb..2e99f0697 100644 --- a/os/hal/platforms/LPC11xx/pal_lld.h +++ b/os/hal/platforms/LPC11xx/pal_lld.h @@ -147,8 +147,6 @@ typedef LPC_GPIO_TypeDef *ioportid_t; /** * @brief Reads the physical I/O port states. - * @note This function is not meant to be invoked directly by the - * application code. * * @param[in] port port identifier * @return The port bits. @@ -161,8 +159,6 @@ typedef LPC_GPIO_TypeDef *ioportid_t; * @brief Reads the output latch. * @details The purpose of this function is to read back the latched output * value. - * @note This function is not meant to be invoked directly by the - * application code. * * @param[in] port port identifier * @return The latched logical states. @@ -173,8 +169,6 @@ typedef LPC_GPIO_TypeDef *ioportid_t; /** * @brief Writes a bits mask on a I/O port. - * @note This function is not meant to be invoked directly by the - * application code. * * @param[in] port port identifier * @param[in] bits bits to be written on the specified port @@ -185,8 +179,6 @@ typedef LPC_GPIO_TypeDef *ioportid_t; /** * @brief Sets a bits mask on a I/O port. - * @note This function is not meant to be invoked directly by the - * application code. * @note The @ref PAL provides a default software implementation of this * functionality, implement this function if can optimize it by using * special hardware functionalities or special coding. @@ -200,8 +192,6 @@ typedef LPC_GPIO_TypeDef *ioportid_t; /** * @brief Clears a bits mask on a I/O port. - * @note This function is not meant to be invoked directly by the - * application code. * @note The @ref PAL provides a default software implementation of this * functionality, implement this function if can optimize it by using * special hardware functionalities or special coding. @@ -215,8 +205,6 @@ typedef LPC_GPIO_TypeDef *ioportid_t; /** * @brief Reads a group of bits. - * @note This function is not meant to be invoked directly by the - * application code. * @note The @ref PAL provides a default software implementation of this * functionality, implement this function if can optimize it by using * special hardware functionalities or special coding. @@ -233,8 +221,6 @@ typedef LPC_GPIO_TypeDef *ioportid_t; /** * @brief Writes a group of bits. - * @note This function is not meant to be invoked directly by the - * application code. * @note The @ref PAL provides a default software implementation of this * functionality, implement this function if can optimize it by using * special hardware functionalities or special coding. @@ -254,8 +240,6 @@ typedef LPC_GPIO_TypeDef *ioportid_t; * @brief Pads group mode setup. * @details This function programs a pads group belonging to the same port * with the specified mode. - * @note This function is not meant to be invoked directly by the - * application code. * @note Programming an unknown or unsupported mode is silently ignored. * * @param[in] port port identifier @@ -287,8 +271,6 @@ typedef LPC_GPIO_TypeDef *ioportid_t; /** * @brief Sets a pad logical state to @p PAL_HIGH. - * @note This function is not meant to be invoked directly by the - * application code. * @note The @ref PAL provides a default software implementation of this * functionality, implement this function if can optimize it by using * special hardware functionalities or special coding. @@ -303,8 +285,6 @@ typedef LPC_GPIO_TypeDef *ioportid_t; /** * @brief Clears a pad logical state to @p PAL_LOW. - * @note This function is not meant to be invoked directly by the - * application code. * @note The @ref PAL provides a default software implementation of this * functionality, implement this function if can optimize it by using * special hardware functionalities or special coding. diff --git a/os/hal/platforms/LPC13xx/pal_lld.h b/os/hal/platforms/LPC13xx/pal_lld.h index 6e291dfc9..0673c11f1 100644 --- a/os/hal/platforms/LPC13xx/pal_lld.h +++ b/os/hal/platforms/LPC13xx/pal_lld.h @@ -147,8 +147,6 @@ typedef LPC_GPIO_TypeDef *ioportid_t; /** * @brief Reads the physical I/O port states. - * @note This function is not meant to be invoked directly by the - * application code. * * @param[in] port port identifier * @return The port bits. @@ -161,8 +159,6 @@ typedef LPC_GPIO_TypeDef *ioportid_t; * @brief Reads the output latch. * @details The purpose of this function is to read back the latched output * value. - * @note This function is not meant to be invoked directly by the - * application code. * * @param[in] port port identifier * @return The latched logical states. @@ -173,8 +169,6 @@ typedef LPC_GPIO_TypeDef *ioportid_t; /** * @brief Writes a bits mask on a I/O port. - * @note This function is not meant to be invoked directly by the - * application code. * * @param[in] port port identifier * @param[in] bits bits to be written on the specified port @@ -185,8 +179,6 @@ typedef LPC_GPIO_TypeDef *ioportid_t; /** * @brief Sets a bits mask on a I/O port. - * @note This function is not meant to be invoked directly by the - * application code. * @note The @ref PAL provides a default software implementation of this * functionality, implement this function if can optimize it by using * special hardware functionalities or special coding. @@ -200,8 +192,6 @@ typedef LPC_GPIO_TypeDef *ioportid_t; /** * @brief Clears a bits mask on a I/O port. - * @note This function is not meant to be invoked directly by the - * application code. * @note The @ref PAL provides a default software implementation of this * functionality, implement this function if can optimize it by using * special hardware functionalities or special coding. @@ -215,8 +205,6 @@ typedef LPC_GPIO_TypeDef *ioportid_t; /** * @brief Reads a group of bits. - * @note This function is not meant to be invoked directly by the - * application code. * @note The @ref PAL provides a default software implementation of this * functionality, implement this function if can optimize it by using * special hardware functionalities or special coding. @@ -233,8 +221,6 @@ typedef LPC_GPIO_TypeDef *ioportid_t; /** * @brief Writes a group of bits. - * @note This function is not meant to be invoked directly by the - * application code. * @note The @ref PAL provides a default software implementation of this * functionality, implement this function if can optimize it by using * special hardware functionalities or special coding. @@ -254,8 +240,6 @@ typedef LPC_GPIO_TypeDef *ioportid_t; * @brief Pads group mode setup. * @details This function programs a pads group belonging to the same port * with the specified mode. - * @note This function is not meant to be invoked directly by the - * application code. * @note Programming an unknown or unsupported mode is silently ignored. * * @param[in] port port identifier @@ -287,8 +271,6 @@ typedef LPC_GPIO_TypeDef *ioportid_t; /** * @brief Sets a pad logical state to @p PAL_HIGH. - * @note This function is not meant to be invoked directly by the - * application code. * @note The @ref PAL provides a default software implementation of this * functionality, implement this function if can optimize it by using * special hardware functionalities or special coding. @@ -303,8 +285,6 @@ typedef LPC_GPIO_TypeDef *ioportid_t; /** * @brief Clears a pad logical state to @p PAL_LOW. - * @note This function is not meant to be invoked directly by the - * application code. * @note The @ref PAL provides a default software implementation of this * functionality, implement this function if can optimize it by using * special hardware functionalities or special coding. diff --git a/os/hal/platforms/Posix/pal_lld.h b/os/hal/platforms/Posix/pal_lld.h index d76eacf25..f8e2a8702 100644 --- a/os/hal/platforms/Posix/pal_lld.h +++ b/os/hal/platforms/Posix/pal_lld.h @@ -140,8 +140,6 @@ typedef sim_vio_port_t *ioportid_t; /** * @brief Reads the physical I/O port states. - * @note This function is not meant to be invoked directly by the - * application code. * * @param[in] port port identifier * @return The port bits. @@ -152,8 +150,6 @@ typedef sim_vio_port_t *ioportid_t; * @brief Reads the output latch. * @details The purpose of this function is to read back the latched output * value. - * @note This function is not meant to be invoked directly by the - * application code. * * @param[in] port port identifier * @return The latched logical states. @@ -162,8 +158,6 @@ typedef sim_vio_port_t *ioportid_t; /** * @brief Writes a bits mask on a I/O port. - * @note This function is not meant to be invoked directly by the - * application code. * * @param[in] port port identifier * @param[in] bits bits to be written on the specified port @@ -174,8 +168,6 @@ typedef sim_vio_port_t *ioportid_t; * @brief Pads group mode setup. * @details This function programs a pads group belonging to the same port * with the specified mode. - * @note This function is not meant to be invoked directly by the - * application code. * @note Programming an unknown or unsupported mode is silently ignored. * * @param[in] port port identifier diff --git a/os/hal/platforms/STM32/GPIOv1/pal_lld.c b/os/hal/platforms/STM32/GPIOv1/pal_lld.c index 274d8b6c0..6b4b806b9 100644 --- a/os/hal/platforms/STM32/GPIOv1/pal_lld.c +++ b/os/hal/platforms/STM32/GPIOv1/pal_lld.c @@ -117,8 +117,6 @@ void _pal_lld_init(const PALConfig *config) { * @brief Pads mode setup. * @details This function programs a pads group belonging to the same port * with the specified mode. - * @note This function is not meant to be invoked directly by the - * application code. * @note @p PAL_MODE_UNCONNECTED is implemented as push pull output at 2MHz. * @note Writing on pads programmed as pull-up or pull-down has the side * effect to modify the resistor setting because the output latched diff --git a/os/hal/platforms/STM32/GPIOv1/pal_lld.h b/os/hal/platforms/STM32/GPIOv1/pal_lld.h index 65e660944..c9bb99de7 100644 --- a/os/hal/platforms/STM32/GPIOv1/pal_lld.h +++ b/os/hal/platforms/STM32/GPIOv1/pal_lld.h @@ -219,8 +219,6 @@ typedef GPIO_TypeDef * ioportid_t; * @brief Writes on a I/O port. * @details This function is implemented by writing the GPIO ODR register, the * implementation has no side effects. - * @note This function is not meant to be invoked directly by the - * application code. * @note Writing on pads programmed as pull-up or pull-down has the side * effect to modify the resistor setting because the output latched * data is used for the resistor selection. @@ -236,8 +234,6 @@ typedef GPIO_TypeDef * ioportid_t; * @brief Sets a bits mask on a I/O port. * @details This function is implemented by writing the GPIO BSRR register, the * implementation has no side effects. - * @note This function is not meant to be invoked directly by the - * application code. * @note Writing on pads programmed as pull-up or pull-down has the side * effect to modify the resistor setting because the output latched * data is used for the resistor selection. @@ -253,8 +249,6 @@ typedef GPIO_TypeDef * ioportid_t; * @brief Clears a bits mask on a I/O port. * @details This function is implemented by writing the GPIO BRR register, the * implementation has no side effects. - * @note This function is not meant to be invoked directly by the - * application code. * @note Writing on pads programmed as pull-up or pull-down has the side * effect to modify the resistor setting because the output latched * data is used for the resistor selection. @@ -270,8 +264,6 @@ typedef GPIO_TypeDef * ioportid_t; * @brief Writes a group of bits. * @details This function is implemented by writing the GPIO BSRR register, the * implementation has no side effects. - * @note This function is not meant to be invoked directly by the - * application code. * @note Writing on pads programmed as pull-up or pull-down has the side * effect to modify the resistor setting because the output latched * data is used for the resistor selection. @@ -292,8 +284,6 @@ typedef GPIO_TypeDef * ioportid_t; * @brief Pads group mode setup. * @details This function programs a pads group belonging to the same port * with the specified mode. - * @note This function is not meant to be invoked directly by the - * application code. * @note Writing on pads programmed as pull-up or pull-down has the side * effect to modify the resistor setting because the output latched * data is used for the resistor selection. @@ -309,8 +299,6 @@ typedef GPIO_TypeDef * ioportid_t; /** * @brief Writes a logical state on an output pad. - * @note This function is not meant to be invoked directly by the - * application code. * @note Writing on pads programmed as pull-up or pull-down has the side * effect to modify the resistor setting because the output latched * data is used for the resistor selection. diff --git a/os/hal/platforms/STM32/GPIOv2/pal_lld.c b/os/hal/platforms/STM32/GPIOv2/pal_lld.c index 8f84f225e..bde24db25 100644 --- a/os/hal/platforms/STM32/GPIOv2/pal_lld.c +++ b/os/hal/platforms/STM32/GPIOv2/pal_lld.c @@ -125,8 +125,6 @@ void _pal_lld_init(const PALConfig *config) { * @brief Pads mode setup. * @details This function programs a pads group belonging to the same port * with the specified mode. - * @note This function is not meant to be invoked directly by the - * application code. * @note @p PAL_MODE_UNCONNECTED is implemented as push pull at minimum * speed. * diff --git a/os/hal/platforms/STM32/GPIOv2/pal_lld.h b/os/hal/platforms/STM32/GPIOv2/pal_lld.h index 6c799c14c..7f8c2e17a 100644 --- a/os/hal/platforms/STM32/GPIOv2/pal_lld.h +++ b/os/hal/platforms/STM32/GPIOv2/pal_lld.h @@ -347,8 +347,6 @@ typedef GPIO_TypeDef * ioportid_t; * @brief Writes on a I/O port. * @details This function is implemented by writing the GPIO ODR register, the * implementation has no side effects. - * @note This function is not meant to be invoked directly by the - * application code. * @note Writing on pads programmed as pull-up or pull-down has the side * effect to modify the resistor setting because the output latched * data is used for the resistor selection. @@ -364,8 +362,6 @@ typedef GPIO_TypeDef * ioportid_t; * @brief Sets a bits mask on a I/O port. * @details This function is implemented by writing the GPIO BSRR register, the * implementation has no side effects. - * @note This function is not meant to be invoked directly by the - * application code. * @note Writing on pads programmed as pull-up or pull-down has the side * effect to modify the resistor setting because the output latched * data is used for the resistor selection. @@ -381,8 +377,6 @@ typedef GPIO_TypeDef * ioportid_t; * @brief Clears a bits mask on a I/O port. * @details This function is implemented by writing the GPIO BSRR register, the * implementation has no side effects. - * @note This function is not meant to be invoked directly by the - * application code. * @note Writing on pads programmed as pull-up or pull-down has the side * effect to modify the resistor setting because the output latched * data is used for the resistor selection. @@ -398,8 +392,6 @@ typedef GPIO_TypeDef * ioportid_t; * @brief Writes a group of bits. * @details This function is implemented by writing the GPIO BSRR register, the * implementation has no side effects. - * @note This function is not meant to be invoked directly by the - * application code. * @note Writing on pads programmed as pull-up or pull-down has the side * effect to modify the resistor setting because the output latched * data is used for the resistor selection. @@ -420,8 +412,6 @@ typedef GPIO_TypeDef * ioportid_t; * @brief Pads group mode setup. * @details This function programs a pads group belonging to the same port * with the specified mode. - * @note This function is not meant to be invoked directly by the - * application code. * @note Writing on pads programmed as pull-up or pull-down has the side * effect to modify the resistor setting because the output latched * data is used for the resistor selection. @@ -437,8 +427,6 @@ typedef GPIO_TypeDef * ioportid_t; /** * @brief Writes a logical state on an output pad. - * @note This function is not meant to be invoked directly by the - * application code. * @note Writing on pads programmed as pull-up or pull-down has the side * effect to modify the resistor setting because the output latched * data is used for the resistor selection. diff --git a/os/hal/platforms/STM8L/pal_lld.c b/os/hal/platforms/STM8L/pal_lld.c index 40dcdf8d2..aba1565cb 100644 --- a/os/hal/platforms/STM8L/pal_lld.c +++ b/os/hal/platforms/STM8L/pal_lld.c @@ -55,8 +55,6 @@ * @brief Pads mode setup. * @details This function programs a pads group belonging to the same port * with the specified mode. - * @note This function is not meant to be invoked directly by the - * application code. * @note @p PAL_MODE_UNCONNECTED is implemented as push pull output at 2MHz. * * @param[in] port the port identifier diff --git a/os/hal/platforms/STM8L/pal_lld.h b/os/hal/platforms/STM8L/pal_lld.h index 30fef0e82..22d048c74 100644 --- a/os/hal/platforms/STM8L/pal_lld.h +++ b/os/hal/platforms/STM8L/pal_lld.h @@ -184,8 +184,6 @@ typedef GPIO_TypeDef *ioportid_t; /** * @brief Reads the physical I/O port states. - * @note This function is not meant to be invoked directly by the - * application code. * * @param[in] port port identifier * @return The port bits. @@ -198,8 +196,6 @@ typedef GPIO_TypeDef *ioportid_t; * @brief Reads the output latch. * @details The purpose of this function is to read back the latched output * value. - * @note This function is not meant to be invoked directly by the - * application code. * * @param[in] port port identifier * @return The latched logical states. @@ -210,8 +206,6 @@ typedef GPIO_TypeDef *ioportid_t; /** * @brief Writes a bits mask on a I/O port. - * @note This function is not meant to be invoked directly by the - * application code. * * @param[in] port port identifier * @param[in] bits bits to be written on the specified port @@ -224,8 +218,6 @@ typedef GPIO_TypeDef *ioportid_t; * @brief Pads group mode setup. * @details This function programs a pads group belonging to the same port * with the specified mode. - * @note This function is not meant to be invoked directly by the - * application code. * @note Programming an unknown or unsupported mode is silently ignored. * * @param[in] port port identifier diff --git a/os/hal/platforms/STM8S/pal_lld.c b/os/hal/platforms/STM8S/pal_lld.c index cebf349aa..e1e6d919e 100644 --- a/os/hal/platforms/STM8S/pal_lld.c +++ b/os/hal/platforms/STM8S/pal_lld.c @@ -55,8 +55,6 @@ * @brief Pads mode setup. * @details This function programs a pads group belonging to the same port * with the specified mode. - * @note This function is not meant to be invoked directly by the - * application code. * @note @p PAL_MODE_UNCONNECTED is implemented as push pull output at 2MHz. * * @param[in] port the port identifier diff --git a/os/hal/platforms/STM8S/pal_lld.h b/os/hal/platforms/STM8S/pal_lld.h index 954a11361..d38406b2f 100644 --- a/os/hal/platforms/STM8S/pal_lld.h +++ b/os/hal/platforms/STM8S/pal_lld.h @@ -169,8 +169,6 @@ typedef GPIO_TypeDef *ioportid_t; /** * @brief Reads the physical I/O port states. - * @note This function is not meant to be invoked directly by the - * application code. * * @param[in] port port identifier * @return The port bits. @@ -183,8 +181,6 @@ typedef GPIO_TypeDef *ioportid_t; * @brief Reads the output latch. * @details The purpose of this function is to read back the latched output * value. - * @note This function is not meant to be invoked directly by the - * application code. * * @param[in] port port identifier * @return The latched logical states. @@ -195,8 +191,6 @@ typedef GPIO_TypeDef *ioportid_t; /** * @brief Writes a bits mask on a I/O port. - * @note This function is not meant to be invoked directly by the - * application code. * * @param[in] port port identifier * @param[in] bits bits to be written on the specified port @@ -209,8 +203,6 @@ typedef GPIO_TypeDef *ioportid_t; * @brief Pads group mode setup. * @details This function programs a pads group belonging to the same port * with the specified mode. - * @note This function is not meant to be invoked directly by the - * application code. * @note Programming an unknown or unsupported mode is silently ignored. * * @param[in] port port identifier diff --git a/os/hal/platforms/Win32/pal_lld.h b/os/hal/platforms/Win32/pal_lld.h index ad70eeebc..e0f03e135 100644 --- a/os/hal/platforms/Win32/pal_lld.h +++ b/os/hal/platforms/Win32/pal_lld.h @@ -140,8 +140,6 @@ typedef sim_vio_port_t *ioportid_t; /** * @brief Reads the physical I/O port states. - * @note This function is not meant to be invoked directly by the - * application code. * * @param[in] port port identifier * @return The port bits. @@ -152,8 +150,6 @@ typedef sim_vio_port_t *ioportid_t; * @brief Reads the output latch. * @details The purpose of this function is to read back the latched output * value. - * @note This function is not meant to be invoked directly by the - * application code. * * @param[in] port port identifier * @return The latched logical states. @@ -162,8 +158,6 @@ typedef sim_vio_port_t *ioportid_t; /** * @brief Writes a bits mask on a I/O port. - * @note This function is not meant to be invoked directly by the - * application code. * * @param[in] port port identifier * @param[in] bits bits to be written on the specified port @@ -174,8 +168,6 @@ typedef sim_vio_port_t *ioportid_t; * @brief Pads group mode setup. * @details This function programs a pads group belonging to the same port * with the specified mode. - * @note This function is not meant to be invoked directly by the - * application code. * @note Programming an unknown or unsupported mode is silently ignored. * * @param[in] port port identifier diff --git a/os/hal/templates/pal_lld.h b/os/hal/templates/pal_lld.h index 46f5a3d39..60bac5e5c 100644 --- a/os/hal/templates/pal_lld.h +++ b/os/hal/templates/pal_lld.h @@ -108,8 +108,6 @@ typedef uint32_t ioportid_t; /** * @brief Reads the physical I/O port states. - * @note This function is not meant to be invoked directly by the - * application code. * * @param[in] port port identifier * @return The port bits. @@ -122,8 +120,6 @@ typedef uint32_t ioportid_t; * @brief Reads the output latch. * @details The purpose of this function is to read back the latched output * value. - * @note This function is not meant to be invoked directly by the - * application code. * * @param[in] port port identifier * @return The latched logical states. @@ -134,8 +130,6 @@ typedef uint32_t ioportid_t; /** * @brief Writes a bits mask on a I/O port. - * @note This function is not meant to be invoked directly by the - * application code. * * @param[in] port port identifier * @param[in] bits bits to be written on the specified port @@ -146,8 +140,6 @@ typedef uint32_t ioportid_t; /** * @brief Sets a bits mask on a I/O port. - * @note This function is not meant to be invoked directly by the - * application code. * @note The @ref PAL provides a default software implementation of this * functionality, implement this function if can optimize it by using * special hardware functionalities or special coding. @@ -161,8 +153,6 @@ typedef uint32_t ioportid_t; /** * @brief Clears a bits mask on a I/O port. - * @note This function is not meant to be invoked directly by the - * application code. * @note The @ref PAL provides a default software implementation of this * functionality, implement this function if can optimize it by using * special hardware functionalities or special coding. @@ -176,8 +166,6 @@ typedef uint32_t ioportid_t; /** * @brief Toggles a bits mask on a I/O port. - * @note This function is not meant to be invoked directly by the - * application code. * @note The @ref PAL provides a default software implementation of this * functionality, implement this function if can optimize it by using * special hardware functionalities or special coding. @@ -191,8 +179,6 @@ typedef uint32_t ioportid_t; /** * @brief Reads a group of bits. - * @note This function is not meant to be invoked directly by the - * application code. * @note The @ref PAL provides a default software implementation of this * functionality, implement this function if can optimize it by using * special hardware functionalities or special coding. @@ -208,8 +194,6 @@ typedef uint32_t ioportid_t; /** * @brief Writes a group of bits. - * @note This function is not meant to be invoked directly by the - * application code. * @note The @ref PAL provides a default software implementation of this * functionality, implement this function if can optimize it by using * special hardware functionalities or special coding. @@ -228,8 +212,6 @@ typedef uint32_t ioportid_t; * @brief Pads group mode setup. * @details This function programs a pads group belonging to the same port * with the specified mode. - * @note This function is not meant to be invoked directly by the - * application code. * @note Programming an unknown or unsupported mode is silently ignored. * * @param[in] port port identifier @@ -242,8 +224,6 @@ typedef uint32_t ioportid_t; /** * @brief Reads a logical state from an I/O pad. - * @note This function is not meant to be invoked directly by the - * application code. * @note The @ref PAL provides a default software implementation of this * functionality, implement this function if can optimize it by using * special hardware functionalities or special coding. @@ -277,8 +257,6 @@ typedef uint32_t ioportid_t; /** * @brief Sets a pad logical state to @p PAL_HIGH. - * @note This function is not meant to be invoked directly by the - * application code. * @note The @ref PAL provides a default software implementation of this * functionality, implement this function if can optimize it by using * special hardware functionalities or special coding. @@ -292,8 +270,6 @@ typedef uint32_t ioportid_t; /** * @brief Clears a pad logical state to @p PAL_LOW. - * @note This function is not meant to be invoked directly by the - * application code. * @note The @ref PAL provides a default software implementation of this * functionality, implement this function if can optimize it by using * special hardware functionalities or special coding. @@ -307,8 +283,6 @@ typedef uint32_t ioportid_t; /** * @brief Toggles a pad logical state. - * @note This function is not meant to be invoked directly by the - * application code. * @note The @ref PAL provides a default software implementation of this * functionality, implement this function if can optimize it by using * special hardware functionalities or special coding. @@ -323,8 +297,6 @@ typedef uint32_t ioportid_t; /** * @brief Pad mode setup. * @details This function programs a pad with the specified mode. - * @note This function is not meant to be invoked directly by the - * application code. * @note The @ref PAL provides a default software implementation of this * functionality, implement this function if can optimize it by using * special hardware functionalities or special coding. -- cgit v1.2.3