Select one of the symbols to view example projects that use it.
 
Outline
#include "hal/spi_slave_hal.h"
#include "hal/spi_ll.h"
#include "soc/soc_caps.h"
spi_slave_hal_init(spi_slave_hal_context_t *, const spi_slave_hal_config_t *)
spi_slave_hal_setup_device(const spi_slave_hal_context_t *)
spi_slave_hal_deinit(spi_slave_hal_context_t *)
Files
loading (4/5)...
SourceVuESP-IDF Framework and ExamplesESP-IDFcomponents/hal/spi_slave_hal.c
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
#include "hal/spi_slave_hal.h" #include "hal/spi_ll.h" #include "soc/soc_caps.h" void spi_slave_hal_init(spi_slave_hal_context_t *hal, const spi_slave_hal_config_t *hal_config) { hal->hw = SPI_LL_GET_HW(hal_config->host_id); spi_ll_slave_init(hal->hw); //Force a transaction done interrupt. This interrupt won't fire yet because we initialized the SPI interrupt as //disabled. This way, we can just enable the SPI interrupt and the interrupt handler will kick in, handling //any transactions that are queued. spi_ll_set_int_stat(hal->hw); spi_ll_enable_int(hal->hw); }{ ... } void spi_slave_hal_setup_device(const spi_slave_hal_context_t *hal) { spi_ll_set_rx_lsbfirst(hal->hw, hal->rx_lsbfirst); spi_ll_set_tx_lsbfirst(hal->hw, hal->tx_lsbfirst); spi_ll_slave_set_mode(hal->hw, hal->mode, hal->use_dma); }{ ... } void spi_slave_hal_deinit(spi_slave_hal_context_t *hal) { }{ ... }
Details