Don't force packing of objd/objectlist stucts
objd/objectlist don't map to any EtheCAT protocol headers, hence they don't need to be packed. Pro and conns for packing or not. Packed structs give optimized smaller size of ObjectDictionary. Unpacked structs give optimized performance when iterating and accessing processdata pointers. Unpacked give more toolchain portable code.feature/add_additional_flags
parent
41a5c8d0c0
commit
467733d06d
|
@ -13,8 +13,8 @@
|
|||
|
||||
#include <cc.h>
|
||||
|
||||
CC_PACKED_BEGIN
|
||||
typedef struct CC_PACKED
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint16_t subindex;
|
||||
uint16_t datatype;
|
||||
|
@ -24,10 +24,9 @@ typedef struct CC_PACKED
|
|||
uint32_t value;
|
||||
void *data;
|
||||
} _objd;
|
||||
CC_PACKED_END
|
||||
|
||||
CC_PACKED_BEGIN
|
||||
typedef struct CC_PACKED
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint16_t index;
|
||||
uint16_t objtype;
|
||||
|
@ -36,7 +35,7 @@ typedef struct CC_PACKED
|
|||
const char *name;
|
||||
const _objd *objdesc;
|
||||
} _objectlist;
|
||||
CC_PACKED_END
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue