Hello Benjamin, On Wed, Oct 30, 2024 at 11:14:41AM +0100, Benjamin Larsson wrote: > On 2024-10-30 08:32, Uwe Kleine-König wrote: > > > + /* Configure frequency divisor */ > > > + mask = WAVE_GEN_CYCLE_MASK(index % 4); > > > + val = (period << __ffs(mask)) & mask; > > FIELD_PREP please. > > Per my understanding FIELD_PREP only work on compile time constants. Then please create an alternative macro with the same semantic that also works when the mask isn't known at compile time instead of open coding the same concept several times. Best regards Uwe
Attachment:
signature.asc
Description: PGP signature