summaryrefslogtreecommitdiff
path: root/drivers/arm/i2c_master.c
diff options
context:
space:
mode:
authorFlorian Didron <fdidron@users.noreply.github.com>2020-01-21 13:50:53 +0900
committerFlorian Didron <fdidron@users.noreply.github.com>2020-02-26 10:15:12 +0900
commitd3f23ecfbcd2a69714422ab68f346e51fcc2a6de (patch)
treec5c07493f4175738f623ca23f618682cc04b779a /drivers/arm/i2c_master.c
parent0c676d6e471e3c1eabf3158fab5cb4645abd29ee (diff)
Apollo (#246)
* Add External EEPROM driver * Add keyboard * Fix i2c address * Revert i2c address for eeprom * Reduce page size for 24LC128 * Disable External EEPROM for now * Fix up RGB Matrix and layout * Cleanup moonlander.c file * Fix led array center * Disable External EEPROM for now * Cleanup and optimization of files * Add and clean up mappings * Enable "ZSA" defaults for Moonlander * Update matrix to use i2c_readReg * Disable render limit for rgb matrix * Update pin controls to GPIO Commands * Add proper changed mechanism * Additional cleanup * Run clang-format on moonlander files * Align keymap * Limit brightness for rgb matrix to 200 To prevent power draw issues * Add USB-IF VID/PID * Add RGB Matrix Sleep code * Enable External EEPROM on Moonlander * Port over Ergodox Expander error handling and retry code * Re-init RGB Matrix drivers when half is reconnected * Add threaded LED display * Correct layer state settings after moonlander_led_task * Update Moonlander to include Oryx configuration * Add webUSB Stuff * Update default keymap * fix: merge conflict Co-authored-by: Drashna Jaelre <drashna@live.com>
Diffstat (limited to 'drivers/arm/i2c_master.c')
-rw-r--r--drivers/arm/i2c_master.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/arm/i2c_master.c b/drivers/arm/i2c_master.c
index 5a03b9f306..9ced3d2e3e 100644
--- a/drivers/arm/i2c_master.c
+++ b/drivers/arm/i2c_master.c
@@ -91,6 +91,10 @@ i2c_status_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16
return chibios_to_qmk(&status);
}
+i2c_status_t i2c_transmit_receive(uint8_t address, uint8_t * tx_body, uint16_t tx_length, uint8_t * rx_body, uint16_t rx_length) {
+ return i2cMasterTransmitTimeout(&I2C_DRIVER, address/2, tx_body, tx_length, rx_body, rx_length, MS2ST(100));
+}
+
i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, const uint8_t* data, uint16_t length, uint16_t timeout) {
i2c_address = devaddr;
i2cStart(&I2C_DRIVER, &i2cconfig);