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

master
gdisirio 2012-07-07 09:39:20 +00:00
parent dd8ce2d03d
commit b8c97b4247
1 changed files with 12 additions and 12 deletions

View File

@ -172,7 +172,7 @@ typedef struct {
* @param[in] width bus width in bits
* @param[in] offset bus bit offset within the port
*/
#define _IOBUS_DATA(name, port, width, offset) \
#define _IOBUS_DATA(name, port, width, offset) \
{port, PAL_GROUP_MASK(width), offset}
/**
@ -183,7 +183,7 @@ typedef struct {
* @param[in] width bus width in bits
* @param[in] offset bus bit offset within the port
*/
#define IOBUS_DECL(name, port, width, offset) \
#define IOBUS_DECL(name, port, width, offset) \
IOBus name = _IOBUS_DATA(name, port, width, offset)
/**
@ -269,7 +269,7 @@ typedef struct {
* @api
*/
#if !defined(pal_lld_setport) || defined(__DOXYGEN__)
#define palSetPort(port, bits) \
#define palSetPort(port, bits) \
palWritePort(port, palReadLatch(port) | (bits))
#else
#define palSetPort(port, bits) pal_lld_setport(port, bits)
@ -291,7 +291,7 @@ typedef struct {
* @api
*/
#if !defined(pal_lld_clearport) || defined(__DOXYGEN__)
#define palClearPort(port, bits) \
#define palClearPort(port, bits) \
palWritePort(port, palReadLatch(port) & ~(bits))
#else
#define palClearPort(port, bits) pal_lld_clearport(port, bits)
@ -313,7 +313,7 @@ typedef struct {
* @api
*/
#if !defined(pal_lld_toggleport) || defined(__DOXYGEN__)
#define palTogglePort(port, bits) \
#define palTogglePort(port, bits) \
palWritePort(port, palReadLatch(port) ^ (bits))
#else
#define palTogglePort(port, bits) pal_lld_toggleport(port, bits)
@ -331,7 +331,7 @@ typedef struct {
* @api
*/
#if !defined(pal_lld_readgroup) || defined(__DOXYGEN__)
#define palReadGroup(port, mask, offset) \
#define palReadGroup(port, mask, offset) \
((palReadPort(port) >> (offset)) & (mask))
#else
#define palReadGroup(port, mask, offset) pal_lld_readgroup(port, mask, offset)
@ -350,11 +350,11 @@ typedef struct {
* @api
*/
#if !defined(pal_lld_writegroup) || defined(__DOXYGEN__)
#define palWriteGroup(port, mask, offset, bits) \
palWritePort(port, (palReadLatch(port) & ~((mask) << (offset))) | \
#define palWriteGroup(port, mask, offset, bits) \
palWritePort(port, (palReadLatch(port) & ~((mask) << (offset))) | \
(((bits) & (mask)) << (offset)))
#else
#define palWriteGroup(port, mask, offset, bits) \
#define palWriteGroup(port, mask, offset, bits) \
pal_lld_writegroup(port, mask, offset, bits)
#endif
@ -420,8 +420,8 @@ typedef struct {
* @api
*/
#if !defined(pal_lld_writepad) || defined(__DOXYGEN__)
#define palWritePad(port, pad, bit) \
palWritePort(port, (palReadLatch(port) & ~PAL_PORT_BIT(pad)) | \
#define palWritePad(port, pad, bit) \
palWritePort(port, (palReadLatch(port) & ~PAL_PORT_BIT(pad)) | \
(((bit) & 1) << pad))
#else
#define palWritePad(port, pad, bit) pal_lld_writepad(port, pad, bit)
@ -509,7 +509,7 @@ typedef struct {
* @api
*/
#if !defined(pal_lld_setpadmode) || defined(__DOXYGEN__)
#define palSetPadMode(port, pad, mode) \
#define palSetPadMode(port, pad, mode) \
palSetGroupMode(port, PAL_PORT_BIT(pad), 0, mode)
#else
#define palSetPadMode(port, pad, mode) pal_lld_setpadmode(port, pad, mode)