I believe mode 0 puts the registers in binary mode, so you should try to
open it as a binary file in C/Python/whatever. To access as ASCII (which I
recommend against personally), try setting ioreg_mode to 1.
Glenn

On Mon, Jun 29, 2009 at 4:13 PM, Soriano, Melissa <
[email protected]> wrote:

>  Hi Casper,
>
>
>
> I have been unable to access the software registers using ioreg_mode set to
> zero.  If anyone has used this, can you please offer any advice?  Am I using
> this option incorrectly?  Thanks in advance for your help.
>
>
>
> Regards,
>
> Melissa
>
>
>
> o...@roach1:~$ cat /proc/751/hw/ioreg_mode
>
> 1
>
> o...@roach1:~$ ls /proc/751/hw/ioreg/result_32_msb
>
> /proc/751/hw/ioreg/result_32_msb
>
> o...@roach1:~$ cat /proc/751/hw/ioreg_mode
>
> 1
>
> o...@roach1:~$ cat /proc/751/hw/ioreg/result_32_msb
>
> o...@roach1:~$ echo 0 > /proc/751/hw/ioreg_mode
>
> o...@roach1:~$ cat /proc/751/hw/ioreg_mode
>
> 0
>
> o...@roach1:~$ cat /proc/751/hw/ioreg/result_32_msb
>
> cat: /proc/751/hw/ioreg/result_32_msb: Invalid argument
>

Reply via email to