NHAL Interface v0.5.0
Hardware Abstraction Layer Interface for Embedded Systems
Loading...
Searching...
No Matches
Data Structures | Typedefs | Enumerations
nhal_i2c_types.h File Reference

Defines common types and structures for the I2C Hardware Abstraction Layer (HAL). More...

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

Go to the source code of this file.

Data Structures

struct  nhal_i2c_config
 
struct  nhal_i2c_context
 Base I2C context - always present, minimal footprint. More...
 
struct  nhal_i2c_transfer_op_t
 Structure describing a single I2C message segment within a transaction. More...
 

Typedefs

typedef uint8_t nhal_i2c_bus_id
 
typedef uint16_t nhal_i2c_address
 

Enumerations

enum  nhal_i2c_transfer_bit_flags_t {
  NHAL_I2C_TRANSFER_MSG_WRITE = 1 , NHAL_I2C_TRANSFER_MSG_READ = 1<<1 , NHAL_I2C_TRANSFER_MSG_TEN_BIT_ADDR = 1<<2 , NHAL_I2C_TRANSFER_MSG_NO_START = 1<<3 ,
  NHAL_I2C_TRANSFER_MSG_NO_STOP = 1<<4 , NHAL_I2C_TRANSFER_MSG_NO_ADDR = 1<<5
}
 

Detailed Description

Defines common types and structures for the I2C Hardware Abstraction Layer (HAL).

This header file provides opaque types, enumerations, and structures used across the I2C HAL API to facilitate communication over I2C buses.

Definition in file nhal_i2c_types.h.

Typedef Documentation

◆ nhal_i2c_address

typedef uint16_t nhal_i2c_address

Definition at line 17 of file nhal_i2c_types.h.

◆ nhal_i2c_bus_id

typedef uint8_t nhal_i2c_bus_id

Definition at line 16 of file nhal_i2c_types.h.

Enumeration Type Documentation

◆ nhal_i2c_transfer_bit_flags_t

Enumerator
NHAL_I2C_TRANSFER_MSG_WRITE 

Message is a write operation (default).

NHAL_I2C_TRANSFER_MSG_READ 

Message is a read operation.

NHAL_I2C_TRANSFER_MSG_TEN_BIT_ADDR 

Use 10-bit addressing for this message.

NHAL_I2C_TRANSFER_MSG_NO_START 

Do not send a START condition before this message.

Useful for subsequent messages in a combined transaction (e.g., after a repeated start).

NHAL_I2C_TRANSFER_MSG_NO_STOP 

Do not send a STOP condition after this message.

Essential for creating repeated START conditions before the next message.

NHAL_I2C_TRANSFER_MSG_NO_ADDR 

Do not write the address first in this op.

Definition at line 36 of file nhal_i2c_types.h.