跳转至

CFBD_I2CHandle

Public I2C handle containing the operations table and private state. More...

#include <iic.h>

Detailed Description

struct CFBD_I2CHandle;

Public I2C handle containing the operations table and private state.

Par: Example - Initializing an I2C Handle

// Backend (e.g., STM32) provides its operations
extern const CFBD_I2COperations stm32_i2c_ops;
extern void *i2c1_private_state;

// Initialize handle
CFBD_I2CHandle bus = {
    .ops = &stm32_i2c_ops,
    .private_handle = i2c1_private_state
};

// Now ready for use
CFBD_I2CInit(&bus);

Represents a complete I2C bus instance combining platform-independent operations with platform-specific state.


Updated on 2026-02-03 at 13:21:55 +0000