Skip to content

hal: Update inihal, halui and motion-logger to getter/setter - #4285

Open
BsAtHome wants to merge 1 commit into
LinuxCNC:masterfrom
BsAtHome:halgs_inihal-halui
Open

hal: Update inihal, halui and motion-logger to getter/setter#4285
BsAtHome wants to merge 1 commit into
LinuxCNC:masterfrom
BsAtHome:halgs_inihal-halui

Conversation

@BsAtHome

Copy link
Copy Markdown
Contributor

The conversion of inihal and halui are quite straight forward albeit many pins. The challenge is in the dual use of the structure construct where it both handled creation of the version in HAL memory with the pins and a copy structure using the underlying types.
There is a caveat where the code needs to change when we do the 64-bit cleanup. The expansion used with the macros is based on concatenation and both 32-bit and 64-bit integers are using the same hal type (hal_[su]int_t), but the getter/setter is called hal_[gs]et_[us]i32(). The sint/uint vs ui32/si32 mismatch is solved by a temporary typedef, but that excludes using both 64- and 32-bit versions simultaneously because the compiler would see the overlap and complain. There are at present no 64-bit pins in these components so the problem is not serious and should solve itself when we do the 64-bit cleanup.

The motion-logger update is rather trivial.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant