aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-08-15 08:44:22 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-08-15 08:44:22 +0000
commit3dd5d89297dbed8cfde1b31d6dac91c7211f2979 (patch)
tree258414cb279784eec27c489f211943f0295dd523
parent6c2ed791b1f10a67624dd53848e6e0da6a464ceb (diff)
downloadChibiOS-3dd5d89297dbed8cfde1b31d6dac91c7211f2979.tar.gz
ChibiOS-3dd5d89297dbed8cfde1b31d6dac91c7211f2979.tar.bz2
ChibiOS-3dd5d89297dbed8cfde1b31d6dac91c7211f2979.zip
Fixed bug bug #427.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@6156 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r--os/hal/include/pal.h45
-rw-r--r--os/hal/src/pal.c18
-rw-r--r--readme.txt2
3 files changed, 41 insertions, 24 deletions
diff --git a/os/hal/include/pal.h b/os/hal/include/pal.h
index 694da12ae..d73e72d09 100644
--- a/os/hal/include/pal.h
+++ b/os/hal/include/pal.h
@@ -211,11 +211,12 @@ typedef struct {
* @brief Reads the physical I/O port states.
* @note The default implementation always return zero and computes the
* parameter eventual side effects.
+ * @note The function can be called from any context.
*
* @param[in] port port identifier
* @return The port logical states.
*
- * @api
+ * @special
*/
#if !defined(pal_lld_readport) || defined(__DOXYGEN__)
#define palReadPort(port) ((void)(port), 0)
@@ -229,11 +230,12 @@ typedef struct {
* value.
* @note The default implementation always return zero and computes the
* parameter eventual side effects.
+ * @note The function can be called from any context.
*
* @param[in] port port identifier
* @return The latched logical states.
*
- * @api
+ * @special
*/
#if !defined(pal_lld_readlatch) || defined(__DOXYGEN__)
#define palReadLatch(port) ((void)(port), 0)
@@ -245,11 +247,12 @@ typedef struct {
* @brief Writes a bits mask on a I/O port.
* @note The default implementation does nothing except computing the
* parameters eventual side effects.
+ * @note The function can be called from any context.
*
* @param[in] port port identifier
* @param[in] bits bits to be written on the specified port
*
- * @api
+ * @special
*/
#if !defined(pal_lld_writeport) || defined(__DOXYGEN__)
#define palWritePort(port, bits) ((void)(port), (void)(bits))
@@ -266,11 +269,12 @@ typedef struct {
* @note The default implementation is non atomic and not necessarily
* optimal. Low level drivers may optimize the function by using
* specific hardware or coding.
+ * @note The function can be called from any context.
*
* @param[in] port port identifier
* @param[in] bits bits to be ORed on the specified port
*
- * @api
+ * @special
*/
#if !defined(pal_lld_setport) || defined(__DOXYGEN__)
#define palSetPort(port, bits) \
@@ -288,11 +292,12 @@ typedef struct {
* @note The default implementation is non atomic and not necessarily
* optimal. Low level drivers may optimize the function by using
* specific hardware or coding.
+ * @note The function can be called from any context.
*
* @param[in] port port identifier
* @param[in] bits bits to be cleared on the specified port
*
- * @api
+ * @special
*/
#if !defined(pal_lld_clearport) || defined(__DOXYGEN__)
#define palClearPort(port, bits) \
@@ -310,11 +315,12 @@ typedef struct {
* @note The default implementation is non atomic and not necessarily
* optimal. Low level drivers may optimize the function by using
* specific hardware or coding.
+ * @note The function can be called from any context.
*
* @param[in] port port identifier
* @param[in] bits bits to be XORed on the specified port
*
- * @api
+ * @special
*/
#if !defined(pal_lld_toggleport) || defined(__DOXYGEN__)
#define palTogglePort(port, bits) \
@@ -325,6 +331,7 @@ typedef struct {
/**
* @brief Reads a group of bits.
+ * @note The function can be called from any context.
*
* @param[in] port port identifier
* @param[in] mask group mask, a logical AND is performed on the input
@@ -332,7 +339,7 @@ typedef struct {
* @param[in] offset group bit offset within the port
* @return The group logical states.
*
- * @api
+ * @special
*/
#if !defined(pal_lld_readgroup) || defined(__DOXYGEN__)
#define palReadGroup(port, mask, offset) \
@@ -343,6 +350,7 @@ typedef struct {
/**
* @brief Writes a group of bits.
+ * @note The function can be called from any context.
*
* @param[in] port port identifier
* @param[in] mask group mask, a logical AND is performed on the
@@ -351,7 +359,7 @@ typedef struct {
* @param[in] bits bits to be written. Values exceeding the group
* width are masked.
*
- * @api
+ * @special
*/
#if !defined(pal_lld_writegroup) || defined(__DOXYGEN__)
#define palWriteGroup(port, mask, offset, bits) \
@@ -368,13 +376,14 @@ typedef struct {
* @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.
+ * @note The function can be called from any context.
*
* @param[in] port port identifier
* @param[in] mask group mask
* @param[in] offset group bit offset within the port
* @param[in] mode group mode
*
- * @api
+ * @special
*/
#if !defined(pal_lld_setgroupmode) || defined(__DOXYGEN__)
#define palSetGroupMode(port, mask, offset, mode)
@@ -389,6 +398,7 @@ typedef struct {
* drivers may optimize the function by using specific hardware
* or coding.
* @note The default implementation internally uses the @p palReadPort().
+ * @note The function can be called from any context.
*
* @param[in] port port identifier
* @param[in] pad pad number within the port
@@ -396,7 +406,7 @@ typedef struct {
* @retval PAL_LOW low logical state.
* @retval PAL_HIGH high logical state.
*
- * @api
+ * @special
*/
#if !defined(pal_lld_readpad) || defined(__DOXYGEN__)
#define palReadPad(port, pad) ((palReadPort(port) >> (pad)) & 1)
@@ -415,13 +425,14 @@ typedef struct {
* specific hardware or coding.
* @note The default implementation internally uses the @p palReadLatch()
* and @p palWritePort().
+ * @note The function can be called from any context.
*
* @param[in] port port identifier
* @param[in] pad pad number within the port
* @param[in] bit logical value, the value must be @p PAL_LOW or
* @p PAL_HIGH
*
- * @api
+ * @special
*/
#if !defined(pal_lld_writepad) || defined(__DOXYGEN__)
#define palWritePad(port, pad, bit) \
@@ -441,11 +452,12 @@ typedef struct {
* optimal. Low level drivers may optimize the function by using
* specific hardware or coding.
* @note The default implementation internally uses the @p palSetPort().
+ * @note The function can be called from any context.
*
* @param[in] port port identifier
* @param[in] pad pad number within the port
*
- * @api
+ * @special
*/
#if !defined(pal_lld_setpad) || defined(__DOXYGEN__)
#define palSetPad(port, pad) palSetPort(port, PAL_PORT_BIT(pad))
@@ -463,11 +475,12 @@ typedef struct {
* optimal. Low level drivers may optimize the function by using
* specific hardware or coding.
* @note The default implementation internally uses the @p palClearPort().
+ * @note The function can be called from any context.
*
* @param[in] port port identifier
* @param[in] pad pad number within the port
*
- * @api
+ * @special
*/
#if !defined(pal_lld_clearpad) || defined(__DOXYGEN__)
#define palClearPad(port, pad) palClearPort(port, PAL_PORT_BIT(pad))
@@ -485,11 +498,12 @@ typedef struct {
* optimal. Low level drivers may optimize the function by using
* specific hardware or coding.
* @note The default implementation internally uses the @p palTogglePort().
+ * @note The function can be called from any context.
*
* @param[in] port port identifier
* @param[in] pad pad number within the port
*
- * @api
+ * @special
*/
#if !defined(pal_lld_togglepad) || defined(__DOXYGEN__)
#define palTogglePad(port, pad) palTogglePort(port, PAL_PORT_BIT(pad))
@@ -504,12 +518,13 @@ typedef struct {
* drivers may optimize the function by using specific hardware
* or coding.
* @note Programming an unknown or unsupported mode is silently ignored.
+ * @note The function can be called from any context.
*
* @param[in] port port identifier
* @param[in] pad pad number within the port
* @param[in] mode pad mode
*
- * @api
+ * @special
*/
#if !defined(pal_lld_setpadmode) || defined(__DOXYGEN__)
#define palSetPadMode(port, pad, mode) \
diff --git a/os/hal/src/pal.c b/os/hal/src/pal.c
index cc382edab..602566cca 100644
--- a/os/hal/src/pal.c
+++ b/os/hal/src/pal.c
@@ -60,16 +60,16 @@
* @note The function internally uses the @p palReadGroup() macro. The use
* of this function is preferred when you value code size, readability
* and error checking over speed.
+ * @note The function can be called from any context.
*
* @param[in] bus the I/O bus, pointer to a @p IOBus structure
* @return The bus logical states.
*
- * @api
+ * @special
*/
ioportmask_t palReadBus(IOBus *bus) {
- chDbgCheck((bus != NULL) &&
- (bus->offset < PAL_IOPORTS_WIDTH), "palReadBus");
+ osalDbgCheck((bus != NULL) && (bus->offset < PAL_IOPORTS_WIDTH));
return palReadGroup(bus->portid, bus->mask, bus->offset);
}
@@ -83,18 +83,18 @@ ioportmask_t palReadBus(IOBus *bus) {
* @note The default implementation is non atomic and not necessarily
* optimal. Low level drivers may optimize the function by using
* specific hardware or coding.
+ * @note The function can be called from any context.
*
* @param[in] bus the I/O bus, pointer to a @p IOBus structure
* @param[in] bits the bits to be written on the I/O bus. Values exceeding
* the bus width are masked so most significant bits are
* lost.
*
- * @api
+ * @special
*/
void palWriteBus(IOBus *bus, ioportmask_t bits) {
- chDbgCheck((bus != NULL) &&
- (bus->offset < PAL_IOPORTS_WIDTH), "palWriteBus");
+ osalDbgCheck((bus != NULL) && (bus->offset < PAL_IOPORTS_WIDTH));
palWriteGroup(bus->portid, bus->mask, bus->offset, bits);
}
@@ -108,16 +108,16 @@ void palWriteBus(IOBus *bus, ioportmask_t bits) {
* @note The default implementation is non atomic and not necessarily
* optimal. Low level drivers may optimize the function by using
* specific hardware or coding.
+ * @note The function can be called from any context.
*
* @param[in] bus the I/O bus, pointer to a @p IOBus structure
* @param[in] mode the mode
*
- * @api
+ * @special
*/
void palSetBusMode(IOBus *bus, iomode_t mode) {
- chDbgCheck((bus != NULL) &&
- (bus->offset < PAL_IOPORTS_WIDTH), "palSetBusMode");
+ osalDbgCheck((bus != NULL) && (bus->offset < PAL_IOPORTS_WIDTH));
palSetGroupMode(bus->portid, bus->mask, bus->offset, mode);
}
diff --git a/readme.txt b/readme.txt
index f2d94fa2c..ebe24bb50 100644
--- a/readme.txt
+++ b/readme.txt
@@ -89,6 +89,8 @@
*****************************************************************************
*** 2.7.0 ***
+- FIX: Fixed PAL driver documentation error (bug #427)(backported to 2.6.1
+ and 2.4.5).
- FIX: Fixed UART4 and 5 marked as not present in STM32F30x devices (bug #426)
(backported to 2.6.1).
- FIX: Fixed warning in STM32 ICU/PWM drivers when used on STM32F3xx