The current code looks like this
- Code: Select all
...
if (allow_suspend && nspire_ctrl && on_key_pressed()){
nspire_ctrl=false;
while (on_key_pressed())
msleep(10);
// somewhat OFF by setting LCD to 0
unsigned NSPIRE_CONTRAST_ADDR=0x900f0020;
unsigned oldval=*(volatile unsigned *)NSPIRE_CONTRAST_ADDR;
*(volatile unsigned *)NSPIRE_CONTRAST_ADDR=0x100;
while (!on_key_pressed())
msleep(100);
*(volatile unsigned *)NSPIRE_CONTRAST_ADDR=oldval;
statusline(0);
sync_screen();
continue;
}
...
I also tried to write to the led (I have introduced the read32 and write32 commands to make tries easy inside the KhiCAS shell), but it seems to be locked:
- Code: Select all
16=>=>
l=0x90110b00
a=read32(l)
b=0b1010011
write32(l,b)
read32(l) stills return 0x1643
(N.B. 16=>=> is a KhiCAS command to display integers in hexa).