LibJuno 1.0.1
LibJuno is a lightweight C11 library designed specifically for embedded systems.
Loading...
Searching...
No Matches
i2c_io_api.h File Reference

I2C transfer facade with simple read/write message descriptors. More...

#include "juno/status.h"
#include "juno/module.h"
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
Include dependency graph for i2c_io_api.h:

Go to the source code of this file.

Data Structures

struct  JUNO_I2C_IO_MSG_HDR_TAG
 
struct  JUNO_I2C_IO_MSG_R_TAG
 
struct  JUNO_I2C_IO_MSG_W_TAG
 
union  JUNO_I2C_IO_MSG_TAG
 
struct  JUNO_I2C_IO_API_TAG
 

Macros

#define ReadMsg(iAddr, pcBuff, zBuffSize)
 
#define WriteMsg(iAddr, pvBuff, zBuffSize)
 
#define JUNO_I2C_IO_TRANSFER(...)   (JUNO_I2C_IO_MSG_T[]){__VA_ARGS__}
 

Typedefs

typedef struct JUNO_I2C_IO_API_TAG JUNO_I2C_IO_API_T
 
typedef struct JUNO_I2C_IO_MSG_R_TAG JUNO_I2C_IO_MSG_R_T
 
typedef struct JUNO_I2C_IO_MSG_W_TAG JUNO_I2C_IO_MSG_W_T
 
typedef struct JUNO_I2C_IO_MSG_HDR_TAG JUNO_I2C_IO_MSG_HDR_T
 
typedef union JUNO_I2C_IO_MSG_TAG JUNO_I2C_IO_MSG_T
 
typedef enum JUNO_I2C_IO_MSG_TYPE_TAG JUNO_I2C_IO_MSG_TYPE_T
 

Enumerations

enum  JUNO_I2C_IO_MSG_TYPE_TAG { JUNO_I2C_IO_MSG_TYPE_RESERVED = 0 , JUNO_I2C_IO_MSG_TYPE_W = 1 , JUNO_I2C_IO_MSG_TYPE_R = 2 }
 

Functions

 JUNO_MODULE_ROOT_DECLARE (JUNO_I2C_IO_ROOT_T)
 
struct JUNO_I2C_IO_ROOT_TAG JUNO_MODULE_ROOT (JUNO_I2C_IO_API_T, JUNO_MODULE_EMPTY)
 

Detailed Description

I2C transfer facade with simple read/write message descriptors.

This API has been generated by LibJuno: https://www.robinonsay.com/libjuno/

Macro Definition Documentation

◆ JUNO_I2C_IO_TRANSFER

#define JUNO_I2C_IO_TRANSFER (   ...)    (JUNO_I2C_IO_MSG_T[]){__VA_ARGS__}

◆ ReadMsg

#define ReadMsg (   iAddr,
  pcBuff,
  zBuffSize 
)
Value:
{ \
.tRead = (JUNO_I2C_IO_MSG_R_T) \
{ \
.tHdr = {JUNO_I2C_IO_MSG_TYPE_R, iAddr}, \
.ptReadBuff = pcBuff, \
.zReadBuffSize = zBuffSize \
} \
}
@ JUNO_I2C_IO_MSG_TYPE_R
Definition i2c_io_api.h:55
union JUNO_I2C_IO_MSG_TAG JUNO_I2C_IO_MSG_T
Definition i2c_io_api.h:48
struct JUNO_I2C_IO_MSG_R_TAG JUNO_I2C_IO_MSG_R_T
Definition i2c_io_api.h:45

◆ WriteMsg

#define WriteMsg (   iAddr,
  pvBuff,
  zBuffSize 
)
Value:
{ \
.tWrite = (JUNO_I2C_IO_MSG_W_T) \
{ \
.tHdr = {JUNO_I2C_IO_MSG_TYPE_W, iAddr}, \
.ptWriteBuff = pvBuff, \
.zWriteBuffSize = zBuffSize \
} \
}
@ JUNO_I2C_IO_MSG_TYPE_W
Definition i2c_io_api.h:54
struct JUNO_I2C_IO_MSG_W_TAG JUNO_I2C_IO_MSG_W_T
Definition i2c_io_api.h:46

Typedef Documentation

◆ JUNO_I2C_IO_API_T

◆ JUNO_I2C_IO_MSG_HDR_T

◆ JUNO_I2C_IO_MSG_R_T

◆ JUNO_I2C_IO_MSG_T

◆ JUNO_I2C_IO_MSG_TYPE_T

◆ JUNO_I2C_IO_MSG_W_T

Enumeration Type Documentation

◆ JUNO_I2C_IO_MSG_TYPE_TAG

Enumerator
JUNO_I2C_IO_MSG_TYPE_RESERVED 
JUNO_I2C_IO_MSG_TYPE_W 
JUNO_I2C_IO_MSG_TYPE_R 

Function Documentation

◆ JUNO_MODULE_ROOT()

struct JUNO_I2C_IO_ROOT_TAG JUNO_MODULE_ROOT ( JUNO_I2C_IO_API_T  ,
JUNO_MODULE_EMPTY   
)

◆ JUNO_MODULE_ROOT_DECLARE()

JUNO_MODULE_ROOT_DECLARE ( JUNO_I2C_IO_ROOT_T  )