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

Add central location for ChibiOS defines #7542

Merged
merged 4 commits into from
Dec 21, 2019

Conversation

zvecr
Copy link
Member

@zvecr zvecr commented Dec 4, 2019

Description

Given the ChibiOS HAL doesnt have a unified API, we end up in a HAL of HAL's situation where various code areas have to sniff config options and compile in different blocks of code. Unfortunately it doesn't look like there are internal "this board is using gpiov2" defines we can leverage.

Rather than have these defines duplicated, this PR aims to add a central location to manage the mcu logic.

Types of Changes

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

Checklist

  • My code follows the code style of this project.
  • 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 December 4, 2019 01:00
@yanfali
Copy link
Contributor

yanfali commented Dec 4, 2019

Where is this file? "chibios_config.h"

@zvecr
Copy link
Member Author

zvecr commented Dec 4, 2019

On my machine, which everyone clearly has access to....

@drashna
Copy link
Member

drashna commented Dec 5, 2019

ah, good ol' git commit -a rather than git add (or git commit /path/to/fie), I'm guessing 😆

Also, ergodox_stm32 doesn't like this change:

drivers/arm/i2c_master.c:37:5: error: 'I2C1_OPMODE' undeclared here (not in a function)
     I2C1_OPMODE,
     ^~~~~~~~~~~
 | 
 | 
 | 
tmk_core/rules.mk:377: recipe for target '.build/obj_ergodox_stm32_default/i2c_master.o' failed
make[1]: *** [.build/obj_ergodox_stm32_default/i2c_master.o] Error 1
make[1]: *** Waiting for unfinished jobs....

It uses an STM32F103, IIRC.

@zvecr zvecr mentioned this pull request Dec 8, 2019
13 tasks
@zvecr zvecr mentioned this pull request Dec 9, 2019
13 tasks
@drashna drashna requested a review from a team December 13, 2019 01:24
@zvecr zvecr force-pushed the feature/chibios_config branch from 8ed5b4a to eb92b53 Compare December 14, 2019 01:39
@zvecr
Copy link
Member Author

zvecr commented Dec 14, 2019

Rebased now #7571 is in, carried over the F4 logic.

@zvecr zvecr mentioned this pull request Dec 21, 2019
13 tasks
@zvecr zvecr merged commit 376419a into qmk:master Dec 21, 2019
Shinichi-Ohki added a commit to Shinichi-Ohki/qmk_firmware that referenced this pull request Dec 26, 2019
* 'master' of https://github.com/qmk/qmk_firmware: (226 commits)
  Make the keyboard beep when Audio is enabled and `\a` is encountered in a sendstring
  Turn off RGB Matrix LEDs when keyboard sleeps (qmk#7713)
  Add backwards compatibility for oled_write_raw_P on ARM
  Update toshi0383 keymap (qmk#7700)
  Completely remove i2c_transmit_receive function (qmk#7686)
  Readded lost pgm_read_word code to encoder array lookups (qmk#7577)
  Add central location for ChibiOS defines (qmk#7542)
  Add TADA68 keymap/rules/config for QMK bootloader (qmk#7679)
  [Docs] fix docs (qmk#7642)
  [Keyboard] Clueboard 60 fix col 11 12 mixup (qmk#7685)
  Missed these LTO blocks
  I corrected my name.
  [Keymap] Added userspace for d4mation. Included their keymap for the Atreus62 (qmk#7483)
  [Keymap] Custom user keymap for Think6.5 with LED range control (qmk#7603)
  [Keymap] CRKBD Custom Keymap - KidBrazil (qmk#7630)
  [Keymap] Add pico 70 keys keymap (qmk#7654)
  Improve docs "Edit Document" footer
  Tidy up dztech config.h
  Tidy up dztech default keymaps and info.json (qmk#7608)
  Heisenberg handwired keyboard added (qmk#7643)
  ...
akrob pushed a commit to akrob/qmk_firmware that referenced this pull request Dec 28, 2019
* upstream/master: (1080 commits)
  Update toshi0383 keymap (qmk#7700)
  Completely remove i2c_transmit_receive function (qmk#7686)
  Readded lost pgm_read_word code to encoder array lookups (qmk#7577)
  Add central location for ChibiOS defines (qmk#7542)
  Add TADA68 keymap/rules/config for QMK bootloader (qmk#7679)
  [Docs] fix docs (qmk#7642)
  [Keyboard] Clueboard 60 fix col 11 12 mixup (qmk#7685)
  Missed these LTO blocks
  I corrected my name.
  [Keymap] Added userspace for d4mation. Included their keymap for the Atreus62 (qmk#7483)
  [Keymap] Custom user keymap for Think6.5 with LED range control (qmk#7603)
  [Keymap] CRKBD Custom Keymap - KidBrazil (qmk#7630)
  [Keymap] Add pico 70 keys keymap (qmk#7654)
  Improve docs "Edit Document" footer
  Tidy up dztech config.h
  Tidy up dztech default keymaps and info.json (qmk#7608)
  Heisenberg handwired keyboard added (qmk#7643)
  [Keyboard] Added Filco Majestouch TKL Pegasus Hoof ISO Layout (qmk#7647)
  Ported J80 to QMK (qmk#7488)
  [Keyboard] Magnavox Videowriter conversion with Pro Micro (qmk#7634)
  ...
patrl pushed a commit to patrl/qmk_firmware that referenced this pull request Dec 29, 2019
* Add central location for chibios defines

* Add central location for chibios defines - actually add files this time....

* Add Copyright header

* Update include order to resolve i2cv1 build errors
drashna pushed a commit to zsa/qmk_firmware that referenced this pull request Feb 12, 2020
* Add central location for chibios defines

* Add central location for chibios defines - actually add files this time....

* Add Copyright header

* Update include order to resolve i2cv1 build errors
fdidron pushed a commit to zsa/qmk_firmware that referenced this pull request Feb 14, 2020
* Add central location for chibios defines

* Add central location for chibios defines - actually add files this time....

* Add Copyright header

* Update include order to resolve i2cv1 build errors
HokieGeek pushed a commit to HokieGeek/qmk_firmware that referenced this pull request Feb 21, 2020
* Add central location for chibios defines

* Add central location for chibios defines - actually add files this time....

* Add Copyright header

* Update include order to resolve i2cv1 build errors
fdidron pushed a commit to zsa/qmk_firmware that referenced this pull request Feb 26, 2020
* Add central location for chibios defines

* Add central location for chibios defines - actually add files this time....

* Add Copyright header

* Update include order to resolve i2cv1 build errors
kylekuj pushed a commit to kylekuj/qmk_firmware that referenced this pull request Apr 21, 2020
* Add central location for chibios defines

* Add central location for chibios defines - actually add files this time....

* Add Copyright header

* Update include order to resolve i2cv1 build errors
@zvecr zvecr deleted the feature/chibios_config branch April 28, 2020 01:03
BorisTestov pushed a commit to BorisTestov/qmk_firmware that referenced this pull request May 23, 2024
* Add central location for chibios defines

* Add central location for chibios defines - actually add files this time....

* Add Copyright header

* Update include order to resolve i2cv1 build errors
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.

4 participants