Add explicit uint16_t cast for EoE header SET macros.
Used for SET of FrameInfo 1 and FrameInfo 2.
Increase datatype for offset used by EOE_HDR_FRAME_OFFSET_GET.
Change debug print formatting to %u for unsigned datatypes.
- make "size" variables not reflecting hardware or protocol
uint32_t.
- change size_t to uint32_t to avoid conversion when compiling
on x64
- add excplcit typecaste for uint8_t and uint16_t that need it
due to integer promotion
- split assignment using macros and bitwise operations to avoid
imlicit conversion and need of explicit conversion.
- add excplicit typecast to htoe MACROs
Rationale, users might need more info on what
object it is that is mapped. Having a reference to
objectlist enable the user to know what index it is
and got a reference to the entire object. The obj
only know what subindex it is.
fixes#137
On the final segment the SDO shoud be written using the
pre-allocated buffer used to store segments during transfer.
When completed the pre-allocated buffer is written to the SDO.
This fix change to correct complete_access_subindex_loop
- buffer, ESCvar.mbxdata
- to use the lookup indexes for ESCVar.index -> nidx and
ESCvar.subindex -> nsub.
GCC9 introduced an address-of-packed-member warning that triggers in
esc_coe.c. The issue is that a packed struct has an overall alignment
of 1, and taking the address of a member in a packed struct is not
guaranteed to have any particular alignment. However, in esc_coe these
structs are always overlayed on aligned memory so in practice there is
no problem.
Fix the problem by explicitly setting the minimum alignment for the
structs used in this manner. Also fix an instance where an unaligned
pointer was used but never dereferenced (by changing the type of the
pointer from uint32_t* to void*).
Since most objects contain all subindexes (i.e. are not sparse),
check the most likely scenario first.
Change-Id: Idfda8ae3a3903c8312e02c9354b241af804f69ed
The upload pre callback was called with incorrect size for
segmented data (segmented size instead of the total size).
Change-Id: Ie29f138187d70c115d40267e4181e203bdfec5d1
The size of the objd->value member was previously increased to 64-bit
to allow setting 64-bit default values. This may waste some (ROM)
memory as 64-bit values are somewhat uncommon, and the value can be
set from an application hook instead. Revert to 32-bit values.
Fix#59