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

master
gdisirio 2011-09-25 15:18:18 +00:00
parent aba41323fc
commit bede8d6781
19 changed files with 431 additions and 141 deletions

View File

@ -27,10 +27,12 @@
<option id="org.eclipse.cdt.build.core.settings.holder.undef.incpaths.180845835" name="Undefined Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.undef.incpaths" valueType="undefIncludePath">
<listOptionValue builtIn="false" value="C:/Programmi/MinGW/include"/>
<listOptionValue builtIn="false" value="C:/Programmi/MinGW/lib/gcc/mingw32/3.4.5/include"/>
<listOptionValue builtIn="false" value="C:/Projects/ChibiOS-RT/ports/AVR"/>
<listOptionValue builtIn="false" value="C:/Projects/ChibiOS-RT/src/include"/>
<listOptionValue builtIn="false" value="D:/Progetti/ChibiOS-RT/src/lib"/>
<listOptionValue builtIn="false" value="D:/Progetti/ChibiOS-RT/os/io/platforms/AVR"/>
<listOptionValue builtIn="false" value="D:/Progetti/ChibiOS-RT/ports/AVR"/>
<listOptionValue builtIn="false" value="C:/Programmi/MinGW/lib/gcc/mingw32/3.4.2/include"/>
<listOptionValue builtIn="false" value="C:/Projects/ChibiOS-RT/src/lib"/>
<listOptionValue builtIn="false" value="D:/Progetti/ChibiOS-RT/os/io"/>
<listOptionValue builtIn="false" value="D:/Progetti/ChibiOS-RT/src/include"/>
</option>
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1302832296" languageId="org.eclipse.cdt.core.assembly" languageName="Assembly" sourceContentType="org.eclipse.cdt.core.asmSource" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
</tool>
@ -38,10 +40,12 @@
<option id="org.eclipse.cdt.build.core.settings.holder.undef.incpaths.1703575141" name="Undefined Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.undef.incpaths" valueType="undefIncludePath">
<listOptionValue builtIn="false" value="C:/Programmi/MinGW/include"/>
<listOptionValue builtIn="false" value="C:/Programmi/MinGW/lib/gcc/mingw32/3.4.5/include"/>
<listOptionValue builtIn="false" value="C:/Projects/ChibiOS-RT/ports/AVR"/>
<listOptionValue builtIn="false" value="C:/Projects/ChibiOS-RT/src/include"/>
<listOptionValue builtIn="false" value="D:/Progetti/ChibiOS-RT/src/lib"/>
<listOptionValue builtIn="false" value="D:/Progetti/ChibiOS-RT/os/io/platforms/AVR"/>
<listOptionValue builtIn="false" value="D:/Progetti/ChibiOS-RT/ports/AVR"/>
<listOptionValue builtIn="false" value="C:/Programmi/MinGW/lib/gcc/mingw32/3.4.2/include"/>
<listOptionValue builtIn="false" value="C:/Projects/ChibiOS-RT/src/lib"/>
<listOptionValue builtIn="false" value="D:/Progetti/ChibiOS-RT/os/io"/>
<listOptionValue builtIn="false" value="D:/Progetti/ChibiOS-RT/src/include"/>
</option>
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.240275561" languageId="org.eclipse.cdt.core.g++" languageName="GNU C++" sourceContentType="org.eclipse.cdt.core.cxxSource,org.eclipse.cdt.core.cxxHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
</tool>
@ -49,10 +53,12 @@
<option id="org.eclipse.cdt.build.core.settings.holder.undef.incpaths.1471311358" name="Undefined Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.undef.incpaths" valueType="undefIncludePath">
<listOptionValue builtIn="false" value="C:/Programmi/MinGW/include"/>
<listOptionValue builtIn="false" value="C:/Programmi/MinGW/lib/gcc/mingw32/3.4.5/include"/>
<listOptionValue builtIn="false" value="C:/Projects/ChibiOS-RT/ports/AVR"/>
<listOptionValue builtIn="false" value="C:/Projects/ChibiOS-RT/src/include"/>
<listOptionValue builtIn="false" value="D:/Progetti/ChibiOS-RT/src/lib"/>
<listOptionValue builtIn="false" value="D:/Progetti/ChibiOS-RT/os/io/platforms/AVR"/>
<listOptionValue builtIn="false" value="D:/Progetti/ChibiOS-RT/ports/AVR"/>
<listOptionValue builtIn="false" value="C:/Programmi/MinGW/lib/gcc/mingw32/3.4.2/include"/>
<listOptionValue builtIn="false" value="C:/Projects/ChibiOS-RT/src/lib"/>
<listOptionValue builtIn="false" value="D:/Progetti/ChibiOS-RT/os/io"/>
<listOptionValue builtIn="false" value="D:/Progetti/ChibiOS-RT/src/include"/>
</option>
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1548585203" languageId="org.eclipse.cdt.core.gcc" languageName="GNU C" sourceContentType="org.eclipse.cdt.core.cSource,org.eclipse.cdt.core.cHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
</tool>

View File

@ -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 <http://www.gnu.org/licenses/>.
*/
/**
* @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 */
/** @} */

View File

@ -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 <http://www.gnu.org/licenses/>.
*/
/**
* @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_ */
/** @} */

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -97,6 +97,8 @@
(backported to 2.2.4).
- FIX: Fixed timeout problem in the lwIP interface layer (bug 3302420)
(backported to 2.2.4).
- NEW: Added AVR implementation of the PAL driver contributed by Leszek.
(TODO: Update demos to use it)
- NEW: Added Eclipse project files to all makefile-based demos in order to
allow an easier import. The Eclipse workspace is assumed to be created
inside the ChibiOS/RT main directory.