How To Port Apps From Non-Os Sdk To Rtos Sdk - Espressif Systems ESP8266EX Programming Manual

Esp8266 rtos sdk
Hide thumbs Also See for ESP8266EX:
Table of Contents

Advertisement

!
3. Power off the module, and change it to operation mode; then power on the module and
run the program.
Result:
rtc_time: 1613921
cal: 6.406

3.2.11. How to Port Apps from Non-OS SDK to RTOS SDK

1. Codes for setting the timer do not need to be revised.
2. Codes for executing callback functions do not need to be revised.
3. The method of creating a new task should be revised. When creating a new task, RTOS
SDK uses xTaskCreate, a self-contained interface owned by freeRTOS.
Non-OS SDK: creating a new task
#define Q_NUM (10)
ETSEvent test_q[Q_NUM];
void test_task(ETSEvent *e)
{
switch(e->sig)
{
case 1:
func1(e->par);
break;
case 2:
func2();
break;
case 3:
func3();
break;
default:
break;
}
}
void func_send_Sig(void)
{
ETSSignal sig = 2;
system_os_post(2,sig,0);
}
void task_ini(void)
{
system_os_task(test_task, 2, test_q,Q_NUM);
Espressif
15 37
!
/!
3. Sample Codes
2017.05

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ESP8266EX and is the answer not in the manual?

Questions and answers

Table of Contents