Re: [RFC 01/12] add basic register-field manipulation macros

2016-06-02 Thread Hannes Frederic Sowa
On 02.06.2016 01:08, Jakub Kicinski wrote: > On Wed, 01 Jun 2016 22:15:36 +0200, Hannes Frederic Sowa wrote: >> Hello, >> >> On Wed, Jun 1, 2016, at 18:50, Jakub Kicinski wrote: >>> C bitfields are problematic and best avoided. Developers >>> interacting with hardware registers find themselves sea

Re: [RFC 01/12] add basic register-field manipulation macros

2016-06-01 Thread Jakub Kicinski
On Wed, 01 Jun 2016 22:15:36 +0200, Hannes Frederic Sowa wrote: > Hello, > > On Wed, Jun 1, 2016, at 18:50, Jakub Kicinski wrote: > > C bitfields are problematic and best avoided. Developers > > interacting with hardware registers find themselves searching > > for easy-to-use alternatives. Commo

Re: [RFC 01/12] add basic register-field manipulation macros

2016-06-01 Thread Hannes Frederic Sowa
Hello, On Wed, Jun 1, 2016, at 18:50, Jakub Kicinski wrote: > C bitfields are problematic and best avoided. Developers > interacting with hardware registers find themselves searching > for easy-to-use alternatives. Common approach is to define > structures or sets of macros containing mask and s

[RFC 01/12] add basic register-field manipulation macros

2016-06-01 Thread Jakub Kicinski
C bitfields are problematic and best avoided. Developers interacting with hardware registers find themselves searching for easy-to-use alternatives. Common approach is to define structures or sets of macros containing mask and shift pair. Operation on the register are then performed as follows: