NHAL Interface v0.5.0
Hardware Abstraction Layer Interface for Embedded Systems
Loading...
Searching...
No Matches
nhal_spi_master_async.h
Go to the documentation of this file.
1
15#ifndef NHAL_SPI_MASTER_ASYNC_H
16#define NHAL_SPI_MASTER_ASYNC_H
17
18#include <stddef.h>
19#include <stdint.h>
20
21#include "nhal_common.h"
22#include "nhal_spi_types.h"
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
28#if defined(NHAL_SPI_ASYNC_SUPPORT)
29
37 struct nhal_spi_context * ctx,
38 const struct nhal_async_config * async_cfg
39);
40
47 struct nhal_spi_context * ctx
48);
49
57 struct nhal_spi_context *ctx,
59);
60
67 struct nhal_spi_context *ctx
68);
69
76 struct nhal_spi_context *ctx
77);
78
88 struct nhal_spi_context * ctx,
89 const uint8_t * data, size_t len,
90);
91
101 struct nhal_spi_context * ctx,
102 uint8_t * data, size_t len,
103);
104
116 struct nhal_spi_context * ctx,
117 const uint8_t * tx_data, size_t tx_len,
118 uint8_t * rx_data, size_t rx_len,
119);
120
121#endif /* NHAL_SPI_ASYNC_SUPPORT */
122
123#ifdef __cplusplus
124}
125#endif
126
127#endif /* NHAL_SPI_MASTER_ASYNC_H */
void(* nhal_async_complete_cb_t)(void *context)
Definition nhal_common.h:56
nhal_result_t
Unified HAL result type for all peripheral operations.
Definition nhal_common.h:22
nhal_async_status_t
Definition nhal_common.h:8
nhal_result_t nhal_spi_master_disable_async_callback(struct nhal_spi_context *ctx)
Disable async completion callback.
nhal_result_t nhal_spi_master_set_async_callback(struct nhal_spi_context *ctx, nhal_async_complete_cb_t callback)
Set callback for async operation completion.
nhal_async_status_t nhal_spi_master_get_async_status(struct nhal_spi_context *ctx)
Get current async operation status.
nhal_result_t nhal_spi_master_init_async(struct nhal_spi_context *ctx, const struct nhal_async_config *async_cfg)
Initialize SPI context for async mode.
nhal_result_t nhal_spi_master_write_read_async(struct nhal_spi_context *ctx, const uint8_t *tx_data, size_t tx_len, uint8_t *rx_data, size_t rx_len,)
Write and read data simultaneously (full-duplex) asynchronously.
nhal_result_t nhal_spi_master_deinit_async(struct nhal_spi_context *ctx)
Deinitialize SPI async mode.
nhal_result_t nhal_spi_master_read_async(struct nhal_spi_context *ctx, uint8_t *data, size_t len,)
Read data asynchronously.
nhal_result_t nhal_spi_master_write_async(struct nhal_spi_context *ctx, const uint8_t *data, size_t len,)
Write data asynchronously.
Defines common types and structures for the SPI Hardware Abstraction Layer (HAL).
Base SPI context - always present, minimal footprint.