Loading...
Searching...
No Matches
furi_hal_spi.h
1#pragma once
2
3#include <furi_hal_spi_config.h>
4#include <stdbool.h>
5
6#ifdef __cplusplus
7extern "C" {
8#endif
9
11void furi_hal_spi_config_init_early(void);
12
14void furi_hal_spi_config_deinit_early(void);
15
17void furi_hal_spi_config_init(void);
18
20void furi_hal_spi_dma_init(void);
21
26void furi_hal_spi_bus_init(FuriHalSpiBus* bus);
27
32void furi_hal_spi_bus_deinit(FuriHalSpiBus* bus);
33
38void furi_hal_spi_bus_handle_init(FuriHalSpiBusHandle* handle);
39
44void furi_hal_spi_bus_handle_deinit(FuriHalSpiBusHandle* handle);
45
52void furi_hal_spi_acquire(FuriHalSpiBusHandle* handle);
53
60void furi_hal_spi_release(FuriHalSpiBusHandle* handle);
61
71bool furi_hal_spi_bus_rx(
72 FuriHalSpiBusHandle* handle,
73 uint8_t* buffer,
74 size_t size,
75 uint32_t timeout);
76
86bool furi_hal_spi_bus_tx(
87 FuriHalSpiBusHandle* handle,
88 const uint8_t* buffer,
89 size_t size,
90 uint32_t timeout);
91
102bool furi_hal_spi_bus_trx(
103 FuriHalSpiBusHandle* handle,
104 const uint8_t* tx_buffer,
105 uint8_t* rx_buffer,
106 size_t size,
107 uint32_t timeout);
108
119bool furi_hal_spi_bus_trx_dma(
120 FuriHalSpiBusHandle* handle,
121 uint8_t* tx_buffer,
122 uint8_t* rx_buffer,
123 size_t size,
124 uint32_t timeout_ms);
125
126#ifdef __cplusplus
127}
128#endif
FuriHal spi handle.
Definition furi_hal_spi_types.h:51
FuriHal spi bus.
Definition furi_hal_spi_types.h:31