diff options
Diffstat (limited to 'keyboards/cannonkeys/satisfaction75/i2c_master.c')
| -rw-r--r-- | keyboards/cannonkeys/satisfaction75/i2c_master.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/keyboards/cannonkeys/satisfaction75/i2c_master.c b/keyboards/cannonkeys/satisfaction75/i2c_master.c index 0e3adbbf1..d87f7668d 100644 --- a/keyboards/cannonkeys/satisfaction75/i2c_master.c +++ b/keyboards/cannonkeys/satisfaction75/i2c_master.c | |||
| @@ -81,7 +81,7 @@ i2c_status_t i2c_transmit(uint8_t address, const uint8_t* data, uint16_t length, | |||
| 81 | i2c_address = address; | 81 | i2c_address = address; |
| 82 | i2cStart(&I2C_DRIVER, &i2cconfig); | 82 | i2cStart(&I2C_DRIVER, &i2cconfig); |
| 83 | i2cAcquireBus(&I2C_DRIVER); | 83 | i2cAcquireBus(&I2C_DRIVER); |
| 84 | msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), data, length, 0, 0, MS2ST(timeout)); | 84 | msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), data, length, 0, 0, TIME_MS2I(timeout)); |
| 85 | i2cReleaseBus(&I2C_DRIVER); | 85 | i2cReleaseBus(&I2C_DRIVER); |
| 86 | return chibios_to_qmk(status); | 86 | return chibios_to_qmk(status); |
| 87 | } | 87 | } |
| @@ -90,7 +90,7 @@ i2c_status_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16 | |||
| 90 | { | 90 | { |
| 91 | i2c_address = address; | 91 | i2c_address = address; |
| 92 | i2cStart(&I2C_DRIVER, &i2cconfig); | 92 | i2cStart(&I2C_DRIVER, &i2cconfig); |
| 93 | msg_t status = i2cMasterReceiveTimeout(&I2C_DRIVER, (i2c_address >> 1), data, length, MS2ST(timeout)); | 93 | msg_t status = i2cMasterReceiveTimeout(&I2C_DRIVER, (i2c_address >> 1), data, length, TIME_MS2I(timeout)); |
| 94 | return chibios_to_qmk(status); | 94 | return chibios_to_qmk(status); |
| 95 | } | 95 | } |
| 96 | 96 | ||
| @@ -106,7 +106,7 @@ i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, const uint8_t* data, | |||
| 106 | } | 106 | } |
| 107 | complete_packet[0] = regaddr; | 107 | complete_packet[0] = regaddr; |
| 108 | 108 | ||
| 109 | msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), complete_packet, length + 1, 0, 0, MS2ST(timeout)); | 109 | msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), complete_packet, length + 1, 0, 0, TIME_MS2I(timeout)); |
| 110 | return chibios_to_qmk(status); | 110 | return chibios_to_qmk(status); |
| 111 | } | 111 | } |
| 112 | 112 | ||
| @@ -114,7 +114,7 @@ i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16 | |||
| 114 | { | 114 | { |
| 115 | i2c_address = devaddr; | 115 | i2c_address = devaddr; |
| 116 | i2cStart(&I2C_DRIVER, &i2cconfig); | 116 | i2cStart(&I2C_DRIVER, &i2cconfig); |
| 117 | msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), ®addr, 1, data, length, MS2ST(timeout)); | 117 | msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), ®addr, 1, data, length, TIME_MS2I(timeout)); |
| 118 | return chibios_to_qmk(status); | 118 | return chibios_to_qmk(status); |
| 119 | } | 119 | } |
| 120 | 120 | ||
