Transaction-Level Modeling Framework for Space Applications
#include "testmod.h"
Classes | |
struct | i2cslv_regs |
struct | i2cmst_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) |
#define | I2CMST_CTR_EN (1 << 7) /* Enable core */ |
#define | I2CMST_CTR_IEN (1 << 6) /* Interrupt enable */ |
#define | I2CMST_CR_STA (1 << 7) /* Generate start condition */ |
#define | I2CMST_CR_STO (1 << 6) /* Generate stop condition */ |
#define | I2CMST_CR_RD (1 << 5) /* Read from slave */ |
#define | I2CMST_CR_WR (1 << 4) /* Write to slave */ |
#define | I2CMST_CR_ACK |
#define | I2CMST_CR_IACK (1 << 0) /* Interrupt acknowledge */ |
#define | I2CMST_SR_RXACK (1 << 7) /* Receibed acknowledge from slave */ |
#define | I2CMST_SR_BUSY (1 << 6) /* I2C bus busy */ |
#define | I2CMST_SR_AL (1 << 5) /* Arbitration lost */ |
#define | I2CMST_SR_TIP (1 << 1) /* Transfer in progress */ |
#define | I2CMST_SR_IF (1 << 0) /* Interrupt flag */ |
#define | PRESCALER 0x000A |
#define | SLAVE_ADDRESS 0x33 |
Functions | |
int | i2c_test (int mstaddr, int slvaddr) |
#define I2CMST_CR_ACK |
Referenced by i2c_test().
#define I2CMST_CR_IACK (1 << 0) /* Interrupt acknowledge */ |
#define I2CMST_CR_RD (1 << 5) /* Read from slave */ |
Referenced by i2c_test().
#define I2CMST_CR_STA (1 << 7) /* Generate start condition */ |
Referenced by i2c_test().
#define I2CMST_CR_STO (1 << 6) /* Generate stop condition */ |
Referenced by i2c_test().
#define I2CMST_CR_WR (1 << 4) /* Write to slave */ |
Referenced by i2c_test().
#define I2CMST_CTR_EN (1 << 7) /* Enable core */ |
Referenced by i2c_test().
#define I2CMST_CTR_IEN (1 << 6) /* Interrupt enable */ |
#define I2CMST_SR_AL (1 << 5) /* Arbitration lost */ |
Referenced by i2c_test().
#define I2CMST_SR_BUSY (1 << 6) /* I2C bus busy */ |
#define I2CMST_SR_IF (1 << 0) /* Interrupt flag */ |
#define I2CMST_SR_RXACK (1 << 7) /* Receibed acknowledge from slave */ |
Referenced by i2c_test().
#define I2CMST_SR_TIP (1 << 1) /* Transfer in progress */ |
Referenced by i2c_test().
#define I2CSLV_CTRL_EN (1 << 0) |
Referenced by i2c_test().
#define I2CSLV_CTRL_RMOD (1 << 4) |
Referenced by i2c_test().
#define I2CSLV_CTRL_RMOD_POS 4 |
#define I2CSLV_CTRL_TAV (1 << 1) |
#define I2CSLV_CTRL_TMOD (1 << 3) |
Referenced by i2c_test().
#define I2CSLV_CTRL_TMOD_POS 3 |
#define I2CSLV_CTRL_TV (1 << 2) |
Referenced by i2c_test().
#define I2CSLV_MSK_NAKE (1 << 0) |
#define I2CSLV_MSK_RECE (1 << 2) |
#define I2CSLV_MSK_TRAE (1 << 1) |
#define I2CSLV_SLVADDR_TBA (1 << 31) |
#define I2CSLV_STS_NAK (1 << 0) |
#define I2CSLV_STS_REC (1 << 2) |
Referenced by i2c_test().
#define I2CSLV_STS_TRA (1 << 1) |
Referenced by i2c_test().
#define PRESCALER 0x000A |
Referenced by i2c_test().
#define SLAVE_ADDRESS 0x33 |
Referenced by i2c_test().
References i2cmst_regs::csr, i2cmst_regs::ctr, i2cslv_regs::ctrl, fail, i, I2CMST_CR_ACK, I2CMST_CR_RD, I2CMST_CR_STA, I2CMST_CR_STO, I2CMST_CR_WR, I2CMST_CTR_EN, I2CMST_SR_AL, I2CMST_SR_RXACK, I2CMST_SR_TIP, I2CSLV_CTRL_EN, I2CSLV_CTRL_RMOD, I2CSLV_CTRL_TMOD, I2CSLV_CTRL_TV, I2CSLV_STS_REC, I2CSLV_STS_TRA, i2cslv_regs::msk, i2cmst_regs::prer, PRESCALER, i2cslv_regs::rd, report_device(), report_subtest(), SLAVE_ADDRESS, i2cslv_regs::slvaddr, i2cslv_regs::sts, i2cslv_regs::td, and i2cmst_regs::xr.