soc_hal.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. * SPDX-FileCopyrightText: 2020-2022 Espressif Systems (Shanghai) CO LTD
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. */
  6. #pragma once
  7. /*
  8. Note: This is a compatibility header. Call the interfaces in esp_cpu.h instead
  9. */
  10. #include "soc/soc_caps.h"
  11. #include "hal/soc_ll.h"
  12. #ifdef __cplusplus
  13. extern "C" {
  14. #endif
  15. #if SOC_CPU_CORES_NUM > 1 // We only allow stalling/unstalling of other cores
  16. /**
  17. * Stall the specified CPU core.
  18. *
  19. * @note Has no effect if the core is already stalled - does not return an
  20. * ESP_ERR_INVALID_STATE.
  21. *
  22. * @param core core to stall [0..SOC_CPU_CORES_NUM - 1]
  23. */
  24. #define soc_hal_stall_core(core) soc_ll_stall_core(core)
  25. /**
  26. * Unstall the specified CPU core.
  27. *
  28. * @note Has no effect if the core is already unstalled - does not return an
  29. * ESP_ERR_INVALID_STATE.
  30. *
  31. * @param core core to unstall [0..SOC_CPU_CORES_NUM - 1]
  32. */
  33. #define soc_hal_unstall_core(core) soc_ll_unstall_core(core)
  34. #endif // SOC_CPU_CORES_NUM > 1
  35. /**
  36. * Reset the specified core.
  37. *
  38. * @param core core to reset [0..SOC_CPU_CORES_NUM - 1]
  39. */
  40. #define soc_hal_reset_core(core) soc_ll_reset_core((core))
  41. #ifdef __cplusplus
  42. }
  43. #endif