From c397738010966f85c7ae841e21d74790ac49611c Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sat, 31 Dec 2011 10:07:43 +0000 Subject: Changes to palSetGroupMode(), various adjustments to the PAL driver. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3695 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/include/pal.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'os/hal/include/pal.h') diff --git a/os/hal/include/pal.h b/os/hal/include/pal.h index d844ca8b3..8b15d20bc 100644 --- a/os/hal/include/pal.h +++ b/os/hal/include/pal.h @@ -137,7 +137,7 @@ typedef struct { /** * @brief Offset, within the port, of the least significant bit of the bus. */ - iomode_t offset; + uint_fast8_t offset; } IOBus; /*===========================================================================*/ @@ -153,7 +153,6 @@ typedef struct { */ #define PAL_PORT_BIT(n) ((ioportmask_t)(1 << (n))) - /** * @brief Bits group mask helper. * @details This macro calculates the mask of a bits group. @@ -368,14 +367,16 @@ typedef struct { * * @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 */ #if !defined(pal_lld_setgroupmode) || defined(__DOXYGEN__) -#define palSetGroupMode(port, mask, mode) +#define palSetGroupMode(port, mask, offset, mode) #else -#define palSetGroupMode(port, mask, mode) pal_lld_setgroupmode(port, mask, mode) +#define palSetGroupMode(port, mask, offset, mode) \ + pal_lld_setgroupmode(port, mask, offset, mode) #endif /** @@ -509,7 +510,7 @@ typedef struct { */ #if !defined(pal_lld_setpadmode) || defined(__DOXYGEN__) #define palSetPadMode(port, pad, mode) \ - palSetGroupMode(port, PAL_PORT_BIT(pad), mode) + palSetGroupMode(port, PAL_PORT_BIT(pad), 0, mode) #else #define palSetPadMode(port, pad, mode) pal_lld_setpadmode(port, pad, mode) #endif -- cgit v1.2.3