lf-lang / reactor-uc

A lightweight reactor runtime targeted at resource-constrained embedded systems
BSD 2-Clause "Simplified" License
2 stars 2 forks source link

Macro system needs some adaptations to work with LFC #77

Closed erlingrj closed 1 week ago

erlingrj commented 1 week ago

A few modifications are needed to work with LFC.

  1. We must split out DEFINE_TIMER_STRUCT and DEFINE_TIMER_CTOR since first goes in a header file and second goes in a source file.
  2. We must expose (offset, period) and (min_delay, min_spacing) as ctor arguments, not hardcoded. This is to support setting those based on reactor parameters
tanneberger commented 1 week ago

see #82

LasseRosenow commented 1 week ago

I don't know how the LFC works, but do you know if the following macros might also be affected?

All of these defines also generate a typedef and a *_ctor and might end up split between header and source files?

erlingrj commented 1 week ago

Yes, all of them are affected. And I have done it as part of #71