On Wed, 11 Oct 2023 at 14:09, Rod Webster <r...@vehiclemods.net.au> wrote:

> If the hal_u32_t Word in this instance is changed to an S64, how can you
> guarantee that the S64 is mapped back to the hal_u32_t when it's written
> back to the Ethercat drive that has an externally defined register size?

The EtherCAT drive doesn't interface directly to HAL, does it? The
actual register size transmitted down the wires is defined in the
ethercat driver.

Inside the code the _only_ variables which would need to change type
are those whose pointers are passed to the hal_pin_new*() functions.
And in any code written correctly, that would happen automatically if
the hal_*_t definitions are changed.

In fact, in your sample code, the unsigned int Word _can't_ be being
used as a HAL pin, as it's a simple int, not a pointer.

-- 
atp
"A motorcycle is a bicycle with a pandemonium attachment and is
designed for the especial use of mechanical geniuses, daredevils and
lunatics."
— George Fitch, Atlanta Constitution Newspaper, 1912


_______________________________________________
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to