kopia lustrzana https://github.com/espressif/esp-idf
Merge branch 'bugfix/spi_slave_hd_callback_judge' into 'master'
spi_slave_hd: Prevent NULL callback from being called See merge request espressif/esp-idf!9998pull/5919/head
commit
286ccc600e
|
@ -222,7 +222,7 @@ static void rx_invoke(spi_slave_hd_slot_t* host)
|
|||
static inline IRAM_ATTR BaseType_t intr_check_clear_callback(spi_slave_hd_slot_t* host, spi_event_t ev, slave_cb_t cb)
|
||||
{
|
||||
BaseType_t cb_awoken = pdFALSE;
|
||||
if (spi_slave_hd_hal_check_clear_event(&host->hal, ev)) {
|
||||
if (spi_slave_hd_hal_check_clear_event(&host->hal, ev) && cb) {
|
||||
spi_slave_hd_event_t event = {.event = ev};
|
||||
cb(host->callback.arg, &event, &cb_awoken);
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue