mirror of
https://github.com/espressif/esp-idf.git
synced 2026-09-22 13:01:16 +03:00
feat(driver_spi): slave hd driver support to using psram buffer
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2015-2026 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -138,6 +138,15 @@ void spi_slave_hd_hal_init(spi_slave_hd_hal_context_t *hal, const spi_slave_hd_h
|
||||
*/
|
||||
bool spi_slave_hd_hal_check_clear_event(spi_slave_hd_hal_context_t* hal, spi_event_t ev);
|
||||
|
||||
/**
|
||||
* @brief Check and clear the interrupt by mask
|
||||
*
|
||||
* @param hal Context of the HAL layer
|
||||
* @param mask Mask of the interrupt bits to check
|
||||
* @return True if the masked interrupts are set, false otherwise
|
||||
*/
|
||||
bool spi_slave_hd_hal_check_clear_intr(spi_slave_hd_hal_context_t *hal, uint32_t mask);
|
||||
|
||||
/**
|
||||
* @brief Check and clear the interrupt of one event.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2015-2026 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -154,16 +154,20 @@ static spi_ll_intr_t get_event_intr(spi_slave_hd_hal_context_t *hal, spi_event_t
|
||||
return intr;
|
||||
}
|
||||
|
||||
bool spi_slave_hd_hal_check_clear_event(spi_slave_hd_hal_context_t *hal, spi_event_t ev)
|
||||
bool spi_slave_hd_hal_check_clear_intr(spi_slave_hd_hal_context_t *hal, uint32_t mask)
|
||||
{
|
||||
spi_ll_intr_t intr = get_event_intr(hal, ev);
|
||||
if (spi_ll_get_intr(hal->dev, intr)) {
|
||||
spi_ll_clear_intr(hal->dev, intr);
|
||||
if (spi_ll_get_intr(hal->dev, mask)) {
|
||||
spi_ll_clear_intr(hal->dev, mask);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool spi_slave_hd_hal_check_clear_event(spi_slave_hd_hal_context_t *hal, spi_event_t ev)
|
||||
{
|
||||
return spi_slave_hd_hal_check_clear_intr(hal, get_event_intr(hal, ev));
|
||||
}
|
||||
|
||||
bool spi_slave_hd_hal_check_disable_event(spi_slave_hd_hal_context_t *hal, spi_event_t ev)
|
||||
{
|
||||
//The trans_done interrupt is used for the workaround when some interrupt is not writable
|
||||
|
||||
Reference in New Issue
Block a user