From a8e7f43e59f1828924c59a079a981ff5e87e19df Mon Sep 17 00:00:00 2001 From: HBBisenieks Date: Mon, 14 Mar 2022 15:47:24 -0700 Subject: [PATCH] updates to boot.py docs to bring it more in-line with docs style --- docs/boot.md | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/docs/boot.md b/docs/boot.md index 053616c..cc90687 100644 --- a/docs/boot.md +++ b/docs/boot.md @@ -1,25 +1,34 @@ -## There is a more detailed explanation in the [circuit python docs](https://docs.circuitpython.org/en/latest/README.html), however there are some common use cases for your keyboard listed here +# boot.py +`boot.py` lives in the root of your keyboard when mounted as a storage device. +There is a more detailed explanation in the [circuit python docs](https://docs.circuitpython.org/en/latest/README.html), +however there are some common use cases for your keyboard listed here. -### You can hide your device from showing up as a usb storage +## Hiding device storage +You can hide your device from showing up as a usb storage by default (this can be overridden +at startup if desired, per the example code further down this page). ```python storage.disable_usb_drive() ``` -### Make your keyboard work in bios +## Using your keyboard before the OS loads +You can make your keyboard work in your computer's BIOS and bootloader (useful if you dual-boot). ```python usb_hid.enable(boot_device=1) ``` -### Disable serial comms +## Disabling serial communication +By default, you can connect to your board's serial console, which can be useful for debugging, +but may not be desired for everyday use. ```python # Equivalent to usb_cdc.enable(console=False, data=False) usb_cdc.disable() ``` -### A fully working example, which disables usb storage, cdc and enables bios mode +## Example code +Below is a fully working example, which disables usb storage, cdc and enables BIOS mode. ```python import supervisor