Add TCPM I2C bus and initialize it
This commit is contained in:
@ -14,6 +14,14 @@ struct I2C {
|
||||
volatile uint8_t * trasla;
|
||||
};
|
||||
|
||||
struct I2C __code I2C_1 = {
|
||||
.hosta = HOSTAB,
|
||||
.hoctl = HOCTLB,
|
||||
.hoctl2 = HOCTL2B,
|
||||
.hobdb = HOBDBB,
|
||||
.trasla = TRASLAB,
|
||||
};
|
||||
|
||||
struct I2C __code I2C_4 = {
|
||||
.hosta = HOSTAE,
|
||||
.hoctl = HOCTLE,
|
||||
|
@ -3,6 +3,7 @@
|
||||
|
||||
#include <common/i2c.h>
|
||||
|
||||
extern struct I2C __code I2C_1;
|
||||
extern struct I2C __code I2C_4;
|
||||
|
||||
void i2c_reset(struct I2C * i2c, bool kill);
|
||||
|
@ -52,6 +52,45 @@ volatile uint8_t __xdata __at(0x1C3F) RESLADR2A;
|
||||
// SMCLK timing setting for channel A
|
||||
volatile uint8_t __xdata __at(0x1C40) SCLKTSA;
|
||||
|
||||
// Host status for channel B
|
||||
volatile uint8_t __xdata __at(0x1C11) HOSTAB;
|
||||
// Host control for channel B
|
||||
volatile uint8_t __xdata __at(0x1C12) HOCTLB;
|
||||
// Host command for channel B
|
||||
volatile uint8_t __xdata __at(0x1C13) HOCMDB;
|
||||
// Transmit slave address for channel B
|
||||
volatile uint8_t __xdata __at(0x1C14) TRASLAB;
|
||||
// Host data 0 for channel B
|
||||
volatile uint8_t __xdata __at(0x1C15) D0REGB;
|
||||
// Host data 1 for channel B
|
||||
volatile uint8_t __xdata __at(0x1C16) D1REGB;
|
||||
// Host block data byte for channel B
|
||||
volatile uint8_t __xdata __at(0x1C17) HOBDBB;
|
||||
// Packet error check for channel B
|
||||
volatile uint8_t __xdata __at(0x1C18) PECERCB;
|
||||
// Receive slave address for channel B
|
||||
volatile uint8_t __xdata __at(0x1C19) RESLADRB;
|
||||
// Slave data for channel B
|
||||
volatile uint8_t __xdata __at(0x1C1A) SLDAB;
|
||||
// SMBus pin control for channel B
|
||||
volatile uint8_t __xdata __at(0x1C1B) SMBPCTLB;
|
||||
// Slave status for channel B
|
||||
volatile uint8_t __xdata __at(0x1C1C) SLSTAB;
|
||||
// Slave interrupt control for channel B
|
||||
volatile uint8_t __xdata __at(0x1C1D) SICRB;
|
||||
// Notify device address for channel B
|
||||
volatile uint8_t __xdata __at(0x1C1E) NDADRB;
|
||||
// Notify data low byte for channel A
|
||||
volatile uint8_t __xdata __at(0x1C1F) NDLBB;
|
||||
// Notify data high byte for channel B
|
||||
volatile uint8_t __xdata __at(0x1C20) NDHBB;
|
||||
// Host control 2 for channel B
|
||||
volatile uint8_t __xdata __at(0x1C21) HOCTL2B;
|
||||
// Receive slave address 2 for channel B
|
||||
volatile uint8_t __xdata __at(0x1C44) RESLADR2B;
|
||||
// SMCLK timing setting for channel B
|
||||
volatile uint8_t __xdata __at(0x1C41) SCLKTSB;
|
||||
|
||||
// Host status for channel E
|
||||
volatile uint8_t __xdata __at(0x1CA0) HOSTAE;
|
||||
// Host control for channel E
|
||||
|
Reference in New Issue
Block a user