MitchBradley / cforth

Mitch Bradley's CForth implementation
Other
154 stars 41 forks source link

repeat-alarm-us #72

Closed Jos-Ven closed 3 years ago

Jos-Ven commented 3 years ago

Hi, extend.c in /~esp8266-rtos includes the following line: C(repeat_alarm_us) //c repeat-alarm-us { i.xt i.us -- }

For some reason the following code does not work:

0 value counter 0 value @do_alarm : do_alarm ( - ) counter 1+ to counter ;

' do_alarm to @do_alarm : test ( - ) 0 to counter @do_alarm #200 repeat-alarm-us #1000 ms ;

test counter . \ Shows 0

What must be done in order to get repeat-alarm-us working? Thanks in advance, Jos

Jos-Ven commented 3 years ago

Solved by the use of poll timers.