Why using decimal to define macro register base address


#1

Excuse me, I would like to ask SiFive Team to give explain.
Why do you use decimal number instead of hexadecimal number for defining macro (such as base address of registers, offset value…).

For example: in file metal-platform.h

/* From spi@10014000 */
#define METAL_SIFIVE_SPI0_10014000_BASE_ADDRESS 268517376UL
#define METAL_SIFIVE_SPI0_0_BASE_ADDRESS 268517376UL

#define METAL_SIFIVE_SPI0_TXDATA 72UL
#define METAL_SIFIVE_SPI0_RXDATA 76UL

Why don’t define as:

/* From spi@10014000 */
#define METAL_SIFIVE_SPI0_10014000_BASE_ADDRESS (0x10014000)
#define METAL_SIFIVE_SPI0_0_BASE_ADDRESS (0x10014000)

#define METAL_SIFIVE_SPI0_TXDATA   (0x48)
#define METAL_SIFIVE_SPI0_RXDATA   (0x4C)

I feel unfamiliar when reading this code and refer to register address in manual