add docusaurus, convert notes/tips, ids

This commit is contained in:
Jack Humbert
2023-04-18 12:35:09 -04:00
parent e0a09ff728
commit 2cef3465e8
180 changed files with 15192 additions and 785 deletions
+3 -3
View File
@@ -1,8 +1,8 @@
# GPIO Control :id=gpio-control
# GPIO Control {#gpio-control}
QMK has a GPIO control abstraction layer which is microcontroller agnostic. This is done to allow easy access to pin control across different platforms.
## Functions :id=functions
## Functions {#functions}
The following functions provide basic control of GPIOs and are found in `platforms/<platform>/gpio.h`.
@@ -20,7 +20,7 @@ The following functions provide basic control of GPIOs and are found in `platfor
| `readPin(pin)` | Returns the level of the pin | `_SFR_IO8(pin >> 4) & _BV(pin & 0xF)` | `palReadLine(pin)` |
| `togglePin(pin)` | Invert pin level, assuming it is an output | `PORTB ^= (1<<2)` | `palToggleLine(pin)` |
## Advanced Settings :id=advanced-settings
## Advanced Settings {#advanced-settings}
Each microcontroller can have multiple advanced settings regarding its GPIO. This abstraction layer does not limit the use of architecture-specific functions. Advanced users should consult the datasheet of their desired device and include any needed libraries. For AVR, the standard avr/io.h library is used; for STM32, the ChibiOS [PAL library](https://chibios.sourceforge.net/docs3/hal/group___p_a_l.html) is used.