Cleared the specified interrupts for the host.
Set the IO ready for host to read.
Check and clear the interrupt indicating a buffer has finished receiving.
Unconditionally remove and return the first descriptor loaded to the HAL. Unless during de-initialization, `sdio_slave_hal_recv_has_next_item` should have succeed for the same times as this function is called, to ensure the returned descriptor has finished its receiving job.
Send general purpose interrupt (slave send to host).
Fetch the interrupt (host send to slave) status bits and clear all of them.
Get the value of a shared general purpose register.
Set the value of shared general purpose register.
End of Ring buffer ****************
Initialize the SDIO slave peripheral hardware.
The hardware sending DMA starts. If there is existing data, send them.
Stops hardware sending DMA.
Put some data into the sending queue.
The ISR should call this, to handle the SW invoking event.
Check whether there is no in-flight transactions, and send new packet if there is new packets queued.
Check whether the sending EOF has happened and clear the interrupt. Call `sdio_slave_hal_send_get_next_finished_arg` recursively to retrieve arguments of finished buffers.
Get the arguments of finished packets. Call recursively until all finished arguments are all retrieved.
Flush one buffer in the queue, no matter sent, canceled or not sent yet. Call recursively to clear the whole queue before deinitialization.
Walk through all the unsent buffers and reset the counter to the accumulated length of them. The data will be kept.
Call this function recursively to check whether there is any buffer that has finished receiving. Will walk through the linked list to find a newer finished buffer. For each successful return, it means there is one finished buffer. You can one by `sdio_slave_hal_recv_unload_desc`. You can also call `sdio_slave_hal_recv_has_next_item` several times continuously before you call the `sdio_slave_hal_recv_unload_desc` for the same times.
Walk through all the unused buffers and reset the counter to the number of them.
Enable some of the interrupts for the host.
Get the enabled interrupts.
Load the buffer to the HAL to be used to receive data.
Associate the buffer to the descriptor given. The descriptor may also be initialized with some other data.