I want to write a kernel module which reads out a register, (return value is saved in an unsigned int
) and then read the the bits 16 to 22 from this variable and the convert it to an integer number. The conversion is no problem. But getting the bits out in the first place is the problem.
As example I have this 2 values in hex:
0x88290000d
0x005a0a00d
and from this 2 values I want the bits 16 to 22 as integer, any ideas how I can implement that in my kernel module ?