esp_dport_access.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. // Copyright 2010-2017 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. #include <sdkconfig.h>
  14. #ifndef _ESP_DPORT_ACCESS_H_
  15. #define _ESP_DPORT_ACCESS_H_
  16. #ifdef __cplusplus
  17. extern "C" {
  18. #endif
  19. void esp_dport_access_stall_other_cpu_start(void);
  20. void esp_dport_access_stall_other_cpu_end(void);
  21. void esp_dport_access_int_init(void);
  22. void esp_dport_access_int_pause(void);
  23. void esp_dport_access_int_resume(void);
  24. //This routine does not stop the dport routines in any way that is recoverable. Please
  25. //only call in case of panic().
  26. void esp_dport_access_int_abort(void);
  27. #if defined(BOOTLOADER_BUILD) || defined(CONFIG_FREERTOS_UNICORE) || !defined(ESP_PLATFORM)
  28. #define DPORT_STALL_OTHER_CPU_START()
  29. #define DPORT_STALL_OTHER_CPU_END()
  30. #else
  31. #define DPORT_STALL_OTHER_CPU_START() esp_dport_access_stall_other_cpu_start()
  32. #define DPORT_STALL_OTHER_CPU_END() esp_dport_access_stall_other_cpu_end()
  33. #endif
  34. #ifdef __cplusplus
  35. }
  36. #endif
  37. #endif /* _ESP_DPORT_ACCESS_H_ */