ULP: add functions for stopping/restarting the ulp-riscv

Closes https://github.com/espressif/esp-idf/issues/8232
This commit is contained in:
Marius Vikhammer
2022-01-19 10:57:31 +08:00
parent 6e00f10fd4
commit ff6f927b5f
11 changed files with 200 additions and 22 deletions

View File

@@ -38,6 +38,32 @@ esp_err_t ulp_riscv_run(void);
*/
esp_err_t ulp_riscv_load_binary(const uint8_t* program_binary, size_t program_size_bytes);
/**
* @brief Stop the ULP timer
*
* @note This will stop the ULP from waking up if halted, but will not abort any program
* currently executing on the ULP.
*/
void ulp_riscv_timer_stop(void);
/**
* @brief Resumes the ULP timer
*
* @note This will resume an already configured timer, but does no other configuration
*
*/
void ulp_riscv_timer_resume(void);
/**
* @brief Halts the program currently running on the ULP-RISC-V
*
* @note Program will restart at the next ULP timer trigger if timer is still running.
* If you want to stop the ULP from waking up then call ulp_riscv_timer_stop() first.
*/
void ulp_riscv_halt(void);
#ifdef __cplusplus
}
#endif