Use type suffix to avoid warnings
When compiling with all warnings enabled, some defines can lead to warning due to missing unsigned type suffix: warning: integer overflow in expression [-Woverflow] This fix should not affected behavior at all, since calculation with such overflows lead to the same actual address when writing to that location. However, it makes the warning disappear and also defines the right data type for a memory location.
This commit is contained in:
committed by
Frantisek Burian
parent
0af6d06eda
commit
7681597e42
@@ -24,37 +24,37 @@
|
||||
|
||||
/* --- SAM3N peripheral space -------------------------------------------- */
|
||||
|
||||
#define SPI_BASE (0x40008000)
|
||||
#define TC0_BASE (0x40010000)
|
||||
#define TC1_BASE (0x40010040)
|
||||
#define TC2_BASE (0x40010080)
|
||||
#define TC3_BASE (0x40014000)
|
||||
#define TC4_BASE (0x40014040)
|
||||
#define TC5_BASE (0x40014080)
|
||||
#define TWI0_BASE (0x40018000)
|
||||
#define TWI1_BASE (0x4001C000)
|
||||
#define PWM_BASE (0x40020000)
|
||||
#define USART0_BASE (0x40024000)
|
||||
#define USART1_BASE (0x40028000)
|
||||
#define ADC_BASE (0x40038000)
|
||||
#define DACC_BASE (0x4003C000)
|
||||
#define SPI_BASE (0x40008000U)
|
||||
#define TC0_BASE (0x40010000U)
|
||||
#define TC1_BASE (0x40010040U)
|
||||
#define TC2_BASE (0x40010080U)
|
||||
#define TC3_BASE (0x40014000U)
|
||||
#define TC4_BASE (0x40014040U)
|
||||
#define TC5_BASE (0x40014080U)
|
||||
#define TWI0_BASE (0x40018000U)
|
||||
#define TWI1_BASE (0x4001C000U)
|
||||
#define PWM_BASE (0x40020000U)
|
||||
#define USART0_BASE (0x40024000U)
|
||||
#define USART1_BASE (0x40028000U)
|
||||
#define ADC_BASE (0x40038000U)
|
||||
#define DACC_BASE (0x4003C000U)
|
||||
|
||||
/* --- SAM3N system controller space ------------------------------------- */
|
||||
#define SMC_BASE (0x400E0000)
|
||||
#define MATRIX_BASE (0x400E0200)
|
||||
#define PMC_BASE (0x400E0400)
|
||||
#define UART0_BASE (0x400E0600)
|
||||
#define CHIPID_BASE (0x400E0740)
|
||||
#define UART1_BASE (0x400E0800)
|
||||
#define EEFC_BASE (0x400E0A00)
|
||||
#define PIOA_BASE (0x400E0E00)
|
||||
#define PIOB_BASE (0x400E1000)
|
||||
#define PIOC_BASE (0x400E1200)
|
||||
#define RSTC_BASE (0x400E1400)
|
||||
#define SUPC_BASE (0x400E1410)
|
||||
#define RTT_BASE (0x400E1430)
|
||||
#define WDT_BASE (0x400E1450)
|
||||
#define RTC_BASE (0x400E1460)
|
||||
#define GPBR_BASE (0x400E1490)
|
||||
#define SMC_BASE (0x400E0000U)
|
||||
#define MATRIX_BASE (0x400E0200U)
|
||||
#define PMC_BASE (0x400E0400U)
|
||||
#define UART0_BASE (0x400E0600U)
|
||||
#define CHIPID_BASE (0x400E0740U)
|
||||
#define UART1_BASE (0x400E0800U)
|
||||
#define EEFC_BASE (0x400E0A00U)
|
||||
#define PIOA_BASE (0x400E0E00U)
|
||||
#define PIOB_BASE (0x400E1000U)
|
||||
#define PIOC_BASE (0x400E1200U)
|
||||
#define RSTC_BASE (0x400E1400U)
|
||||
#define SUPC_BASE (0x400E1410U)
|
||||
#define RTT_BASE (0x400E1430U)
|
||||
#define WDT_BASE (0x400E1450U)
|
||||
#define RTC_BASE (0x400E1460U)
|
||||
#define GPBR_BASE (0x400E1490U)
|
||||
|
||||
#endif
|
||||
|
||||
@@ -24,55 +24,55 @@
|
||||
|
||||
/* --- SAM3X peripheral space -------------------------------------------- */
|
||||
|
||||
#define HSMCI_BASE (0x40000000)
|
||||
#define SSC_BASE (0x40004000)
|
||||
#define SPI0_BASE (0x40008000)
|
||||
#define SPI1_BASE (0x4000C000)
|
||||
#define TC0_BASE (0x40080000)
|
||||
#define TC1_BASE (0x40080040)
|
||||
#define TC2_BASE (0x40080080)
|
||||
#define TC3_BASE (0x40084000)
|
||||
#define TC4_BASE (0x40084040)
|
||||
#define TC5_BASE (0x40084080)
|
||||
#define TC6_BASE (0x40088000)
|
||||
#define TC7_BASE (0x40088040)
|
||||
#define TC8_BASE (0x40088080)
|
||||
#define TWI0_BASE (0x4008C000)
|
||||
#define TWI1_BASE (0x40090000)
|
||||
#define PWM_BASE (0x40094000)
|
||||
#define USART0_BASE (0x40098000)
|
||||
#define USART1_BASE (0x4009C000)
|
||||
#define USART2_BASE (0x400A0000)
|
||||
#define USART3_BASE (0x400A4000)
|
||||
#define UOTGHS_BASE (0x400AC000)
|
||||
#define EMAC_BASE (0x400B0000)
|
||||
#define CAN0_BASE (0x400B4000)
|
||||
#define CAN1_BASE (0x400B8000)
|
||||
#define TRNG_BASE (0x400BC000)
|
||||
#define ADC_BASE (0x400C0000)
|
||||
#define DMAC_BASE (0x400C4000)
|
||||
#define HSMCI_BASE (0x40000000U)
|
||||
#define SSC_BASE (0x40004000U)
|
||||
#define SPI0_BASE (0x40008000U)
|
||||
#define SPI1_BASE (0x4000C000U)
|
||||
#define TC0_BASE (0x40080000U)
|
||||
#define TC1_BASE (0x40080040U)
|
||||
#define TC2_BASE (0x40080080U)
|
||||
#define TC3_BASE (0x40084000U)
|
||||
#define TC4_BASE (0x40084040U)
|
||||
#define TC5_BASE (0x40084080U)
|
||||
#define TC6_BASE (0x40088000U)
|
||||
#define TC7_BASE (0x40088040U)
|
||||
#define TC8_BASE (0x40088080U)
|
||||
#define TWI0_BASE (0x4008C000U)
|
||||
#define TWI1_BASE (0x40090000U)
|
||||
#define PWM_BASE (0x40094000U)
|
||||
#define USART0_BASE (0x40098000U)
|
||||
#define USART1_BASE (0x4009C000U)
|
||||
#define USART2_BASE (0x400A0000U)
|
||||
#define USART3_BASE (0x400A4000U)
|
||||
#define UOTGHS_BASE (0x400AC000U)
|
||||
#define EMAC_BASE (0x400B0000U)
|
||||
#define CAN0_BASE (0x400B4000U)
|
||||
#define CAN1_BASE (0x400B8000U)
|
||||
#define TRNG_BASE (0x400BC000U)
|
||||
#define ADC_BASE (0x400C0000U)
|
||||
#define DMAC_BASE (0x400C4000U)
|
||||
|
||||
/* --- SAM3X system controller space ------------------------------------- */
|
||||
#define SMC_BASE (0x400E0000)
|
||||
#define SDRAM_BASE (0x400E0200)
|
||||
#define MATRIX_BASE (0x400E0400)
|
||||
#define PMC_BASE (0x400E0600)
|
||||
#define UART_BASE (0x400E0800)
|
||||
#define CHIPID_BASE (0x400E0940)
|
||||
#define EEFC0_BASE (0x400E0A00)
|
||||
#define EEFC1_BASE (0x400E0C00)
|
||||
#define PIOA_BASE (0x400E0E00)
|
||||
#define PIOB_BASE (0x400E1000)
|
||||
#define PIOC_BASE (0x400E1200)
|
||||
#define PIOD_BASE (0x400E1400)
|
||||
#define PIOE_BASE (0x400E1600)
|
||||
#define PIOF_BASE (0x400E1800)
|
||||
#define RSTC_BASE (0x400E1A00)
|
||||
#define SUPC_BASE (0x400E1A10)
|
||||
#define RTT_BASE (0x400E1A30)
|
||||
#define WDT_BASE (0x400E1A50)
|
||||
#define RTC_BASE (0x400E1A60)
|
||||
#define GPBR_BASE (0x400E1A90)
|
||||
#define RTC_BASE (0x400E1A60)
|
||||
#define SMC_BASE (0x400E0000U)
|
||||
#define SDRAM_BASE (0x400E0200U)
|
||||
#define MATRIX_BASE (0x400E0400U)
|
||||
#define PMC_BASE (0x400E0600U)
|
||||
#define UART_BASE (0x400E0800U)
|
||||
#define CHIPID_BASE (0x400E0940U)
|
||||
#define EEFC0_BASE (0x400E0A00U)
|
||||
#define EEFC1_BASE (0x400E0C00U)
|
||||
#define PIOA_BASE (0x400E0E00U)
|
||||
#define PIOB_BASE (0x400E1000U)
|
||||
#define PIOC_BASE (0x400E1200U)
|
||||
#define PIOD_BASE (0x400E1400U)
|
||||
#define PIOE_BASE (0x400E1600U)
|
||||
#define PIOF_BASE (0x400E1800U)
|
||||
#define RSTC_BASE (0x400E1A00U)
|
||||
#define SUPC_BASE (0x400E1A10U)
|
||||
#define RTT_BASE (0x400E1A30U)
|
||||
#define WDT_BASE (0x400E1A50U)
|
||||
#define RTC_BASE (0x400E1A60U)
|
||||
#define GPBR_BASE (0x400E1A90U)
|
||||
#define RTC_BASE (0x400E1A60U)
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user