Add PB_PACKED_STRUCT support for Keil MDK-ARM toolchain

Patch from Jon Read.

Update issue 119
Status: FixedInGit
This commit is contained in:
Petteri Aimonen
2014-05-30 13:45:48 +03:00
parent 2e9797af58
commit 8611958a7f

4
pb.h
View File

@@ -80,8 +80,8 @@
# define PB_PACKED_STRUCT_START
# define PB_PACKED_STRUCT_END
# define pb_packed __attribute__((packed))
#elif defined(__ICCARM__)
/* For IAR ARM compiler */
#elif defined(__ICCARM__) || defined(__CC_ARM)
/* For IAR ARM and Keil MDK-ARM compilers */
# define PB_PACKED_STRUCT_START _Pragma("pack(push, 1)")
# define PB_PACKED_STRUCT_END _Pragma("pack(pop)")
# define pb_packed