On Fri, 2019-03-22 at 21:46 +0100, Johannes Berg wrote:
> 
> In effect, an existing
> 
>       u32 freq;
> 
> would become
> 
>       u32 freq, freq_fractional;
> 
> and we'd just treat the two as a 32.32 fixed point integer.

Maybe easier would be to say

        u32 freq;
        u16 freq_partial_khz;

and basically say

        freq_khz = freq * 1000 + freq_partial_khz;

Same reasoning and similar logic, but no need to do any sort of fixed
point conversions.

johannes

Reply via email to