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 parentheses in macros, and in general clean up quantum.h #5021

Merged
merged 14 commits into from
Jul 9, 2019

Conversation

vomindoraan
Copy link
Contributor

@vomindoraan vomindoraan commented Jan 31, 2019

Description

I noticed the GPIO macros in quantum.h suffer from the same bug with parentheses as in #4775. This PR fixes that, tweaks the macros a bit, and also improves their visual layout. Furthermore, I've made the indentation consistent (4 spaces for now, since that's what the file was already using). I've tweaked the preprocessor directives to be more consistent as well.

I recommend turning "Hide whitespace changes" on and reviewing this in side-by-side view, makes it easier to keep track of the changes.

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. (https://docs.qmk.fm/#/contributing)
  • 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).

quantum/quantum.h Show resolved Hide resolved
quantum/quantum.h Show resolved Hide resolved
quantum/quantum.h Show resolved Hide resolved
@vomindoraan vomindoraan force-pushed the quantum_macros_fixup branch 2 times, most recently from d386ad1 to a309217 Compare January 31, 2019 16:05
@drashna
Copy link
Member

drashna commented Feb 1, 2019

@jackhumbert ?

@vomindoraan
Copy link
Contributor Author

Resolved conflict with master.

@yiancar
Copy link
Contributor

yiancar commented Feb 11, 2019

@vomindoraan thanks for making my ugly defines pretty:)

@yiancar
Copy link
Contributor

yiancar commented Feb 15, 2019

@jackhumbert where aaare you?:p

@drashna
Copy link
Member

drashna commented Feb 16, 2019

Merge conflicts

@vomindoraan
Copy link
Contributor Author

Huh, I don't see any conflicts.

@drashna
Copy link
Member

drashna commented Feb 16, 2019

Oh, ugh, it was for rebasing. 🗡

quantum/quantum.h Outdated Show resolved Hide resolved
quantum/quantum.h Outdated Show resolved Hide resolved
@skullydazed
Copy link
Member

Can you please remove the reformatting? We no longer make changes like that because it hides the person who actually wrote the code. We consider this (very minor) refactoring.

@vomindoraan
Copy link
Contributor Author

Sure thing. Do you mean just the indentation changes, or do you have other things in mind as well?

@vomindoraan
Copy link
Contributor Author

Bumping this, hope to see a merge soon.

@vomindoraan
Copy link
Contributor Author

Bump.

@vomindoraan
Copy link
Contributor Author

vomindoraan commented Jul 9, 2019

Monthly bump + update to latest master. 😄

@drashna drashna merged commit c690604 into qmk:master Jul 9, 2019
drashna pushed a commit to zsa/qmk_firmware that referenced this pull request Jul 9, 2019
* Fix up GPIO macros

* Fix up send string macros

`string` arguments must not be parenthesized

* Fix up miscellaneous macros

* Make indentation uniform (4 spaces)

* Make #ifdef vs #if defined usage consistent

* Reorder standard includes

* Revert indentation changes as per review comments

* Revert #if defined(__AVR__) → #ifdef __AVR__ change

* Change 2 space indent to 4 spaces on a couple of lines

* Replace include guard with #pragma once
@vomindoraan vomindoraan deleted the quantum_macros_fixup branch July 9, 2019 23:07
fdidron pushed a commit to zsa/qmk_firmware that referenced this pull request Jul 10, 2019
* Fix up GPIO macros

* Fix up send string macros

`string` arguments must not be parenthesized

* Fix up miscellaneous macros

* Make indentation uniform (4 spaces)

* Make #ifdef vs #if defined usage consistent

* Reorder standard includes

* Revert indentation changes as per review comments

* Revert #if defined(__AVR__) → #ifdef __AVR__ change

* Change 2 space indent to 4 spaces on a couple of lines

* Replace include guard with #pragma once
doughsay pushed a commit to doughsay/qmk_firmware that referenced this pull request Aug 31, 2019
* Fix up GPIO macros

* Fix up send string macros

`string` arguments must not be parenthesized

* Fix up miscellaneous macros

* Make indentation uniform (4 spaces)

* Make #ifdef vs #if defined usage consistent

* Reorder standard includes

* Revert indentation changes as per review comments

* Revert #if defined(__AVR__) → #ifdef __AVR__ change

* Change 2 space indent to 4 spaces on a couple of lines

* Replace include guard with #pragma once
swanmatch pushed a commit to swanmatch/qmk_firmware that referenced this pull request Sep 3, 2019
* Fix up GPIO macros

* Fix up send string macros

`string` arguments must not be parenthesized

* Fix up miscellaneous macros

* Make indentation uniform (4 spaces)

* Make #ifdef vs #if defined usage consistent

* Reorder standard includes

* Revert indentation changes as per review comments

* Revert #if defined(__AVR__) → #ifdef __AVR__ change

* Change 2 space indent to 4 spaces on a couple of lines

* Replace include guard with #pragma once
ripxorip pushed a commit to ripxorip/qmk_firmware that referenced this pull request Dec 3, 2019
* Fix up GPIO macros

* Fix up send string macros

`string` arguments must not be parenthesized

* Fix up miscellaneous macros

* Make indentation uniform (4 spaces)

* Make #ifdef vs #if defined usage consistent

* Reorder standard includes

* Revert indentation changes as per review comments

* Revert #if defined(__AVR__) → #ifdef __AVR__ change

* Change 2 space indent to 4 spaces on a couple of lines

* Replace include guard with #pragma once
ridingqwerty pushed a commit to ridingqwerty/qmk_firmware that referenced this pull request Jan 10, 2020
* Fix up GPIO macros

* Fix up send string macros

`string` arguments must not be parenthesized

* Fix up miscellaneous macros

* Make indentation uniform (4 spaces)

* Make #ifdef vs #if defined usage consistent

* Reorder standard includes

* Revert indentation changes as per review comments

* Revert #if defined(__AVR__) → #ifdef __AVR__ change

* Change 2 space indent to 4 spaces on a couple of lines

* Replace include guard with #pragma once
swanmatch pushed a commit to swanmatch/qmk_firmware that referenced this pull request Jan 21, 2020
* Fix up GPIO macros

* Fix up send string macros

`string` arguments must not be parenthesized

* Fix up miscellaneous macros

* Make indentation uniform (4 spaces)

* Make #ifdef vs #if defined usage consistent

* Reorder standard includes

* Revert indentation changes as per review comments

* Revert #if defined(__AVR__) → #ifdef __AVR__ change

* Change 2 space indent to 4 spaces on a couple of lines

* Replace include guard with #pragma once
fauxpark added a commit that referenced this pull request Feb 21, 2020
* make silverbullet44

* comment edit

* venderID

