1from driver import TIMER 2tim0 = TIMER(0) 3 4def cb(test): 5 print('timer_test_log1111') 6 7tim0.init(period=1000000, mode=TIMER.PERIODIC, callback=cb) 8tim0.stop() 9tim0.deinit() 10 11 12tim1 = TIMER(1) 13tim1.init(period=1000000, mode=TIMER.ONE_SHOT, callback=lambda t:print('timer_test_log2222')) 14 15tim1.stop() 16tim1.deinit() 17