Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix i2c_readReg16 #14730

Merged
merged 1 commit into from
Oct 7, 2021
Merged

Fix i2c_readReg16 #14730

merged 1 commit into from
Oct 7, 2021

Conversation

zvecr
Copy link
Member

@zvecr zvecr commented Oct 7, 2021

Description

Currently producing the following build error,

Compiling: platforms/chibios/drivers/i2c_master.c                                                  platforms/chibios/drivers/i2c_master.c: In function 'i2c_readReg16':
platforms/chibios/drivers/i2c_master.c:140:92: error: passing argument 3 of 'i2cMasterTransmitTimeout' from incompatible pointer type [-Werror=incompatible-pointer-types]
  140 |     msg_t   status             = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), &register_packet, 2, data, length, TIME_MS2I(timeout));
      |                                                                                            ^~~~~~~~~~~~~~~~
      |                                                                                            |
      |                                                                                            uint8_t (*)[2] {aka unsigned char (*)[2]}
In file included from ./lib/chibios/os/hal/include/hal.h:146,
                 from tmk_core/common/chibios/platform_deps.h:18,
                 from quantum/quantum.h:18,
                 from platforms/chibios/drivers/i2c_master.c:27:
./lib/chibios/os/hal/include/hal_i2c.h:146:49: note: expected 'const uint8_t *' {aka 'const unsigned char *'} but argument is of type 'uint8_t (*)[2]' {aka 'unsigned char (*)[2]'}
  146 |                                  const uint8_t *txbuf, size_t txbytes,
      |                                  ~~~~~~~~~~~~~~~^~~~~
cc1: all warnings being treated as errors
 [ERRORS]
 | 

Types of Changes

  • Core
  • Bugfix
  • New feature
  • Enhancement/optimization
  • Keyboard (addition or update)
  • Keymap/layout/userspace (addition or update)
  • Documentation

Issues Fixed or Closed by This PR

Checklist

  • My code follows the code style of this project: C, Python
  • I have read the PR Checklist document and have made the appropriate changes.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • I have tested the changes and verified that they work and don't break anything (as well as I can manage).

@zvecr zvecr requested a review from a team October 7, 2021 00:35
@zvecr zvecr added the bug label Oct 7, 2021
@github-actions github-actions bot added the core label Oct 7, 2021
@tzarc tzarc merged commit 951331c into qmk:develop Oct 7, 2021
cadusk pushed a commit to cadusk/qmk_firmware that referenced this pull request Oct 7, 2021
* qmk/develop: (47 commits)
  Correct the Turkish F '?' keycode (TR_QUES) (qmk#14740)
  Enabled Bootmagic Lite (qmk#14573)
  Remove SERIAL_LINK feature (qmk#14727)
  Reuse of EEPROM debounce logic (qmk#14699)
  Fix i2c_readReg16 (qmk#14730)
  Purge uGFX. (qmk#14720)
  i2c_master: Add support for reading/writing to 16-bit registers (qmk#14289)
  Updated Keychron Q1 user keymap (qmk#14666)
  Mode M65S touch-up (qmk#14722)
  Remove sysex API (qmk#14723)
  MelGeek Mach80: correct Configurator layout (qmk#14716)
  Added semicolons to rules.mk to allow symlinks from /bin/sh to /bin/zsh to complete the filesize check without error. (qmk#14718)
  Move Audio drivers from quantum to platform drivers folder (qmk#14308)
  [Bug] Fix command feature if mousekey is enabled and using 3-speed setting (qmk#14697)
  [Keyboard] Add basic Keyhive Sofle support (qmk#14296)
  [Keymap] Some updates to mechmerlin userspace and keymaps (qmk#14711)
  0xc7/61key touch-up (qmk#14712)
  Durgod DGK6X Galaxy: correct Configurator layout (qmk#14714)
  More PR checklist updates (qmk#14705)
  Add clarification for licensing. (qmk#14704)
  ...
ptrxyz pushed a commit to ptrxyz/qmk_firmware that referenced this pull request Apr 9, 2022
BorisTestov pushed a commit to BorisTestov/qmk_firmware that referenced this pull request May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants