NHAL Interface v0.5.0
Hardware Abstraction Layer Interface for Embedded Systems
Loading...
Searching...
No Matches
nhal_i2c_master_async.h
Go to the documentation of this file.
1
15#ifndef NHAL_I2C_MASTER_ASYNC_H
16#define NHAL_I2C_MASTER_ASYNC_H
17
18#include <stddef.h>
19#include <stdint.h>
20
21#include "nhal_common.h"
22#include "nhal_i2c_types.h"
23
24#if defined(NHAL_I2C_ASYNC_SUPPORT)
25
33 struct nhal_i2c_context * ctx,
34 const struct nhal_async_config * async_cfg
35);
36
43 struct nhal_i2c_context * ctx
44);
45
53 struct nhal_i2c_context *ctx,
55);
56
63 struct nhal_i2c_context *ctx
64);
65
72 struct nhal_i2c_context *ctx
73);
74
85 struct nhal_i2c_context *ctx,
86 nhal_i2c_address dev_address,
87 const uint8_t *data,
88 size_t len
89);
90
101 struct nhal_i2c_context *ctx,
102 nhal_i2c_address dev_address,
103 uint8_t *data,
104 size_t len
105);
106
119 struct nhal_i2c_context *ctx,
120 nhal_i2c_address dev_address,
121 const uint8_t *reg_address, size_t reg_len,
122 uint8_t *data, size_t data_len
123);
124
125#endif /* NHAL_I2C_ASYNC_SUPPORT */
126
127#endif /* NHAL_I2C_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_i2c_master_read_async(struct nhal_i2c_context *ctx, nhal_i2c_address dev_address, uint8_t *data, size_t len)
Read data from I2C device asynchronously.
nhal_result_t nhal_i2c_master_disable_async_callback(struct nhal_i2c_context *ctx)
Disable async completion callback.
nhal_result_t nhal_i2c_master_init_async(struct nhal_i2c_context *ctx, const struct nhal_async_config *async_cfg)
Initialize I2C context for async mode.
nhal_result_t nhal_i2c_master_set_async_callback(struct nhal_i2c_context *ctx, nhal_async_complete_cb_t callback)
Set callback for async operation completion.
nhal_result_t nhal_i2c_master_deinit_async(struct nhal_i2c_context *ctx)
Deinitialize I2C async mode.
nhal_result_t nhal_i2c_master_write_read_reg_async(struct nhal_i2c_context *ctx, nhal_i2c_address dev_address, const uint8_t *reg_address, size_t reg_len, uint8_t *data, size_t data_len)
Write to register then read from I2C device asynchronously.
nhal_async_status_t nhal_i2c_master_get_async_status(struct nhal_i2c_context *ctx)
Get current async operation status.
nhal_result_t nhal_i2c_master_write_async(struct nhal_i2c_context *ctx, nhal_i2c_address dev_address, const uint8_t *data, size_t len)
Write data to I2C device asynchronously.
Defines common types and structures for the I2C Hardware Abstraction Layer (HAL).
uint16_t nhal_i2c_address
Base I2C context - always present, minimal footprint.