diff --git a/include/libopenstm32/common.h b/include/libopenstm32/common.h index aa57cf19..fe67eb1e 100644 --- a/include/libopenstm32/common.h +++ b/include/libopenstm32/common.h @@ -22,13 +22,13 @@ #include -/* Type definitions */ -typedef signed char s8; -typedef signed short s16; -typedef signed long s32; -typedef unsigned char u8; -typedef unsigned short u16; -typedef unsigned long u32; +/* Type definitions for shorter and nicer code */ +typedef int8_t s8; +typedef int16_t s16; +typedef int32_t s32; +typedef uint8_t u8; +typedef uint16_t u16; +typedef uint32_t u32; /* Generic memory-mapped I/O accessor functions */ #define MMIO8(addr) (*(volatile u8 *)(addr))