Logo SoCRocket

Transaction-Level Modeling Framework for Space Applications

Classes | Macros | Functions
i2cslv.c File Reference
#include "testmod.h"
Include dependency graph for i2cslv.c:

Classes

struct  i2cslv_regs
 

Macros

#define I2CSLV_SLVADDR_TBA   (1 << 31)
 
#define I2CSLV_CTRL_RMOD_POS   4
 
#define I2CSLV_CTRL_RMOD   (1 << 4)
 
#define I2CSLV_CTRL_TMOD_POS   3
 
#define I2CSLV_CTRL_TMOD   (1 << 3)
 
#define I2CSLV_CTRL_TV   (1 << 2)
 
#define I2CSLV_CTRL_TAV   (1 << 1)
 
#define I2CSLV_CTRL_EN   (1 << 0)
 
#define I2CSLV_STS_REC   (1 << 2)
 
#define I2CSLV_STS_TRA   (1 << 1)
 
#define I2CSLV_STS_NAK   (1 << 0)
 
#define I2CSLV_MSK_RECE   (1 << 2)
 
#define I2CSLV_MSK_TRAE   (1 << 1)
 
#define I2CSLV_MSK_NAKE   (1 << 0)
 

Functions

int i2cslv_test (int addr)
 

Macro Definition Documentation

#define I2CSLV_CTRL_EN   (1 << 0)

Referenced by i2cslv_test().

#define I2CSLV_CTRL_RMOD   (1 << 4)

Referenced by i2cslv_test().

#define I2CSLV_CTRL_RMOD_POS   4
#define I2CSLV_CTRL_TAV   (1 << 1)

Referenced by i2cslv_test().

#define I2CSLV_CTRL_TMOD   (1 << 3)

Referenced by i2cslv_test().

#define I2CSLV_CTRL_TMOD_POS   3
#define I2CSLV_CTRL_TV   (1 << 2)

Referenced by i2cslv_test().

#define I2CSLV_MSK_NAKE   (1 << 0)

Referenced by i2cslv_test().

#define I2CSLV_MSK_RECE   (1 << 2)

Referenced by i2cslv_test().

#define I2CSLV_MSK_TRAE   (1 << 1)

Referenced by i2cslv_test().

#define I2CSLV_SLVADDR_TBA   (1 << 31)
#define I2CSLV_STS_NAK   (1 << 0)
#define I2CSLV_STS_REC   (1 << 2)
#define I2CSLV_STS_TRA   (1 << 1)

Function Documentation

int i2cslv_test ( int  addr)

References i2cslv_regs::ctrl, fail, i, I2CSLV_CTRL_EN, I2CSLV_CTRL_RMOD, I2CSLV_CTRL_TAV, I2CSLV_CTRL_TMOD, I2CSLV_CTRL_TV, I2CSLV_MSK_NAKE, I2CSLV_MSK_RECE, I2CSLV_MSK_TRAE, i2cslv_regs::msk, report_device(), report_subtest(), i2cslv_regs::slvaddr, and i2cslv_regs::sts.

Here is the call graph for this function: