ESP SYSCALL¶
Overview¶
This component consists of system call implementation of ESP-IDF components like FreeRTOS, LwIP, etc. It also has scripts to automatically translate APIs to their system calls based on the build type (user or protected). There are certain APIs which cannot be kept consistent with their ESP-IDF equivalent functions and such “custom” system calls are also implemented in this component.
API reference¶
Functions¶
-
esp_err_t
gpio_softisr_handler_add
(gpio_num_t gpio_num, gpio_isr_t softisr_handler, void *args, usr_gpio_handle_t *gpio_handle)¶ Register User space GPIO Soft-ISR handler.
- Return
ESP_OK on success
ESP_FAIL otherwise
- Note
User code is never executed in ISR context so there can’t be user registered ISR handlers, we still have a provision that allows user code to register a soft-isr handler that works like a callback and is executed in a task’s context
- Parameters
gpio_num
: GPIO numnber to which this handler is attachedsoftisr_handler
: User space soft-ISR handler which will be invoked when an interrupt occurs on the given GPIOargs
: User specified argumentgpio_handle
: Handle attached to this soft-isr handler
-
esp_err_t
gpio_softisr_handler_remove
(usr_gpio_handle_t gpio_handle)¶ Remove User space GPIO Soft-ISR handler.
- Return
ESP_OK on success
ESP_FAIL otherwise
- Parameters
gpio_handle
: Handle for the previously added soft-isr handler
-
esp_err_t
usr_esp_ota_user_app
(char *url, int len)¶ Start user app OTA.
- Return
ESP_OK on success
ESP_FAIL otherwise
- Parameters
url
: URL to download user app firmwarelen
: URL length
-
esp_err_t
usr_esp_user_ota_cancel_rollback
(void)¶ Mark user app as valid and cancel rollback.
- Return
ESP_OK on success
ESP_FAIL otherwise