cm3/common.h: Cast addr in BBIO_xx() macros. BBIO_xx has 4 byte size.

This commit is contained in:
bon@elektron.ikp.physik.tu-darmstadt.de 2014-02-13 19:30:09 +01:00 committed by Frantisek Burian
parent 6de1b50c4e
commit 8b4ac9775e
1 changed files with 2 additions and 2 deletions

View File

@ -54,10 +54,10 @@
/* Generic bit-band I/O accessor functions */
#define BBIO_SRAM(addr, bit) \
MMIO8(((addr) & 0x0FFFFF) * 32 + 0x22000000 + (bit) * 4)
MMIO32((((uint32_t)addr) & 0x0FFFFF) * 32 + 0x22000000 + (bit) * 4)
#define BBIO_PERIPH(addr, bit) \
MMIO8(((addr) & 0x0FFFFF) * 32 + 0x42000000 + (bit) * 4)
MMIO32((((uint32_t)addr) & 0x0FFFFF) * 32 + 0x42000000 + (bit) * 4)
/* Generic bit definition */
#define BIT0 (1<<0)