On 08/28/2012 10:53 AM, Adam Barta wrote:
I think the quotes are important too " "
There's still something funny going on. Look at the file size for sys_scratchpad after writing.

Tom

root@roach1:/proc/1221/hw/ioreg# ls -l
total 0
-r--r--r-- 1 root root     4 Jul 28 02:13 acc_cnt
...
-rw-rw-rw- 1 root root     4 Jul 28 02:13 sys_scratchpad
-rw-rw-rw- 1 root root     4 Jul 28 02:13 trig_adc0
root@roach1:/proc/1221/hw/ioreg# echo -en "\xFF\xFF\xFF\xFF" > sys_scratchpad
root@roach1:/proc/1221/hw/ioreg# cat sys_scratchpad | hd
00000000  ff ff ff ff                                       |....|
00000004
root@roach1:/proc/1221/hw/ioreg# ls -l
total 0
-r--r--r-- 1 root root     4 Jul 28 02:13 acc_cnt
...
-rw-rw-rw- 1 root root     0 Jul 28 02:21 sys_scratchpad
-rw-rw-rw- 1 root root     4 Jul 28 02:13 trig_adc0


On Tue, Aug 28, 2012 at 7:48 PM, Tom Kuiper <kui...@jpl.nasa.gov <mailto:kui...@jpl.nasa.gov>> wrote:

    On 08/28/2012 10:45 AM, Adam Barta wrote:
    Yes its the trailing newline i think so

    echo -en "\xFF"

    would work
    Yes, thanks for the -n tip.  Here's what I get.

    root@roach1:/proc/1174/hw/ioreg# echo -en \x01\x00 > trig_adc0

    root@roach1:/proc/1174/hw/ioreg# cat trig_adc0 | hd
    00000000  78 30 31 78                                       |x01x|
    00000004
    root@roach1:/proc/1174/hw/ioreg# echo -en \xff\xff > trig_adc0

    root@roach1:/proc/1174/hw/ioreg# cat trig_adc0 | hd
    00000000  78 66 66 78                                       |xffx|
    00000004
    root@roach1:/proc/1174/hw/ioreg# echo -en \xFF\xFF > trig_adc0

    root@roach1:/proc/1174/hw/ioreg# cat trig_adc0 | hd
    00000000  78 46 46 78                                       |xFFx|
    00000004

    Since this is on a ROACH-1 PPC we should be running the same OS,
    so I'm puzzled.

    Tom




--
*Adam Barta*
c: +27 72 105 8611
e: a...@ska.ac.za <mailto:a...@ska.ac.za>
w: www.ska.ac.za <http://www.ska.ac.za>




--
I or me? http://www.oxforddictionaries.com/page/145


Reply via email to