embedded-time icon indicating copy to clipboard operation
embedded-time copied to clipboard

smarter macros for defining intra-unit conversions

Open PTaylor-us opened this issue 4 years ago • 3 comments

There are many instances when converting from a larger-magnitude unit with width u32 to a smaller-magnitude unit with width u64 could use From/Into rather than their fallible forms. However, my current level of macro expertise limits me to either one or the other (fallible or infallible).

PTaylor-us avatar May 06 '21 23:05 PTaylor-us

One option is to move the macro generation to an internal proc-macro. This kind of change would be trivial then.

korken89 avatar May 27 '21 09:05 korken89

I'm not very familiar with proc macros. Is this something you are capable of doing, @korken89?

PTaylor-us avatar May 30 '21 13:05 PTaylor-us

I have no problems with proc-macros as with RTIC I mostly write them :) But I am not familiar with all the generation that the current macros are performing. I'll study the current macro to get a better feel for it.

korken89 avatar May 30 '21 17:05 korken89