* Fix parentheses in macros, and in general clean up quantum.h (#5021)

* Fix up GPIO macros

* Fix up send string macros

`string` arguments must not be parenthesized

* Fix up miscellaneous macros

* Make indentation uniform (4 spaces)

* Make #ifdef vs #if defined usage consistent

* Reorder standard includes

* Revert indentation changes as per review comments

* Revert #if defined(__AVR__) → #ifdef __AVR__ change

* Change 2 space indent to 4 spaces on a couple of lines

* Replace include guard with #pragma once

* alt+tab

* copy from master:silverbullet44

* adjust for pull request

* clang-format

* create info.json

* Delete new_project.sh

* Update keyboards/silverbullet44/keymaps/default/config.h

Co-Authored-By: Max Rumpf <max.rumpf1998@gmail.com>

* Update keyboards/silverbullet44/silverbullet44.c

Co-Authored-By: Max Rumpf <max.rumpf1998@gmail.com>

* Update keyboards/silverbullet44/silverbullet44.h

Co-Authored-By: Max Rumpf <max.rumpf1998@gmail.com>

* Apply suggestions from Maxr1998

* format default keymap

* Apply suggestions from Maxr1998 (#2)

* Apply suggestions from fauxpark

* fix readme.md

* Apply suggestion from Maxr1998. (custom_keycode to MO(_ADJUST))

* I became a tricky! Hahaha!!

* Add original keymap made by FKML

* deleated at config.h

* Changed Copyright

* Delete
// Defines the keycodes used by our macros in process_record_user
//enum custom_keycodes {
//  QMKBEST = SAFE_RANGE,
//  QMKURL
//};

* Delete bool alt_pressed = false;

* Delete ADJUST

* Delete /

* Delete void matrix_scan_user(void) {

}

void led_set_user(uint8_t usb_led) {

}

* Change Copyright's year.

* Delete adjust

* Delete adjust

* Delete adjust

* 列挙型に変更

* Enclose  keymap with ```.

* Delete
#define _______ KC_TRNS
#define XXXXXXX KC_NO

* Fix indentation.

* Delete some rows.

* Aligned columns of ''readme.md''.

* I got god's keymap...hahaha:)

* Update keyboards/silverbullet44/readme.md

Co-Authored-By: fauxpark <fauxpark@gmail.com>

* Update keyboards/silverbullet44/rules.mk

Co-Authored-By: fauxpark <fauxpark@gmail.com>

Co-authored-by: Konstantin Đorđević <vomindoraan@gmail.com>
Co-authored-by: Max Rumpf <max.rumpf1998@gmail.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
sowbug pushed a commit to sowbug/qmk_firmware that referenced this pull request Feb 23, 2020
* make silverbullet44

* comment edit

* venderID

* Fix parentheses in macros, and in general clean up quantum.h (qmk#5021)

* Fix up GPIO macros

* Fix up send string macros

`string` arguments must not be parenthesized

* Fix up miscellaneous macros

* Make indentation uniform (4 spaces)

* Make #ifdef vs #if defined usage consistent

* Reorder standard includes

* Revert indentation changes as per review comments

* Revert #if defined(__AVR__) → #ifdef __AVR__ change

* Change 2 space indent to 4 spaces on a couple of lines

* Replace include guard with #pragma once

* alt+tab

* copy from master:silverbullet44

* adjust for pull request

* clang-format

* create info.json

* Delete new_project.sh

* Update keyboards/silverbullet44/keymaps/default/config.h

Co-Authored-By: Max Rumpf <max.rumpf1998@gmail.com>

* Update keyboards/silverbullet44/silverbullet44.c

Co-Authored-By: Max Rumpf <max.rumpf1998@gmail.com>

* Update keyboards/silverbullet44/silverbullet44.h

Co-Authored-By: Max Rumpf <max.rumpf1998@gmail.com>

* Apply suggestions from Maxr1998

* format default keymap

* Apply suggestions from Maxr1998 (qmk#2)

* Apply suggestions from fauxpark

* fix readme.md

* Apply suggestion from Maxr1998. (custom_keycode to MO(_ADJUST))

* I became a tricky! Hahaha!!

* Add original keymap made by FKML

* deleated at config.h

* Changed Copyright

* Delete
// Defines the keycodes used by our macros in process_record_user
//enum custom_keycodes {
//  QMKBEST = SAFE_RANGE,
//  QMKURL
//};

* Delete bool alt_pressed = false;

* Delete ADJUST

* Delete /

* Delete void matrix_scan_user(void) {

}

void led_set_user(uint8_t usb_led) {

}

* Change Copyright's year.

* Delete adjust

* Delete adjust

* Delete adjust

* 列挙型に変更

* Enclose  keymap with ```.

* Delete
#define _______ KC_TRNS
#define XXXXXXX KC_NO

* Fix indentation.

* Delete some rows.

* Aligned columns of ''readme.md''.

* I got god's keymap...hahaha:)

* Update keyboards/silverbullet44/readme.md

Co-Authored-By: fauxpark <fauxpark@gmail.com>

* Update keyboards/silverbullet44/rules.mk

Co-Authored-By: fauxpark <fauxpark@gmail.com>

Co-authored-by: Konstantin Đorđević <vomindoraan@gmail.com>
Co-authored-by: Max Rumpf <max.rumpf1998@gmail.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
HokieGeek pushed a commit to HokieGeek/qmk_firmware that referenced this pull request Mar 5, 2020
* make silverbullet44

* comment edit

* venderID

* Fix parentheses in macros, and in general clean up quantum.h (qmk#5021)

* Fix up GPIO macros

* Fix up send string macros

`string` arguments must not be parenthesized

* Fix up miscellaneous macros

* Make indentation uniform (4 spaces)

* Make #ifdef vs #if defined usage consistent

* Reorder standard includes

* Revert indentation changes as per review comments

* Revert #if defined(__AVR__) → #ifdef __AVR__ change

* Change 2 space indent to 4 spaces on a couple of lines

* Replace include guard with #pragma once

* alt+tab

* copy from master:silverbullet44

* adjust for pull request

* clang-format

* create info.json

* Delete new_project.sh

* Update keyboards/silverbullet44/keymaps/default/config.h

Co-Authored-By: Max Rumpf <max.rumpf1998@gmail.com>

* Update keyboards/silverbullet44/silverbullet44.c

Co-Authored-By: Max Rumpf <max.rumpf1998@gmail.com>

* Update keyboards/silverbullet44/silverbullet44.h

Co-Authored-By: Max Rumpf <max.rumpf1998@gmail.com>

* Apply suggestions from Maxr1998

* format default keymap

* Apply suggestions from Maxr1998 (qmk#2)

* Apply suggestions from fauxpark

* fix readme.md

* Apply suggestion from Maxr1998. (custom_keycode to MO(_ADJUST))

* I became a tricky! Hahaha!!

* Add original keymap made by FKML

* deleated at config.h

* Changed Copyright

* Delete
// Defines the keycodes used by our macros in process_record_user
//enum custom_keycodes {
//  QMKBEST = SAFE_RANGE,
//  QMKURL
//};

* Delete bool alt_pressed = false;

* Delete ADJUST

* Delete /

* Delete void matrix_scan_user(void) {

}

void led_set_user(uint8_t usb_led) {

}

* Change Copyright's year.

* Delete adjust

* Delete adjust

* Delete adjust

* 列挙型に変更

* Enclose  keymap with ```.

* Delete
#define _______ KC_TRNS
#define XXXXXXX KC_NO

* Fix indentation.

* Delete some rows.

* Aligned columns of ''readme.md''.

* I got god's keymap...hahaha:)

* Update keyboards/silverbullet44/readme.md

Co-Authored-By: fauxpark <fauxpark@gmail.com>

* Update keyboards/silverbullet44/rules.mk

Co-Authored-By: fauxpark <fauxpark@gmail.com>

Co-authored-by: Konstantin Đorđević <vomindoraan@gmail.com>
Co-authored-by: Max Rumpf <max.rumpf1998@gmail.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
swamp09 pushed a commit to swamp09/qmk_firmware that referenced this pull request Mar 11, 2020
* Fix up GPIO macros

* Fix up send string macros

`string` arguments must not be parenthesized

* Fix up miscellaneous macros

* Make indentation uniform (4 spaces)

* Make #ifdef vs #if defined usage consistent

* Reorder standard includes

* Revert indentation changes as per review comments

* Revert #if defined(__AVR__) → #ifdef __AVR__ change

* Change 2 space indent to 4 spaces on a couple of lines

* Replace include guard with #pragma once
c0psrul3 pushed a commit to c0psrul3/qmk_firmware that referenced this pull request Mar 23, 2020
* make silverbullet44

* comment edit

* venderID

* Fix parentheses in macros, and in general clean up quantum.h (qmk#5021)

* Fix up GPIO macros

* Fix up send string macros

`string` arguments must not be parenthesized

* Fix up miscellaneous macros

* Make indentation uniform (4 spaces)

* Make #ifdef vs #if defined usage consistent

* Reorder standard includes

* Revert indentation changes as per review comments

* Revert #if defined(__AVR__) → #ifdef __AVR__ change

* Change 2 space indent to 4 spaces on a couple of lines

* Replace include guard with #pragma once

* alt+tab

* copy from master:silverbullet44

* adjust for pull request

* clang-format

* create info.json

* Delete new_project.sh

* Update keyboards/silverbullet44/keymaps/default/config.h

Co-Authored-By: Max Rumpf <max.rumpf1998@gmail.com>

* Update keyboards/silverbullet44/silverbullet44.c

Co-Authored-By: Max Rumpf <max.rumpf1998@gmail.com>

* Update keyboards/silverbullet44/silverbullet44.h

Co-Authored-By: Max Rumpf <max.rumpf1998@gmail.com>

* Apply suggestions from Maxr1998

* format default keymap

* Apply suggestions from Maxr1998 (qmk#2)

* Apply suggestions from fauxpark

* fix readme.md

* Apply suggestion from Maxr1998. (custom_keycode to MO(_ADJUST))

* I became a tricky! Hahaha!!

* Add original keymap made by FKML

* deleated at config.h

* Changed Copyright

* Delete
// Defines the keycodes used by our macros in process_record_user
//enum custom_keycodes {
//  QMKBEST = SAFE_RANGE,
//  QMKURL
//};

* Delete bool alt_pressed = false;

* Delete ADJUST

* Delete /

* Delete void matrix_scan_user(void) {

}

void led_set_user(uint8_t usb_led) {

}

* Change Copyright's year.

* Delete adjust

* Delete adjust

* Delete adjust

* 列挙型に変更

* Enclose  keymap with ```.

* Delete
#define _______ KC_TRNS
#define XXXXXXX KC_NO

* Fix indentation.

* Delete some rows.

* Aligned columns of ''readme.md''.

* I got god's keymap...hahaha:)

* Update keyboards/silverbullet44/readme.md

Co-Authored-By: fauxpark <fauxpark@gmail.com>

* Update keyboards/silverbullet44/rules.mk

Co-Authored-By: fauxpark <fauxpark@gmail.com>

Co-authored-by: Konstantin Đorđević <vomindoraan@gmail.com>
Co-authored-by: Max Rumpf <max.rumpf1998@gmail.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
kylekuj pushed a commit to kylekuj/qmk_firmware that referenced this pull request Apr 21, 2020
* make silverbullet44

* comment edit

* venderID

* Fix parentheses in macros, and in general clean up quantum.h (qmk#5021)

* Fix up GPIO macros

* Fix up send string macros

`string` arguments must not be parenthesized

* Fix up miscellaneous macros

* Make indentation uniform (4 spaces)

* Make #ifdef vs #if defined usage consistent

* Reorder standard includes

* Revert indentation changes as per review comments

* Revert #if defined(__AVR__) → #ifdef __AVR__ change

* Change 2 space indent to 4 spaces on a couple of lines

* Replace include guard with #pragma once

* alt+tab

* copy from master:silverbullet44

* adjust for pull request

* clang-format

* create info.json

* Delete new_project.sh

* Update keyboards/silverbullet44/keymaps/default/config.h

Co-Authored-By: Max Rumpf <max.rumpf1998@gmail.com>

* Update keyboards/silverbullet44/silverbullet44.c

Co-Authored-By: Max Rumpf <max.rumpf1998@gmail.com>

* Update keyboards/silverbullet44/silverbullet44.h

Co-Authored-By: Max Rumpf <max.rumpf1998@gmail.com>

* Apply suggestions from Maxr1998

* format default keymap

* Apply suggestions from Maxr1998 (qmk#2)

* Apply suggestions from fauxpark

* fix readme.md

* Apply suggestion from Maxr1998. (custom_keycode to MO(_ADJUST))

* I became a tricky! Hahaha!!

* Add original keymap made by FKML

* deleated at config.h

* Changed Copyright

* Delete
// Defines the keycodes used by our macros in process_record_user
//enum custom_keycodes {
//  QMKBEST = SAFE_RANGE,
//  QMKURL
//};

* Delete bool alt_pressed = false;

* Delete ADJUST

* Delete /

* Delete void matrix_scan_user(void) {

}

void led_set_user(uint8_t usb_led) {

}

* Change Copyright's year.

* Delete adjust

* Delete adjust

* Delete adjust

* 列挙型に変更

* Enclose  keymap with ```.

* Delete
#define _______ KC_TRNS
#define XXXXXXX KC_NO

* Fix indentation.

* Delete some rows.

* Aligned columns of ''readme.md''.

* I got god's keymap...hahaha:)

* Update keyboards/silverbullet44/readme.md

Co-Authored-By: fauxpark <fauxpark@gmail.com>

* Update keyboards/silverbullet44/rules.mk

Co-Authored-By: fauxpark <fauxpark@gmail.com>

Co-authored-by: Konstantin Đorđević <vomindoraan@gmail.com>
Co-authored-by: Max Rumpf <max.rumpf1998@gmail.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
jakeisnt pushed a commit to jakeisnt/qmk_firmware that referenced this pull request Aug 20, 2020
* make silverbullet44

* comment edit

* venderID

* Fix parentheses in macros, and in general clean up quantum.h (qmk#5021)

* Fix up GPIO macros

* Fix up send string macros

`string` arguments must not be parenthesized

* Fix up miscellaneous macros

* Make indentation uniform (4 spaces)

* Make #ifdef vs #if defined usage consistent

* Reorder standard includes

* Revert indentation changes as per review comments

* Revert #if defined(__AVR__) → #ifdef __AVR__ change

* Change 2 space indent to 4 spaces on a couple of lines

* Replace include guard with #pragma once

* alt+tab

* copy from master:silverbullet44

* adjust for pull request

* clang-format

* create info.json

* Delete new_project.sh

* Update keyboards/silverbullet44/keymaps/default/config.h

Co-Authored-By: Max Rumpf <max.rumpf1998@gmail.com>

* Update keyboards/silverbullet44/silverbullet44.c

Co-Authored-By: Max Rumpf <max.rumpf1998@gmail.com>

* Update keyboards/silverbullet44/silverbullet44.h

Co-Authored-By: Max Rumpf <max.rumpf1998@gmail.com>

* Apply suggestions from Maxr1998

* format default keymap

* Apply suggestions from Maxr1998 (qmk#2)

* Apply suggestions from fauxpark

* fix readme.md

* Apply suggestion from Maxr1998. (custom_keycode to MO(_ADJUST))

* I became a tricky! Hahaha!!

* Add original keymap made by FKML

* deleated at config.h

* Changed Copyright

* Delete
// Defines the keycodes used by our macros in process_record_user
//enum custom_keycodes {
//  QMKBEST = SAFE_RANGE,
//  QMKURL
//};

* Delete bool alt_pressed = false;

* Delete ADJUST

* Delete /

* Delete void matrix_scan_user(void) {

}

void led_set_user(uint8_t usb_led) {

}

* Change Copyright's year.

* Delete adjust

* Delete adjust

* Delete adjust

* 列挙型に変更

* Enclose  keymap with ```.

* Delete
#define _______ KC_TRNS
#define XXXXXXX KC_NO

* Fix indentation.

* Delete some rows.

* Aligned columns of ''readme.md''.

* I got god's keymap...hahaha:)

* Update keyboards/silverbullet44/readme.md

Co-Authored-By: fauxpark <fauxpark@gmail.com>

* Update keyboards/silverbullet44/rules.mk

Co-Authored-By: fauxpark <fauxpark@gmail.com>

Co-authored-by: Konstantin Đorđević <vomindoraan@gmail.com>
Co-authored-by: Max Rumpf <max.rumpf1998@gmail.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
BorisTestov pushed a commit to BorisTestov/qmk_firmware that referenced this pull request May 23, 2024
* Fix up GPIO macros

* Fix up send string macros

`string` arguments must not be parenthesized

* Fix up miscellaneous macros

* Make indentation uniform (4 spaces)

* Make #ifdef vs #if defined usage consistent

* Reorder standard includes

* Revert indentation changes as per review comments

* Revert #if defined(__AVR__) → #ifdef __AVR__ change

* Change 2 space indent to 4 spaces on a couple of lines

* Replace include guard with #pragma once
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.

7 participants