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

Update info.json and pantun.h #2

Open
wants to merge 72 commits into
base: kibot-ibnu
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
ae2c77c
[Bug] fix v-usb connection enumeration, ifdef workaround (#16511)
gompa Mar 3, 2022
4a66bdf
Fix helix/rev2 not working properly when using split_common. (#16512)
mtei Mar 3, 2022
7fb312c
Fix use of ISSI driver config before init (#16493)
zvecr Mar 3, 2022
e01307f
Typo in squeezing_avr.md (#16506)
Jels02 Mar 3, 2022
61ba8ef
Update pr_checklist.md (#16484)
Jels02 Mar 4, 2022
aab2ac2
Melody96 refactor (#16455)
fauxpark Mar 4, 2022
d412854
analog.[ch]: remove unnecessary includes (#16471)
fauxpark Mar 4, 2022
34ba7f1
Bug report template: require `qmk doctor` output (#16517)
fauxpark Mar 4, 2022
c018511
More validation of declared LAYOUT macro names (#16520)
zvecr Mar 4, 2022
0be7345
[Keyboard] BDE Rev2 (#15877)
kylemccreery Mar 4, 2022
82dd84e
support more leds (#15840)
yulei Mar 5, 2022
da6d6ce
Some docs improvements (#15845)
kiilerix Mar 5, 2022
b202e59
Update info.json (#16540)
zvecr Mar 5, 2022
8e9d45d
`qmk info`: nicer rendering of ISO enter (#16466)
fauxpark Mar 5, 2022
16cd1d9
Change helix:five_rows keymap to use QMK standerd oled driver (#16539)
mtei Mar 6, 2022
30209de
merge/uma - Resolve configurator issues (#16551)
zvecr Mar 6, 2022
4cae7be
[Keymap] Change helix:fraanrosi keymap to use split_common (#16533)
mtei Mar 7, 2022
9d6cea0
[Keymap] Change helix:five_rows_jis keymap to use split_common (#16538)
mtei Mar 7, 2022
b77d51f
[Keyboard] add support for Quark_Plus (#16324)
npspears Mar 7, 2022
de10757
[Keyboard] fourier via keymap (#16335)
FreshCourageTake Mar 7, 2022
5de86a0
[Keyboard] Add Lain keyboard (#16345)
hsgw Mar 7, 2022
dcfa471
[Keyboard] Add Kyuu Hotswap (#16360)
mrnoisytiger Mar 7, 2022
0e08fad
[Keyboard] Add support for Typ65+ (#16399)
kopibeng Mar 7, 2022
d8971d7
Format code according to conventions (#16554)
qmk-bot Mar 7, 2022
ff6c704
[Keymap] Drashna Mouse keys and oled updates (#16556)
drashna Mar 7, 2022
0978dca
[Keyboard] add qk65 files by qwertykeys studio (#16491)
owlab-git Mar 7, 2022
1a1b22e
[Keyboard] Sick68 VIA keymap (#16508)
xia0 Mar 7, 2022
bbd47fc
[Keyboard] Atlantis ak81_ve encoder behaviour enhancement & fixes (#1…
fOmey Mar 7, 2022
2d8266b
[Keyboard] Tidy Up pearlboards (#16497)
Koobaczech Mar 7, 2022
b262174
[Keyboard] Delete duplicate pandora directory (#16496)
Koobaczech Mar 7, 2022
9dea8a7
[Keyboard] Update Jels88 (#16486)
Jels02 Mar 7, 2022
6e61126
[Keyboard] BM68HSRGB/rev2 (#16454)
peepeetee Mar 7, 2022
41fb912
[Keyboard] Update DogTag Macro Pad (#16446)
takashicompany Mar 7, 2022
4b4f1c6
[Keymap] Add encoder showcase keymap (#16544)
wymcg Mar 7, 2022
d953aa7
new lines at eof's (#16558)
waffle87 Mar 7, 2022
2ff646c
[Keyboard] LFK78 VIA support and Update (#16502)
nayoshi Mar 7, 2022
893d86c
Add Anne Pro 2 keyboard (#14385)
bwisn Mar 8, 2022
5995432
[Keymap] add mouse controls to Mechwilds Mercutio FearlessSpiff (#16…
FearlessSpiff Mar 8, 2022
6928bce
[Keyboard] Add Cassini keyboard (#16522)
yiancar Mar 8, 2022
8bcac1c
[Keyboard] Add Morizon (#16549)
skarrmann Mar 8, 2022
f0d27e2
[Keyboard] Change vendor ID for sick68 keyboard (#16563)
umbynos Mar 8, 2022
c84d361
[Keyboard] Change maximum LED brightness for naked48 (#16564)
Salicylic-acid3 Mar 8, 2022
8e88879
[Keymap] Add nabos keymap to dactyl_manuform (5x6) (#16547)
nab-os Mar 8, 2022
8014fb1
Fix in-page links in reference_info_json.md (#16487)
peepeetee Mar 8, 2022
869ede8
[Keyboard] Add parallel 65 (#16445)
matthewdias Mar 8, 2022
b2fdb07
[Keyboard] Uthol (#16393)
Uthol Mar 8, 2022
ec3df85
[Keyboard] TKC Portico68 v2 (#15916)
TerryMathews Mar 8, 2022
86966fc
[Keyboard] Add KB58 (#15896)
beanaccle Mar 8, 2022
249bc3a
[Keyboard] Add Winry315 keyboard (#15894)
sigprof Mar 8, 2022
eb35f58
[Keyboard] Idobao ID87 v2 (#15875)
peepeetee Mar 8, 2022
87c2f97
[Keyboard] Add LATE-9 keyboard (#13966)
rookiebwoy Mar 8, 2022
8f70adc
[Keyboard] Update encoder code for macro3 (#16005)
filterpaper Mar 8, 2022
0880850
[Bug] Rename has_mouse_report_changed parameters (#16417)
ziteh Mar 8, 2022
4493f31
Add HS version of Nebula65b due to different number of per-key-RGB (#…
yiancar Mar 8, 2022
996880a
[Keyboard] Add rb69 (#16526)
ryanbaekr Mar 8, 2022
4d2ae22
[Keyboard] Add mini winni (#15341)
matthewdias Mar 8, 2022
4035369
[Keyboard] Add Iskar (#16562)
drewpyun Mar 8, 2022
89a5159
Oddball: set default pointing device driver (#16574)
fauxpark Mar 8, 2022
fe8b761
[Keyboard] Fix late9/rev1 (#16576)
waffle87 Mar 8, 2022
d92994b
[Keyboard] Add Novus 60% keyboard (#16473)
mini-ninja-64 Mar 8, 2022
40d6766
[Keyboard] Add Y&R Studio zhou65 keyboard (#14192)
jiaxin96 Mar 8, 2022
65eb0f9
[keymap] Add via support for Iskar (#16575)
drewpyun Mar 8, 2022
b593cfc
`qmk info`: Nicer rendering of big-ass enter (#16541)
fauxpark Mar 8, 2022
d38696a
[Keyboard] Add Rama Works M4-A (#16570)
nautxx Mar 8, 2022
3347b63
handwired/misterdeck refactor (#16572)
fauxpark Mar 8, 2022
022e1fd
Add Big Switch Seat (#16524)
nooges Mar 8, 2022
5244b13
Fix yandrstudio/zhou65 (#16589)
waffle87 Mar 9, 2022
ed169a6
Correct order of takashicompany/dogtag info.json (#16591)
zvecr Mar 9, 2022
c5c5d37
[Keymap] Added RGB_Matrix effect mode for naked48/j73gl (#16578)
Salicylic-acid3 Mar 9, 2022
6ab5a7d
[Keymap] Personal keymap for crkbd (#16546)
Jpe230 Mar 9, 2022
a93978c
Merge remote-tracking branch 'ibnuda/kibot-ibnu' into keyboard/pantun
angelbirth Mar 9, 2022
620d8f2
edit some files to comply to qmk standard
angelbirth Mar 10, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
25 changes: 12 additions & 13 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,18 @@ assignees: ''

## System Information

- Keyboard:
- Revision (if applicable):
- Operating system:
- AVR GCC version:
<!-- Run `avr-gcc --version` to find this out. -->
- ARM GCC version:
<!-- Run `arm-none-eabi-gcc --version` to find this out. -->
- QMK Firmware version:
<!-- Run `git describe --abbrev=0 --tags` to find this out. -->
- Any keyboard related software installed?
- [ ] AutoHotKey
- [ ] Karabiner
- [ ] Other:
**Keyboard:**
**Revision (if applicable):**
**Operating system:**
**`qmk doctor` output:**
```
(Paste output here)
```

**Any keyboard related software installed?**
- [ ] AutoHotKey (Windows)
- [ ] Karabiner (macOS)
- [ ] Other:

## Additional Context

Expand Down
28 changes: 27 additions & 1 deletion data/schemas/definitions.jsonschema
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,33 @@
"oneOf": [
{
"type": "string",
"enum": ["LAYOUT", "LAYOUT_planck_1x2uC"]
"enum": [
"LAYOUT",
"LAYOUT_1x2uC",
"LAYOUT_1x2uL",
"LAYOUT_1x2uR",
"LAYOUT_2x2uC",
"LAYOUT_2x3uC",
"LAYOUT_625uC",
"LAYOUT_ANSI_DEFAULT",
"LAYOUT_JP",
"LAYOUT_ortho_3x12_1x2uC",
"LAYOUT_ortho_4x12_1x2uC",
"LAYOUT_ortho_4x12_1x2uL",
"LAYOUT_ortho_4x12_1x2uR",
"LAYOUT_ortho_5x12_1x2uC",
"LAYOUT_ortho_5x12_2x2uC",
"LAYOUT_ortho_5x14_1x2uC",
"LAYOUT_ortho_5x14_1x2uL",
"LAYOUT_ortho_5x14_1x2uR",
"LAYOUT_planck_1x2uC",
"LAYOUT_planck_1x2uL",
"LAYOUT_planck_1x2uR",
"LAYOUT_preonic_1x2uC",
"LAYOUT_preonic_1x2uL",
"LAYOUT_preonic_1x2uR",
"LAYOUT_reviung34_2uL"
]
},
{
"type": "string",
Expand Down
1 change: 1 addition & 0 deletions data/schemas/keyboard.jsonschema
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@
},
"layouts": {
"type": "object",
"propertyNames": {"$ref": "qmk.definitions.v1#/layout_macro"},
"additionalProperties": {
"type": "object",
"additionalProperties": false,
Expand Down
4 changes: 2 additions & 2 deletions data/templates/keyboard/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
"device_version": "1.0.0"
},
"features": {
"bootmagic_lite": true,
"bootmagic": true,
"command": false,
"console": false,
"extrakey": true,
"mousekey": true,
"nkro": true
}
}
}
4 changes: 2 additions & 2 deletions docs/cli_development.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,15 +188,15 @@ cli.log.info('Reading from %s and writing to %s', cli.args.filename, cli.args.ou

# Testing, and Linting, and Formatting (oh my!)

We use nose2, flake8, and yapf to test, lint, and format code. You can use the `pytest` and `format-py` subcommands to run these tests:
We use nose2, flake8, and yapf to test, lint, and format code. You can use the `pytest` and `format-python` subcommands to run these tests:

### Testing and Linting

qmk pytest

### Formatting

qmk format-py
qmk format-python

## Formatting Details

Expand Down
6 changes: 3 additions & 3 deletions docs/feature_pointing_device.md
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ The following configuration options are only available when using `SPLIT_POINTIN
| `pointing_device_get_report(void)` | Returns the current mouse report (as a `mouse_report_t` data structure). |
| `pointing_device_set_report(mouse_report)` | Sets the mouse report to the assigned `mouse_report_t` data structured passed to the function. |
| `pointing_device_send(void)` | Sends the current mouse report to the host system. Function can be replaced. |
| `has_mouse_report_changed(old, new)` | Compares the old and new `mouse_report_t` data and returns true only if it has changed. |
| `has_mouse_report_changed(new_report, old_report)` | Compares the old and new `mouse_report_t` data and returns true only if it has changed. |
| `pointing_device_adjust_by_defines(mouse_report)` | Applies rotations and invert configurations to a raw mouse report. |


Expand Down Expand Up @@ -276,14 +276,14 @@ The report_mouse_t (here "mouseReport") has the following properties:
To manually manipulate the mouse reports outside of the `pointing_device_task_*` functions, you can use:

* `pointing_device_get_report()` - Returns the current report_mouse_t that represents the information sent to the host computer
* `pointing_device_set_report(report_mouse_t newMouseReport)` - Overrides and saves the report_mouse_t to be sent to the host computer
* `pointing_device_set_report(report_mouse_t mouse_report)` - Overrides and saves the report_mouse_t to be sent to the host computer
* `pointing_device_send()` - Sends the mouse report to the host and zeroes out the report.

When the mouse report is sent, the x, y, v, and h values are set to 0 (this is done in `pointing_device_send()`, which can be overridden to avoid this behavior). This way, button states persist, but movement will only occur once. For further customization, both `pointing_device_init` and `pointing_device_task` can be overridden.

Additionally, by default, `pointing_device_send()` will only send a report when the report has actually changed. This prevents it from continuously sending mouse reports, which will keep the host system awake. This behavior can be changed by creating your own `pointing_device_send()` function.

Also, you use the `has_mouse_report_changed(new, old)` function to check to see if the report has changed.
Also, you use the `has_mouse_report_changed(new_report, old_report)` function to check to see if the report has changed.

## Examples

Expand Down
4 changes: 2 additions & 2 deletions docs/ja/cli_commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -275,14 +275,14 @@ $ qmk kle2json -f kle.txt -f
Ψ Wrote out to info.json
```

## `qmk format-py`
## `qmk format-python`

このコマンドは `qmk_firmware` 内の python コードを整形します。

**使用法**:

```
qmk format-py
qmk format-python
```

## `qmk pytest`
Expand Down
4 changes: 2 additions & 2 deletions docs/ja/cli_development.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,15 +192,15 @@ cli.log.info('Reading from %s and writing to %s', cli.args.filename, cli.args.ou

# テスト、リントおよびフォーマット

nose2、flake8 および yapf を使ってコードをテスト、リントおよびフォーマットします。これらのテストを実行するために `pytest` と `format-py` サブコマンドを使うことができます。
nose2、flake8 および yapf を使ってコードをテスト、リントおよびフォーマットします。これらのテストを実行するために `pytest` と `format-python` サブコマンドを使うことができます。

### テストとリント

qmk pytest

### フォーマット

qmk format-py
qmk format-python

## フォーマットの詳細

Expand Down
4 changes: 2 additions & 2 deletions docs/ja/feature_pointing_device.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ POINTING_DEVICE_ENABLE = yes
マウスレポートを操作するために、以下の関数を使うことができます:

* `pointing_device_get_report()` - ホストコンピュータに送信された情報を表す現在の report_mouse_t を返します。
* `pointing_device_set_report(report_mouse_t newMouseReport)` - ホストコンピュータに送信される report_mouse_t を上書き保存します。
* `pointing_device_set_report(report_mouse_t mouse_report)` - ホストコンピュータに送信される report_mouse_t を上書き保存します。

report_mouse_t (ここでは "mouseReport") が以下のプロパティを持つことを覚えておいてください:

Expand All @@ -34,7 +34,7 @@ report_mouse_t (ここでは "mouseReport") が以下のプロパティを持つ

さらに、デフォルトでは、`pointing_device_send()` はレポートが実際に変更された場合のみレポートを送信します。これにより、マウスレポートが継続的に送信されてホストシステムが起動されたままになることを防ぎます。この動作は、独自の `pointing_device_send()` 関数を作成することで変更できます。

また、`has_mouse_report_changed(new, old)` 関数を使って、レポートが変更されたかどうかを確認できます。(訳注:独自の `pointing_device_send()` 関数を作成する場合でも、その中で `has_mouse_report_changed(new, old)` 関数でチェックして、デフォルトの `pointing_device_send()` と類似の無駄なレポートの抑制をして、ホストシステムがスリープ状態に入れる余地を残すようにしておくのが良いでしょう。)
また、`has_mouse_report_changed(new_report, old_report)` 関数を使って、レポートが変更されたかどうかを確認できます。(訳注:独自の `pointing_device_send()` 関数を作成する場合でも、その中で `has_mouse_report_changed(new_report, old_report)` 関数でチェックして、デフォルトの `pointing_device_send()` と類似の無駄なレポートの抑制をして、ホストシステムがスリープ状態に入れる余地を残すようにしておくのが良いでしょう。)

以下の例では、カスタムキーを使ってマウスをクリックし垂直および水平方向に127単位スクロールし、リリースされた時にそれを全て元に戻します - なぜならこれは完全に便利な機能だからです。いいですか、以下はひとつの例です:

Expand Down
6 changes: 4 additions & 2 deletions docs/keymap.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ The main part of this file is the `keymaps[]` definition. This is where you list

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {

After this you'll find a list of LAYOUT() macros. A LAYOUT() is simply a list of keys to define a single layer. Typically you'll have one or more "base layers" (such as QWERTY, Dvorak, or Colemak) and then you'll layer on top of that one or more "function" layers. Due to the way layers are processed you can't overlay a "lower" layer on top of a "higher" layer.
After this you'll find the layer definitions. Typically you'll have one or more "base layers" (such as QWERTY, Dvorak, or Colemak) and then you'll layer on top of that one or more "function" layers. Due to the way layers are processed you can't overlay a "lower" layer on top of a "higher" layer.

`keymaps[][MATRIX_ROWS][MATRIX_COLS]` in QMK holds the 16 bit action code (sometimes referred as the quantum keycode) in it. For the keycode representing typical keys, its high byte is 0 and its low byte is the USB HID usage ID for keyboard.

Expand All @@ -153,7 +153,9 @@ Here is an example of the Clueboard's base layer:

Some interesting things to note about this:

* From a C source point of view it's only a single array, but we have embedded whitespace to more easily visualize where each key is on the physical device.
* The layer is defined using the LAYOUT macro, traditionally defined in the keyboard's `.h` file.
* The LAYOUT macro takes a single list of keycodes, but we have written it in the C source using embedded whitespace and newlines to visualize where each key is on the physical device.
* The LAYOUT macro hides and handles the mapping to the hardware's key scan matrix.
* Plain keyboard scancodes are prefixed with KC_, while "special" keys are not.
* The upper left key activates custom function 0 (`F(0)`)
* The "Fn" key is defined with `MO(_FL)`, which moves to the `_FL` layer while that key is being held down.
Expand Down
2 changes: 1 addition & 1 deletion docs/pr_checklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ https://github.com/qmk/qmk_firmware/pulls?q=is%3Apr+is%3Aclosed+label%3Akeyboard
- valid maintainer
- displays correctly in Configurator (press Ctrl+Shift+I to preview local file, turn on fast input to verify ordering)
- `readme.md`
- standard template should be present -- [link to template](https://github.com/qmk/qmk_firmware/blob/master/data/templates/avr/readme.md)
- standard template should be present -- [link to template](https://github.com/qmk/qmk_firmware/blob/master/data/templates/keyboard/readme.md)
- flash command is present, and has `:flash` at end
- valid hardware availability link (unless handwired) -- private groupbuys are okay, but one-off prototypes will be questioned. If open-source, a link to files should be provided.
- clear instructions on how to reset the board into bootloader mode
Expand Down
6 changes: 3 additions & 3 deletions docs/reference_info_json.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ The `info.json` file is a JSON formatted dictionary with the following keys avai
* `layout_aliases`
* A dictionary containing layout aliases. The key is the alias and the value is a layout in `layouts` it maps to.
* `layouts`
* Physical Layout representations. See the [Layout Format](#layout_format) section for more detail.
* Physical Layout representations. See the [Layout Format](#layout-format) section for more detail.
* `matrix_pins`
* Configure the pins corresponding to columns and rows, or direct pins. See the [Matrix Pins](#matrix_pins) section for more detail.
* Configure the pins corresponding to columns and rows, or direct pins. See the [Matrix Pins](#matrix-pins) section for more detail.
* `rgblight`
* Configure the [RGB Lighting feature](feature_rgblight.md). See the [RGB Lighting](#rgb_lighting) section for more detail.
* Configure the [RGB Lighting feature](feature_rgblight.md). See the [RGB Lighting](#rgb-lighting) section for more detail.
* `usb`
* Configure USB VID, PID, and other parameters. See the [USB](#USB) section for more detail.

Expand Down
2 changes: 1 addition & 1 deletion docs/squeezing_avr.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Largest in size is "magic" -- the QMK magic keycodes -- which control things lik

If you've done all of that, and you don't want to disable features like RGB, Audio, OLEDs, etc, there are some additional options that you can add to your config.h that can help.

Starting with Lock Key support. If you have an Cherry MX Lock switch (lucky you!), you don't want to do this. But chances are, you don't. In that case, add this to your `config.h`:
Starting with Lock Key support. If you have a Cherry MX Lock switch (lucky you!), you don't want to do this. But chances are, you don't. In that case, add this to your `config.h`:
```c
#undef LOCKING_SUPPORT_ENABLE
#undef LOCKING_RESYNC_ENABLE
Expand Down
15 changes: 5 additions & 10 deletions docs/understanding_qmk.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,22 @@ This document attempts to explain how the QMK firmware works from a very high le

## Startup

You can think of QMK as no different from any other computer program. It is started, performs its tasks, and then ends. The entry point for the program is the `main()` function, just like it is on any other C program. However, for a newcomer to QMK it can be confusing because the `main()` function appears in multiple places, and it can be hard to tell which one to look at.
You can think of QMK as no different from any other computer program. It is started and performs its tasks, but this program never finishes. Like other C programs, the entry point is the `main()` function. For QMK, the `main()` function is found in [`quantum/main.c`](https://github.com/qmk/qmk_firmware/blob/0.15.13/quantum/main.c#L55).

The reason for this is the different platforms that QMK supports. The most common platform is `lufa`, which runs on AVR processors such at the atmega32u4. We also support `chibios` and `vusb`.
If you browse through the `main()` function you'll find that it starts by initializing any hardware that has been configured (including USB to the host). The most common platform for QMK is `lufa`, which runs on AVR processors such as the atmega32u4. When compiled for that platform, it will invoke for example `platform_setup()` in [`platforms/avr/platform.c`](https://github.com/qmk/qmk_firmware/blob/0.15.13/platforms/avr/platform.c#L19) and `protocol_setup()` in [`tmk_core/protocol/lufa/lufa.c`](https://github.com/qmk/qmk_firmware/blob/0.15.13/tmk_core/protocol/lufa/lufa.c#L1066). It will use other implementations when compiled for other platforms like `chibios` and `vusb`. At first glance, it can look like a lot of functionality but most of the time the code will be disabled by `#define`s.

We'll focus on AVR processors for the moment, which use the `lufa` platform. You can find the `main()` function in [tmk_core/protocol/lufa/lufa.c](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/tmk_core/protocol/lufa/lufa.c#L1028). If you browse through that function you'll find that it initializes any hardware that has been configured (including USB to the host) and then it starts the core part of the program with a [`while(1)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/tmk_core/protocol/lufa/lufa.c#L1069). This is [The Main Loop](#the-main-loop).
The `main()` function will then start the core part of the program with a [`while (true)`](https://github.com/qmk/qmk_firmware/blob/0.15.13/quantum/main.c#L63). This is [The Main Loop](#the-main-loop).

## The Main Loop

This section of code is called "The Main Loop" because it's responsible for looping over the same set of instructions forever. This is where QMK dispatches out to the functions responsible for making the keyboard do everything it is supposed to do. At first glance it can look like a lot of functionality but most of the time the code will be disabled by `#define`'s.
This section of code is called "The Main Loop" because it's responsible for looping over the same set of instructions forever, without ever reaching the end. This is where QMK dispatches out to the functions responsible for making the keyboard do everything it is supposed to do.

```
keyboard_task();
```

This is where all the keyboard specific functionality is dispatched. The source code for `keyboard_task()` can be found in [tmk_core/common/keyboard.c](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/tmk_core/common/keyboard.c#L216), and it is responsible for detecting changes in the matrix and turning status LEDs on and off.
The main loop will call [`protocol_task()`](https://github.com/qmk/qmk_firmware/blob/0.15.13/quantum/main.c#L38), which in turn will call `keyboard_task()` in [`quantum/keyboard.c`](https://github.com/qmk/qmk_firmware/blob/0.15.13/quantum/keyboard.c#L377). This is where all the keyboard specific functionality is dispatched, and it is responsible for detecting changes in the matrix and turning status LEDs on and off.

Within `keyboard_task()` you'll find code to handle:

* [Matrix Scanning](#matrix-scanning)
* Mouse Handling
* Serial Link(s)
* Keyboard status LEDs (Caps Lock, Num Lock, Scroll Lock)

#### Matrix Scanning
Expand Down
2 changes: 2 additions & 0 deletions drivers/sensors/analog_joystick.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
#include "analog.h"
#include "gpio.h"
#include "wait.h"
#include "timer.h"
#include <stdlib.h>

// Set Parameters
uint16_t minAxisValue = ANALOG_JOYSTICK_AXIS_MIN;
Expand Down
Loading