Increase timeouts

This commit is contained in:
Jeremy Soller 2019-12-30 11:46:21 -07:00
parent 209834bee1
commit 0e59958dc0
No known key found for this signature in database
GPG Key ID: E988B49EE78A7FB1
4 changed files with 5 additions and 5 deletions

View File

@ -10,7 +10,7 @@ void kbc_init(void) {
*(KBC.control) = 0;
}
#define KBC_TIMEOUT 1000
#define KBC_TIMEOUT 10000
// System flag
static bool kbc_system = false;

View File

@ -9,7 +9,7 @@ void pmc_init(void) {
*(PMC_2.control) = 0x41;
}
#define PMC_TIMEOUT 1000
#define PMC_TIMEOUT 10000
enum PmcState {
PMC_STATE_DEFAULT,

View File

@ -4,7 +4,7 @@
#include <ec/smbus.h>
//TODO: find best value
#define I2C_TIMEOUT 1000
#define I2C_TIMEOUT 10000
void i2c_reset(bool kill) {
if (HOSTAA & HOSTA_BUSY) {

View File

@ -9,7 +9,7 @@
.data = &PSDAT ## NUM, \
}
#define TIMEOUT 1000
#define PS2_TIMEOUT 10000
#define PSSTS_TIMEOUT_ERR (1 << 6)
#define PSSTS_FRAME_ERR (1 << 5)
@ -45,7 +45,7 @@ static int ps2_transaction(struct Ps2 * ps2, uint8_t * data, int length, bool re
}
uint32_t timeout;
for (timeout = TIMEOUT; timeout > 0; timeout--) {
for (timeout = PS2_TIMEOUT; timeout > 0; timeout--) {
uint8_t status = *(ps2->status);
// If an error happened, clear status and return the error
if (status & PSSTS_ALL_ERR) {