Surround all macro parameters with ()
All the macro arguments that are user supplied, or potentially, wrap properly in () as good practice. Probably missed one or two, and a lot of them are possibly unnecessary, but it's straightforward to just do it always. Fixes github issue #321
This commit is contained in:
@@ -64,27 +64,27 @@ LGPL License Terms @ref lgpl_license
|
||||
|
||||
/* --- GPIO registers ------------------------------------------------------ */
|
||||
|
||||
#define GPIO_DATA(port) (&MMIO32(port + 0x000))
|
||||
#define GPIO_DIR(port) MMIO32(port + 0x400)
|
||||
#define GPIO_IS(port) MMIO32(port + 0x404)
|
||||
#define GPIO_IBE(port) MMIO32(port + 0x408)
|
||||
#define GPIO_IEV(port) MMIO32(port + 0x40c)
|
||||
#define GPIO_IM(port) MMIO32(port + 0x410)
|
||||
#define GPIO_RIS(port) MMIO32(port + 0x414)
|
||||
#define GPIO_MIS(port) MMIO32(port + 0x418)
|
||||
#define GPIO_ICR(port) MMIO32(port + 0x41c)
|
||||
#define GPIO_AFSEL(port) MMIO32(port + 0x420)
|
||||
#define GPIO_DR2R(port) MMIO32(port + 0x500)
|
||||
#define GPIO_DR4R(port) MMIO32(port + 0x504)
|
||||
#define GPIO_DR8R(port) MMIO32(port + 0x508)
|
||||
#define GPIO_ODR(port) MMIO32(port + 0x50c)
|
||||
#define GPIO_PUR(port) MMIO32(port + 0x510)
|
||||
#define GPIO_PDR(port) MMIO32(port + 0x514)
|
||||
#define GPIO_SLR(port) MMIO32(port + 0x518)
|
||||
#define GPIO_DEN(port) MMIO32(port + 0x51c)
|
||||
#define GPIO_LOCK(port) MMIO32(port + 0x520)
|
||||
#define GPIO_CR(port) MMIO32(port + 0x524)
|
||||
#define GPIO_AMSEL(port) MMIO32(port + 0x528)
|
||||
#define GPIO_DATA(port) (&MMIO32((port) + 0x000))
|
||||
#define GPIO_DIR(port) MMIO32((port) + 0x400)
|
||||
#define GPIO_IS(port) MMIO32((port) + 0x404)
|
||||
#define GPIO_IBE(port) MMIO32((port) + 0x408)
|
||||
#define GPIO_IEV(port) MMIO32((port) + 0x40c)
|
||||
#define GPIO_IM(port) MMIO32((port) + 0x410)
|
||||
#define GPIO_RIS(port) MMIO32((port) + 0x414)
|
||||
#define GPIO_MIS(port) MMIO32((port) + 0x418)
|
||||
#define GPIO_ICR(port) MMIO32((port) + 0x41c)
|
||||
#define GPIO_AFSEL(port) MMIO32((port) + 0x420)
|
||||
#define GPIO_DR2R(port) MMIO32((port) + 0x500)
|
||||
#define GPIO_DR4R(port) MMIO32((port) + 0x504)
|
||||
#define GPIO_DR8R(port) MMIO32((port) + 0x508)
|
||||
#define GPIO_ODR(port) MMIO32((port) + 0x50c)
|
||||
#define GPIO_PUR(port) MMIO32((port) + 0x510)
|
||||
#define GPIO_PDR(port) MMIO32((port) + 0x514)
|
||||
#define GPIO_SLR(port) MMIO32((port) + 0x518)
|
||||
#define GPIO_DEN(port) MMIO32((port) + 0x51c)
|
||||
#define GPIO_LOCK(port) MMIO32((port) + 0x520)
|
||||
#define GPIO_CR(port) MMIO32((port) + 0x524)
|
||||
#define GPIO_AMSEL(port) MMIO32((port) + 0x528)
|
||||
|
||||
BEGIN_DECLS
|
||||
|
||||
|
||||
Reference in New Issue
Block a user