NHAL Interface
v0.5.0
Hardware Abstraction Layer Interface for Embedded Systems
Loading...
Searching...
No Matches
include
nhal_spi_master.h
Go to the documentation of this file.
1
16
#ifndef NHAL_SPI_MASTER_H
17
#define NHAL_SPI_MASTER_H
18
19
#include <stdint.h>
20
#include <stddef.h>
21
22
#include "
nhal_common.h
"
23
#include "
nhal_spi_types.h
"
24
25
#ifdef __cplusplus
26
extern
"C"
{
27
#endif
28
29
nhal_result_t
nhal_spi_master_init
(
struct
nhal_spi_context
* ctx);
30
nhal_result_t
nhal_spi_master_deinit
(
struct
nhal_spi_context
* ctx);
31
nhal_result_t
nhal_spi_master_set_config
(
struct
nhal_spi_context
* ctx,
struct
nhal_spi_config
* config);
32
nhal_result_t
nhal_spi_master_get_config
(
struct
nhal_spi_context
* ctx,
struct
nhal_spi_config
* config);
33
34
nhal_result_t
nhal_spi_master_write
(
35
struct
nhal_spi_context
* ctx,
36
const
uint8_t * data,
size_t
len
37
);
38
39
nhal_result_t
nhal_spi_master_read
(
40
struct
nhal_spi_context
* ctx,
41
uint8_t * data,
size_t
len
42
);
43
44
nhal_result_t
nhal_spi_master_write_read
(
45
struct
nhal_spi_context
* ctx,
46
const
uint8_t * tx_data,
size_t
tx_len,
47
uint8_t * rx_data,
size_t
rx_len
48
);
49
50
#ifdef __cplusplus
51
}
52
#endif
53
54
#endif
nhal_common.h
nhal_result_t
nhal_result_t
Unified HAL result type for all peripheral operations.
Definition
nhal_common.h:22
nhal_spi_master_read
nhal_result_t nhal_spi_master_read(struct nhal_spi_context *ctx, uint8_t *data, size_t len)
nhal_spi_master_deinit
nhal_result_t nhal_spi_master_deinit(struct nhal_spi_context *ctx)
nhal_spi_master_init
nhal_result_t nhal_spi_master_init(struct nhal_spi_context *ctx)
nhal_spi_master_write
nhal_result_t nhal_spi_master_write(struct nhal_spi_context *ctx, const uint8_t *data, size_t len)
nhal_spi_master_get_config
nhal_result_t nhal_spi_master_get_config(struct nhal_spi_context *ctx, struct nhal_spi_config *config)
nhal_spi_master_write_read
nhal_result_t nhal_spi_master_write_read(struct nhal_spi_context *ctx, const uint8_t *tx_data, size_t tx_len, uint8_t *rx_data, size_t rx_len)
nhal_spi_master_set_config
nhal_result_t nhal_spi_master_set_config(struct nhal_spi_context *ctx, struct nhal_spi_config *config)
nhal_spi_types.h
Defines common types and structures for the SPI Hardware Abstraction Layer (HAL).
nhal_spi_config
Definition
nhal_spi_types.h:31
nhal_spi_context
Base SPI context - always present, minimal footprint.
Definition
nhal_spi_types.h:42
Generated by
1.9.8