old: CCOMPARE timer triggers when CCOUNT increase to equal to CCOMPARE, then ISR will increase integer of "_xt_tick_divisor"
to CCOMPARE and wait for next interrupt triggering
now: CCOMPARE timer triggers when CCOUNT increase to equal to CCOMPARE, then ISR will reset CCOUNT to be 0 and reset CCOMPARE
to be integer of "_xt_tick_divisor", then wait for next interrupt triggering
Using the new method, we may get the CCOUNT value without considing if it has overflowed.
System running microseconds = g_os_ticks * microseconds per tick + CCOUNT.
Make it easy for other OS platform to use these code.
If users want to add other OSes, they only should add 3 files:
1. "port.c": init task stack and switch task function
2. "osi.c": wrapper APIs to FreeRTOS from other OSes
3. "heap.c": wrapper APIs for other OSes' heap APIs
- fix(esp8266):
- Adding includes for missing symbols.
- Removing unused variables.
- Skip unsupported packing pragmas.
- Add rom_functions.h for symbols that come from the ESP ROM. Add attributes on
ets_printf so GCC will check the syntax of the formatting string and types of
the arguments.
- Add ETS_GPIO_INTR_EN(DIS)ABLE macro.
- Use gpio_output_conf instead of gpio_output_set.
- fix(freertos):
- Define functions that are useful.
- Use correct printf symbols when printing.
- fix(lwip):
- Ignore the warning in sntp.
- fix(mqtt):
- `xTicksToWait` is unsigned, can't check for less than zero. Remove
unused variables.
- fix(newlib):
- `_free_r()` returns `void`, not `void *`.
- Adding includes for missing symbols.
- fix(ssl):
- Make sure functions always return a value.
Merges https://github.com/espressif/ESP8266_RTOS_SDK/pull/188