NHAL Interface v0.5.0
Hardware Abstraction Layer Interface for Embedded Systems
Loading...
Searching...
No Matches
Functions
nhal_i2c_transfer.h File Reference

Defines the API for low-level I2C bus transfers in a Hardware Abstraction Layer (HAL). More...

#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#include "nhal_common.h"
#include "nhal_i2c_types.h"

Go to the source code of this file.

Functions

nhal_result_t nhal_i2c_master_perform_transfer (struct nhal_i2c_context *ctx, nhal_i2c_transfer_op_t *ops, size_t num_ops)
 Perform complex I2C transfer with multiple operations.
 

Detailed Description

Defines the API for low-level I2C bus transfers in a Hardware Abstraction Layer (HAL).

This header declares an API function for low-level I2C bus transfers, referencing structures and enums defined in nhal_i2c_types.h to facilitate complex I2C transactions, including multi-message transfers with explicit control over START/STOP conditions and addressing.

Definition in file nhal_i2c_transfer.h.

Function Documentation

◆ nhal_i2c_master_perform_transfer()

nhal_result_t nhal_i2c_master_perform_transfer ( struct nhal_i2c_context ctx,
nhal_i2c_transfer_op_t ops,
size_t  num_ops 
)

Perform complex I2C transfer with multiple operations.

Parameters
ctxPointer to I2C context structure
opsArray of transfer operations to perform
num_opsNumber of operations in the array
timeout_msTimeout in milliseconds
Returns
NHAL_OK on success, error code otherwise