esp_crosscore_int.h 2.0 KB

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