Update user_code.cpp

This commit is contained in:
Siwat Sirichai 2023-09-30 00:56:36 +07:00
parent 576abc1c90
commit 44ccee7903
1 changed files with 8 additions and 7 deletions

View File

@ -1,7 +1,9 @@
#include <user_code.hpp> #include <user_code.hpp>
void timer1_callback(){ void timer1_callback()
for(int i=0;i<16;i++){ {
for (int i = 0; i < 16; i++)
{
pwm_set_state(i, 1); pwm_set_state(i, 1);
} }
} }
@ -12,10 +14,8 @@ ESPMega_Timer timer1(0,50,timer1_callback,15001);
This Code will run right after ESPMega PRO's This Code will run right after ESPMega PRO's
Peripheral Initialization Routine Peripheral Initialization Routine
*/ */
void user_pre_init() void user_pre_init()
{ {
} }
/* /*
@ -45,7 +45,8 @@ This code will run every 15 seconds
*/ */
void timer_tick_callback() void timer_tick_callback()
{ {
if(standalone){ if (standalone)
{
timer1.loop(); timer1.loop();
} }
} }