Re: [riot-devel] bitfeilds

2016-10-30 Thread Kees Bakker
On 30-10-16 10:55, Juergen Stuber wrote: On Fri, 28 Oct 2016 10:03:17 +0200 Juergen Stuber wrote: When you use shift and mask you usually do a single access for all fields of a register. Note that you shouldn't do it in two assignments (I'm seeing this in cpu/stm32l1/periph/gpio.c): port

Re: [riot-devel] bitfeilds

2016-10-30 Thread Juergen Stuber
On Fri, 28 Oct 2016 10:03:17 +0200 Juergen Stuber wrote: > > When you use shift and mask you usually do a single access for > all fields of a register. Note that you shouldn't do it in two assignments (I'm seeing this in cpu/stm32l1/periph/gpio.c): port &= ~mask; port |= (new_value << s