15#ifndef NHAL_I2C_MASTER_ASYNC_H
16#define NHAL_I2C_MASTER_ASYNC_H
24#if defined(NHAL_I2C_ASYNC_SUPPORT)
121 const uint8_t *reg_address,
size_t reg_len,
122 uint8_t *data,
size_t data_len
void(* nhal_async_complete_cb_t)(void *context)
nhal_result_t
Unified HAL result type for all peripheral operations.
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.