1 // Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 #ifndef __ESP_CROSSCORE_INT_H 15 #define __ESP_CROSSCORE_INT_H 16 17 18 /** 19 * Initialize the crosscore interrupt system for this CPU. 20 * This needs to be called once on every CPU that is used 21 * by FreeRTOS. 22 * 23 * If multicore FreeRTOS support is enabled, this will be 24 * called automatically by the startup code and should not 25 * be called manually. 26 */ 27 void esp_crosscore_int_init(void); 28 29 30 /** 31 * Send an interrupt to a CPU indicating it should yield its 32 * currently running task in favour of a higher-priority task 33 * that presumably just woke up. 34 * 35 * This is used internally by FreeRTOS in multicore mode 36 * and should not be called by the user. 37 * 38 * @param core_id Core that should do the yielding 39 */ 40 void esp_crosscore_int_send_yield(int core_id); 41 42 43 /** 44 * Send an interrupt to a CPU indicating it should update its 45 * CCOMPARE1 value due to a frequency switch. 46 * 47 * This is used internally when dynamic frequency switching is 48 * enabled, and should not be called from application code. 49 * 50 * @param core_id Core that should update its CCOMPARE1 value 51 */ 52 void esp_crosscore_int_send_freq_switch(int core_id); 53 54 /** 55 * Send an interrupt to a CPU indicating it should print its current backtrace 56 * 57 * This is use internally by the Task Watchdog to dump the backtrace of the 58 * opposite core and should not be called from application code. 59 * 60 * @param core_id Core that should print its backtrace 61 */ 62 void esp_crosscore_int_send_print_backtrace(int core_id); 63 64 #endif 65