mirror of
https://github.com/Fishwaldo/pico-sdk.git
synced 2025-07-09 22:48:44 +00:00
fix __packed attribute for MSVC (#646)
This commit is contained in:
parent
da476610e2
commit
d0af70bd77
1 changed files with 6 additions and 0 deletions
|
@ -27,8 +27,14 @@ extern "C" {
|
||||||
#define __scratch_x(group)
|
#define __scratch_x(group)
|
||||||
#define __scratch_y(group)
|
#define __scratch_y(group)
|
||||||
|
|
||||||
|
#ifndef _MSC_VER
|
||||||
#define __packed __attribute__((packed))
|
#define __packed __attribute__((packed))
|
||||||
#define __packed_aligned __packed __attribute((aligned))
|
#define __packed_aligned __packed __attribute((aligned))
|
||||||
|
#else
|
||||||
|
// MSVC requires #pragma pack which isn't compatible with a single attribute style define
|
||||||
|
#define __packed
|
||||||
|
#define __packed_aligned
|
||||||
|
#endif
|
||||||
|
|
||||||
#define __time_critical_func(x) x
|
#define __time_critical_func(x) x
|
||||||
#define __after_data(group)
|
#define __after_data(group)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue