File tree Expand file tree Collapse file tree 5 files changed +18
-2
lines changed
freertos/port/esp8266/include/freertos Expand file tree Collapse file tree 5 files changed +18
-2
lines changed Original file line number Diff line number Diff line change 11gwen:
2- core: e1fe83a
2+ core: 71005fb
33 net80211: e1fe83a
44 pp: e1fe83a
55 wpa: e1fe83a
Original file line number Diff line number Diff line change 3232static const char * TAG = "system_api" ;
3333
3434static uint8_t base_mac_addr [6 ] = { 0 };
35+ uint32_t g_esp_ticks_per_us = 80 ;
3536
3637// Bootloader can get this information
3738const __attribute__((section (".SystemInfoVector.text" ))) esp_sys_info_t g_esp_sys_info = {
@@ -366,3 +367,18 @@ uint32_t esp_get_old_sysconf_addr(void)
366367{
367368 return rtc_sys_info .old_sysconf_addr ;
368369}
370+
371+ void os_update_cpu_frequency (uint32_t ticks_per_us )
372+ {
373+ extern uint32_t _xt_tick_divisor ;
374+
375+ if (REG_READ (DPORT_CTL_REG ) & DPORT_CTL_DOUBLE_CLK ) {
376+ g_esp_ticks_per_us = CPU_CLK_FREQ * 2 / 1000000 ;
377+ _xt_tick_divisor = (CPU_CLK_FREQ * 2 / CONFIG_FREERTOS_HZ );
378+ } else {
379+ g_esp_ticks_per_us = CPU_CLK_FREQ / 1000000 ;;
380+ _xt_tick_divisor = (CPU_CLK_FREQ / CONFIG_FREERTOS_HZ );
381+ }
382+ }
383+
384+ void ets_update_cpu_frequency (uint32_t ticks_per_us ) __attribute__((alias ("os_update_cpu_frequency" )));
Original file line number Diff line number Diff line change @@ -213,7 +213,7 @@ void esp_increase_tick_cnt(const TickType_t ticks);
213213extern void esp_vApplicationIdleHook ( void );
214214extern void esp_vApplicationTickHook ( void );
215215
216- extern const uint32_t g_esp_ticks_per_us ;
216+ extern uint32_t g_esp_ticks_per_us ;
217217
218218/*
219219 * @brief Get FreeRTOS system idle ticks
You can’t perform that action at this time.
0 commit comments