setup()
Initialization process
Called at the beginning of code execution; write initialization code here.
TWENET initialization is also executed after the setup()
function finishes. Since many processes are designed to run after TWENET completes, please do not perform any operations other than initialization here.
The following points should be noted:
- You cannot execute sleep
the_twenet.sleep()
. If you want to sleep immediately after initialization, write the initial sleep process inside thebegin()
function. - The
delay()
function is replaced by the process described below. In this case, the parameterms
does not specify milliseconds.
static inline void delay(uint32_t ms) {
volatile uint32_t ct = ms * 4096;
while (ct > 0) {
--ct;
}
}