Idle-endIdle

Idle-endIdle is a global event which is called when the processor has no commands to process. If Idle-endIdle is omitted in your source code, wait loops in the Luna internal methods are skipped. Syntax:

  • Idle
    • Programmcode
  • endIdle

Methods that call this event while waiting:

You can call this event in your own loops to pass idle time to this event:

Example:

avr.device = attiny2313
avr.clock = 20000000
avr.stack = 12
Uart.Baud = 19200
Uart.Recv.enable
Uart.Send.enable
do
  a = Uart.ReadByte                     ' wait for a character, then read it
  Print "Character received: "+34+a+34   '"A" received
loop
 
' is calle dwhile Uart.Read is waiting for a character
Idle
  print "nothing to do"
endIdle