Fix usage of SMBus channel E

This commit is contained in:
Jeremy Soller 2020-01-10 12:35:28 -07:00
parent 991da81117
commit 5914b174a2
No known key found for this signature in database
GPG Key ID: E988B49EE78A7FB1
2 changed files with 4 additions and 0 deletions

View File

@ -19,6 +19,8 @@ struct Gpio __code BKL_EN = GPIO(H, 2);
void gpio_init() { void gpio_init() {
// Enable LPC reset on GPD2 // Enable LPC reset on GPD2
GCR = 0x04; GCR = 0x04;
// Enable SMBus channel 4
GCR15 = (1 << 4);
// Set GPIO data // Set GPIO data
GPDRA = 0; GPDRA = 0;

View File

@ -72,6 +72,8 @@ volatile uint8_t __xdata __at(0x1CA8) PECERCE;
volatile uint8_t __xdata __at(0x1CA9) SMBPCTLE; volatile uint8_t __xdata __at(0x1CA9) SMBPCTLE;
// Host control 2 for channel E // Host control 2 for channel E
volatile uint8_t __xdata __at(0x1CAA) HOCTL2E; volatile uint8_t __xdata __at(0x1CAA) HOCTL2E;
// SMCLK timing setting for channel E
volatile uint8_t __xdata __at(0x1CAB) SCLKTSE;
// Timing registers // Timing registers
volatile uint8_t __xdata __at(0x1C22) SMB4P7USL; volatile uint8_t __xdata __at(0x1C22) SMB4P7USL;