Ex10_PollerP

em.examples.basic/Ex10_PollerP.em
import em from '@$$emscript'
export const $U = em.$declare('MODULE')

import * as BoardC from '@$distro/BoardC.em'
import * as Common from '@em.mcu/Common.em'
import * as Poller from '@em.mcu/Poller.em'

export const AppLed = $delegate(BoardC.AppLed)

export function em$run() {
    Common.GlobalInterrupts.$$.enable()
    for (let i = 0; i < 5; i++) {
        Poller.upause(100_000) // 100ms
        AppLed.$$.wink(5) // 5ms
    }
}