Re: Module for making bitfields

2014-09-24 Thread Paul "LeoNerd" Evans
On Wed, 24 Sep 2014 15:31:36 +0300 Shmuel Fomberg wrote: > Hi Paul. > > Check out Data::ParseBinary. I developed it for similar tasks. That looks to be quite a large system for doing structs and similar; and doesn't appear to support the enum conversion case of fields, like I have here. E.g. se

Re: Module for making bitfields

2014-09-24 Thread Shmuel Fomberg
Hi Paul. Check out Data::ParseBinary. I developed it for similar tasks. Shmuel. On Sep 24, 2014 1:56 PM, "Paul "LeoNerd" Evans" wrote: > [[ background ]] > > I've been doing a lot of hardware IO work lately, which involves lots > of talking to hardware devices, where there are byte-wide registe

Re: Module for making bitfields

2014-09-24 Thread David Mertens
Hey Paul, My first thought was, "Why not use Convert::Binary::C ?" You could write your bitfields using regular C bitfields in a struct declaration. I figured a good answer would be "Because he needs it to be pure Perl," but I figured I would at least t