Block LMS while running and implemnet own USB HID handling

This commit is contained in:
Michal Moskal
2017-07-08 21:18:05 +01:00
parent 0b56acb1b8
commit 672f888663
4 changed files with 150 additions and 36 deletions

View File

@ -3,23 +3,23 @@ vmthread MAIN
{
DATA8 State
DATA32 Status
//DATA32 Timer
DATA32 Timer
DATA16 Serial
UI_WRITE(LED,LED_RED)
UI_WRITE(LED,LED_ORANGE)
UI_DRAW(TEXT,FG_COLOR,48,62,'Starting...')
UI_DRAW(UPDATE)
// Make sure VM knows that /tmp/serial.txt is open for writing and can stream the content
FILE(OPEN_WRITE, '/tmp/serial.txt', Serial)
//FILE(OPEN_WRITE, '/tmp/serial.txt', Serial)
// Actual filename is patched-in here
SYSTEM('XXXXXXXXX', Status)
Loop:
UI_BUTTON(WAIT_FOR_PRESS)
UI_BUTTON(SHORTPRESS,BACK_BUTTON,State)
JR_FALSE(State,Loop)
//UI_BUTTON(WAIT_FOR_PRESS)
//UI_BUTTON(SHORTPRESS,BACK_BUTTON,State)
//JR_FALSE(State,Loop)
//UI_WRITE(LED,LED_RED)
//TIMER_WAIT(1000, Timer)
//TIMER_READY(Timer)
TIMER_WAIT(100, Timer)
TIMER_READY(Timer)
UI_DRAW(TEXT,FG_COLOR,48,62,'Bye!')
UI_DRAW(UPDATE)
}