Browse Source

Overhaul source layout to facilitate MUXes being added

master
KemoNine 1 month ago
parent
commit
b0aaece493
79 changed files with 100 additions and 171 deletions
  1. +0
    -5
      .gitignore
  2. +0
    -6
      .vscode/arduino.json
  3. +1
    -0
      .vscode/c_cpp_properties.json
  4. +0
    -15
      .vscode/settings.json
  5. +2
    -48
      README.md
  6. +12
    -0
      hardware/README.md
  7. +5
    -0
      hardware/_controller/.gitignore
  8. +38
    -0
      hardware/_controller/README.md
  9. +2
    -2
      hardware/_controller/_controller.ino
  10. +0
    -0
      hardware/_controller/_controller.prj
  11. +1
    -1
      hardware/_controller/_controller_GSLC.h
  12. +1
    -1
      hardware/_controller/build.ps1
  13. +0
    -0
      hardware/_controller/make.ps1
  14. +0
    -0
      hardware/_controller/src/guislice/GUIslice.c
  15. +0
    -0
      hardware/_controller/src/guislice/GUIslice.h
  16. +0
    -0
      hardware/_controller/src/guislice/GUIslice_config.h
  17. +0
    -0
      hardware/_controller/src/guislice/GUIslice_config_ard.h
  18. +0
    -0
      hardware/_controller/src/guislice/GUIslice_config_linux.h
  19. +0
    -0
      hardware/_controller/src/guislice/GUIslice_drv.h
  20. +0
    -0
      hardware/_controller/src/guislice/GUIslice_drv_adagfx.cpp
  21. +0
    -0
      hardware/_controller/src/guislice/GUIslice_drv_adagfx.h
  22. +0
    -0
      hardware/_controller/src/guislice/GUIslice_drv_m5stack.cpp
  23. +0
    -0
      hardware/_controller/src/guislice/GUIslice_drv_m5stack.h
  24. +0
    -0
      hardware/_controller/src/guislice/GUIslice_drv_sdl.c
  25. +0
    -0
      hardware/_controller/src/guislice/GUIslice_drv_sdl.h
  26. +0
    -0
      hardware/_controller/src/guislice/GUIslice_drv_tft_espi.cpp
  27. +0
    -0
      hardware/_controller/src/guislice/GUIslice_drv_tft_espi.h
  28. +0
    -0
      hardware/_controller/src/guislice/GUIslice_drv_utft.cpp
  29. +0
    -0
      hardware/_controller/src/guislice/GUIslice_drv_utft.h
  30. +0
    -0
      hardware/_controller/src/guislice/GUIslice_ex.h
  31. +0
    -0
      hardware/_controller/src/guislice/GUIslice_th.cpp
  32. +0
    -0
      hardware/_controller/src/guislice/GUIslice_th.h
  33. +0
    -0
      hardware/_controller/src/guislice/GUIslice_th_XPT2046.h
  34. +0
    -0
      hardware/_controller/src/guislice/GUIslice_version.h
  35. +0
    -0
      hardware/_controller/src/guislice/NotoMono12pt7b.h
  36. +0
    -0
      hardware/_controller/src/guislice/NotoMono8pt7b.h
  37. +0
    -0
      hardware/_controller/src/guislice/XCheckbox.c
  38. +0
    -0
      hardware/_controller/src/guislice/XCheckbox.h
  39. +0
    -0
      hardware/_controller/src/guislice/XGauge.c
  40. +0
    -0
      hardware/_controller/src/guislice/XGauge.h
  41. +0
    -0
      hardware/_controller/src/guislice/XGlowball.c
  42. +0
    -0
      hardware/_controller/src/guislice/XGlowball.h
  43. +0
    -0
      hardware/_controller/src/guislice/XGraph.c
  44. +0
    -0
      hardware/_controller/src/guislice/XGraph.h
  45. +0
    -0
      hardware/_controller/src/guislice/XKeyPad.c
  46. +0
    -0
      hardware/_controller/src/guislice/XKeyPad.h
  47. +0
    -0
      hardware/_controller/src/guislice/XKeyPad_Alpha.c
  48. +0
    -0
      hardware/_controller/src/guislice/XKeyPad_Alpha.h
  49. +0
    -0
      hardware/_controller/src/guislice/XKeyPad_Num.c
  50. +0
    -0
      hardware/_controller/src/guislice/XKeyPad_Num.h
  51. +0
    -0
      hardware/_controller/src/guislice/XListbox.c
  52. +0
    -0
      hardware/_controller/src/guislice/XListbox.h
  53. +0
    -0
      hardware/_controller/src/guislice/XProgress.c
  54. +0
    -0
      hardware/_controller/src/guislice/XProgress.h
  55. +0
    -0
      hardware/_controller/src/guislice/XRadial.c
  56. +0
    -0
      hardware/_controller/src/guislice/XRadial.h
  57. +0
    -0
      hardware/_controller/src/guislice/XRamp.c
  58. +0
    -0
      hardware/_controller/src/guislice/XRamp.h
  59. +0
    -0
      hardware/_controller/src/guislice/XRingGauge.c
  60. +0
    -0
      hardware/_controller/src/guislice/XRingGauge.h
  61. +0
    -0
      hardware/_controller/src/guislice/XSeekbar.c
  62. +0
    -0
      hardware/_controller/src/guislice/XSeekbar.h
  63. +0
    -0
      hardware/_controller/src/guislice/XSelNum.c
  64. +0
    -0
      hardware/_controller/src/guislice/XSelNum.h
  65. +0
    -0
      hardware/_controller/src/guislice/XSlider.c
  66. +0
    -0
      hardware/_controller/src/guislice/XSlider.h
  67. +0
    -0
      hardware/_controller/src/guislice/XSpinner.c
  68. +0
    -0
      hardware/_controller/src/guislice/XSpinner.h
  69. +0
    -0
      hardware/_controller/src/guislice/XTemplate.c
  70. +0
    -0
      hardware/_controller/src/guislice/XTemplate.h
  71. +0
    -0
      hardware/_controller/src/guislice/XTextbox.c
  72. +0
    -0
      hardware/_controller/src/guislice/XTextbox.h
  73. +0
    -0
      hardware/_controller/src/guislice/XTogglebtn.c
  74. +0
    -0
      hardware/_controller/src/guislice/XTogglebtn.h
  75. +0
    -0
      hardware/_controller/src/guislice/ard-adagfx-ili9341-notouch.h
  76. +0
    -0
      hardware/_controller/src/guislice/ard-adagfx-ili9341-stmpe610.h
  77. +0
    -0
      hardware/_controller/upload.ps1
  78. +38
    -0
      hardware/mux_rpi/README.md
  79. +0
    -93
      notes.md

+ 0
- 5
.gitignore View File

@ -1,5 +0,0 @@
build/
serial_debugger*.bak
gui_backup/
serial_debugger.ino.beta
serial_debugger.ino.orig

+ 0
- 6
.vscode/arduino.json View File

@ -1,6 +0,0 @@
{
"board": "adafruit:nrf52:feather52840",
"configuration": "softdevice=s140v6,debug=l0",
"sketch": "serial_debugger.ino",
"port": "COM4"
}

+ 1
- 0
.vscode/c_cpp_properties.json View File

@ -6,6 +6,7 @@
"C:\\Users\\mcros\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\**",
"C:\\Users\\mcros\\AppData\\Local\\Arduino15\\packages\\adafruit\\tools\\**",
"C:\\Users\\mcros\\AppData\\Local\\Arduino15\\packages\\adafruit\\hardware\\nrf52\\0.21.0\\**",
"C:\\Users\\mcros\\AppData\\Local\\Arduino15\\packages\\adafruit\\hardware\\samd\\1.6.1\\**",
"C:\\Program Files (x86)\\Arduino\\libraries\\**",
"C:\\Program Files (x86)\\Arduino\\hardware\\**",
"C:\\Users\\mcros\\OneDrive\\Documents\\Arduino\\libraries\\**",

+ 0
- 15
.vscode/settings.json View File

@ -1,15 +0,0 @@
{
"files.associations": {
"xtemplate.h": "c",
"guislice_drv.h": "c",
"xradial.h": "c",
"*.tpp": "cpp",
"array": "cpp",
"deque": "cpp",
"string": "cpp",
"unordered_map": "cpp",
"vector": "cpp",
"string_view": "cpp",
"initializer_list": "cpp"
}
}

+ 2
- 48
README.md View File

@ -1,54 +1,8 @@
# Serial Debugger
A debug console for serial TTL. This can be used to work with serial TTL directly or operate as a pass through for a computer.
This project is a set of hardware builds that allow working with serial devices in an 'easy' way. The goal is to build a configurator that works with a series of modules (Muxers) to provide serial access via USB.
## Hardware / BoM
| Item | Quantity | Unit Cost |
| ---- | -------- | --------- |
| [Keyboard FeatherWing (Keyboard + LCD)](https://www.tindie.com/products/arturo182/keyboard-featherwing-qwerty-keyboard-26-lcd/) | 1 | $55.00 |
| [Feather nRF52840 Express](https://www.adafruit.com/product/4062) | 1 | $24.95 |
| [Feather M0 Basic Proto](https://www.adafruit.com/product/2772) | 1 | $19.95 |
| [FeatherWing Proto](https://www.adafruit.com/product/2884) | 1 | $4.95 |
| [2x20 pin IDC Box Header](https://www.adafruit.com/product/1993) | 1 | $0.75 |
| [GPIO Ribbon Cable for Raspberry Pi](https://www.adafruit.com/product/1988) | 1 | $2.95 |
| [Header Kit for Feather](https://www.adafruit.com/product/2886) | 1 | $0.96 |
| [I2C Non-Volatile FRAM Breakout](https://www.adafruit.com/product/1895) | 2 | $9.95 |
## Hardware Docs
- [https://www.solder.party/docs/keyboard-featherwing/downloads/](https://www.solder.party/docs/keyboard-featherwing/downloads/)
- [https://github.com/arturo182/bbq10kbd_i2c_sw](https://github.com/arturo182/bbq10kbd_i2c_sw)
- [https://github.com/lvgl/lv_arduino](https://github.com/lvgl/lv_arduino)
## Implementation (Incomplete)
- Main board has FRAM break out for configuration persistence
- Converter board has FRAM break out for configuration persistence
- Setup 2nd feather + proto board as a 40 pin socket
- 2nd feather acts as a mux between different rpi uarts (0 and 1 and 5 in particular)
- 2nd feather talks via qwiic connector over i2c to main board
- User button on feather to flip between usb and local serial (aka : can be used as a serial adapter)
- Note this on the UI
- Fall back to internal uart pins if no expander is present
- Note this on the UI
- Adapter board falls back to saved config *and* goes into stand alone via usb port *if* it's not seeing the main board
- Main board startup shows connection setup + waits for OK prompt via main hat switch
- Main board has a status bar @ bottom with battery level, selected uart, selected speed
- Main board does simple display of serial in/out via lcd
- Main board has a button for accessing symbols via pop-up list that aren't on keyboard
- Main board has a button for accessing a uart selection pop-up that maps to rpi uarts
- Main board has a button for accessing password selection pop-up to help with password entry over serial
- Main board has a button for accessing uart speed pop-up to help with configuring line speeds
## Implementation (Complete)
- Battery level on feather neopixel (green = >80% ; yellow >=40% ; orange >= 25% ; red < 25%)
- User LED (red) always on when feather is running
## Building / Uploading
The ```make.ps1```, ```build.ps1``` and ```upload.ps1``` scripts can be used to build/upload this project. These scripts call the ```arduino-cli``` commands programatically.
Please see the ```hardware``` directory for a break down of how to build the various components of this project.
## Licensing

+ 12
- 0
hardware/README.md View File

@ -0,0 +1,12 @@
# Hardware
This folder contains all of the different hardware (Arduino) builds that are part of this project.
Please see the below table for what hardware is currently available and its status.
## Hardware Status
| Device | Folder | Status |
| ------ | ------ | ------ |
| Main Controller | ```_controller``` | In Progress / Alpha |
| Raspberry Pi Muxer | ```mux_rpi``` | Early development / Pre Alpha |

+ 5
- 0
hardware/_controller/.gitignore View File

@ -0,0 +1,5 @@
build/
_controller*.bak
gui_backup/
_controller.ino.beta
_controller.ino.orig

+ 38
- 0
hardware/_controller/README.md View File

@ -0,0 +1,38 @@
# Controller
A debug console and configuration shield for serial TTL muxers. See the ```muxers``` folder for what connects to this shield.
## Hardware / BoM
| Item | Quantity | Unit Cost |
| ---- | -------- | --------- |
| [Keyboard FeatherWing (Keyboard + LCD)](https://www.tindie.com/products/arturo182/keyboard-featherwing-qwerty-keyboard-26-lcd/) | 1 | $55.00 |
| [Feather nRF52840 Express](https://www.adafruit.com/product/4062) | 1 | $24.95 |
## Hardware Docs
- [https://www.solder.party/docs/keyboard-featherwing/downloads/](https://www.solder.party/docs/keyboard-featherwing/downloads/)
- [https://github.com/arturo182/bbq10kbd_i2c_sw](https://github.com/arturo182/bbq10kbd_i2c_sw)
- [https://github.com/lvgl/lv_arduino](https://github.com/lvgl/lv_arduino)
## Implementation (Incomplete)
- Startup shows connection setup + waits for OK prompt via main hat switch
- Status bar @ top with selected uart, selected speed
- Simple display of serial in/out via lcd
- Button for accessing symbols via pop-up list that aren't on keyboard
- Bccessing a uart selection pop-up that maps to rpi uarts
- Button for accessing password selection pop-up to help with password entry over serial
- Button for accessing uart speed pop-up to help with configuring line speeds
- Way to display pinouts stored on micro sd card
- Configuration read from muxes (if attached)
## Implementation (Complete)
- Battery level on feather neopixel (green = >80% ; yellow >=40% ; orange >= 25% ; red < 25%)
- User LED (red) always on when feather is running
- Battery level shown as progress bar in the upper right corner of the screen
## Building / Uploading
The ```make.ps1```, ```build.ps1``` and ```upload.ps1``` scripts can be used to build/upload this project. These scripts call the ```arduino-cli``` commands programatically.

serial_debugger.ino → hardware/_controller/_controller.ino View File

@ -1,5 +1,5 @@
//<App !Start!>
// FILE: [serial_debugger.ino]
// FILE: [_controller.ino]
// Created by GUIslice Builder version: [0.15.b004]
//
// GUIslice Builder Generated File
@ -24,7 +24,7 @@
#include <CircularBuffer.h>
// Various local includes
#include "serial_debugger_GSLC.h"
#include "_controller_GSLC.h"
//<Includes !End!>

serial_debugger.prj → hardware/_controller/_controller.prj View File


serial_debugger_GSLC.h → hardware/_controller/_controller_GSLC.h View File

@ -1,5 +1,5 @@
//<File !Start!>
// FILE: [serial_debugger_GSLC.h]
// FILE: [_controller_GSLC.h]
// Created by GUIslice Builder version: [0.15.b004]
//
// GUIslice Builder Generated GUI Framework File

build.ps1 → hardware/_controller/build.ps1 View File

@ -1 +1 @@
arduino-cli compile --log-level=warn --fqbn adafruit:nrf52:feather52840 serial_debugger.ino
arduino-cli compile --log-level=warn --fqbn adafruit:nrf52:feather52840 _controller.ino

make.ps1 → hardware/_controller/make.ps1 View File


src/guislice/GUIslice.c → hardware/_controller/src/guislice/GUIslice.c View File


src/guislice/GUIslice.h → hardware/_controller/src/guislice/GUIslice.h View File


src/guislice/GUIslice_config.h → hardware/_controller/src/guislice/GUIslice_config.h View File


src/guislice/GUIslice_config_ard.h → hardware/_controller/src/guislice/GUIslice_config_ard.h View File


src/guislice/GUIslice_config_linux.h → hardware/_controller/src/guislice/GUIslice_config_linux.h View File


src/guislice/GUIslice_drv.h → hardware/_controller/src/guislice/GUIslice_drv.h View File


src/guislice/GUIslice_drv_adagfx.cpp → hardware/_controller/src/guislice/GUIslice_drv_adagfx.cpp View File


src/guislice/GUIslice_drv_adagfx.h → hardware/_controller/src/guislice/GUIslice_drv_adagfx.h View File


src/guislice/GUIslice_drv_m5stack.cpp → hardware/_controller/src/guislice/GUIslice_drv_m5stack.cpp View File


src/guislice/GUIslice_drv_m5stack.h → hardware/_controller/src/guislice/GUIslice_drv_m5stack.h View File


src/guislice/GUIslice_drv_sdl.c → hardware/_controller/src/guislice/GUIslice_drv_sdl.c View File


src/guislice/GUIslice_drv_sdl.h → hardware/_controller/src/guislice/GUIslice_drv_sdl.h View File


src/guislice/GUIslice_drv_tft_espi.cpp → hardware/_controller/src/guislice/GUIslice_drv_tft_espi.cpp View File


src/guislice/GUIslice_drv_tft_espi.h → hardware/_controller/src/guislice/GUIslice_drv_tft_espi.h View File


src/guislice/GUIslice_drv_utft.cpp → hardware/_controller/src/guislice/GUIslice_drv_utft.cpp View File


src/guislice/GUIslice_drv_utft.h → hardware/_controller/src/guislice/GUIslice_drv_utft.h View File


src/guislice/GUIslice_ex.h → hardware/_controller/src/guislice/GUIslice_ex.h View File


src/guislice/GUIslice_th.cpp → hardware/_controller/src/guislice/GUIslice_th.cpp View File


src/guislice/GUIslice_th.h → hardware/_controller/src/guislice/GUIslice_th.h View File


src/guislice/GUIslice_th_XPT2046.h → hardware/_controller/src/guislice/GUIslice_th_XPT2046.h View File


src/guislice/GUIslice_version.h → hardware/_controller/src/guislice/GUIslice_version.h View File


src/guislice/NotoMono12pt7b.h → hardware/_controller/src/guislice/NotoMono12pt7b.h View File


src/guislice/NotoMono8pt7b.h → hardware/_controller/src/guislice/NotoMono8pt7b.h View File


src/guislice/XCheckbox.c → hardware/_controller/src/guislice/XCheckbox.c View File


src/guislice/XCheckbox.h → hardware/_controller/src/guislice/XCheckbox.h View File


src/guislice/XGauge.c → hardware/_controller/src/guislice/XGauge.c View File


src/guislice/XGauge.h → hardware/_controller/src/guislice/XGauge.h View File


src/guislice/XGlowball.c → hardware/_controller/src/guislice/XGlowball.c View File


src/guislice/XGlowball.h → hardware/_controller/src/guislice/XGlowball.h View File


src/guislice/XGraph.c → hardware/_controller/src/guislice/XGraph.c View File


src/guislice/XGraph.h → hardware/_controller/src/guislice/XGraph.h View File


src/guislice/XKeyPad.c → hardware/_controller/src/guislice/XKeyPad.c View File


src/guislice/XKeyPad.h → hardware/_controller/src/guislice/XKeyPad.h View File


src/guislice/XKeyPad_Alpha.c → hardware/_controller/src/guislice/XKeyPad_Alpha.c View File


src/guislice/XKeyPad_Alpha.h → hardware/_controller/src/guislice/XKeyPad_Alpha.h View File


src/guislice/XKeyPad_Num.c → hardware/_controller/src/guislice/XKeyPad_Num.c View File


src/guislice/XKeyPad_Num.h → hardware/_controller/src/guislice/XKeyPad_Num.h View File


src/guislice/XListbox.c → hardware/_controller/src/guislice/XListbox.c View File


src/guislice/XListbox.h → hardware/_controller/src/guislice/XListbox.h View File


src/guislice/XProgress.c → hardware/_controller/src/guislice/XProgress.c View File


src/guislice/XProgress.h → hardware/_controller/src/guislice/XProgress.h View File


src/guislice/XRadial.c → hardware/_controller/src/guislice/XRadial.c View File


src/guislice/XRadial.h → hardware/_controller/src/guislice/XRadial.h View File


src/guislice/XRamp.c → hardware/_controller/src/guislice/XRamp.c View File


src/guislice/XRamp.h → hardware/_controller/src/guislice/XRamp.h View File


src/guislice/XRingGauge.c → hardware/_controller/src/guislice/XRingGauge.c View File


src/guislice/XRingGauge.h → hardware/_controller/src/guislice/XRingGauge.h View File


src/guislice/XSeekbar.c → hardware/_controller/src/guislice/XSeekbar.c View File


src/guislice/XSeekbar.h → hardware/_controller/src/guislice/XSeekbar.h View File


src/guislice/XSelNum.c → hardware/_controller/src/guislice/XSelNum.c View File


src/guislice/XSelNum.h → hardware/_controller/src/guislice/XSelNum.h View File


src/guislice/XSlider.c → hardware/_controller/src/guislice/XSlider.c View File


src/guislice/XSlider.h → hardware/_controller/src/guislice/XSlider.h View File


src/guislice/XSpinner.c → hardware/_controller/src/guislice/XSpinner.c View File


src/guislice/XSpinner.h → hardware/_controller/src/guislice/XSpinner.h View File


src/guislice/XTemplate.c → hardware/_controller/src/guislice/XTemplate.c View File


src/guislice/XTemplate.h → hardware/_controller/src/guislice/XTemplate.h View File


src/guislice/XTextbox.c → hardware/_controller/src/guislice/XTextbox.c View File


src/guislice/XTextbox.h → hardware/_controller/src/guislice/XTextbox.h View File


src/guislice/XTogglebtn.c → hardware/_controller/src/guislice/XTogglebtn.c View File


src/guislice/XTogglebtn.h → hardware/_controller/src/guislice/XTogglebtn.h View File


src/guislice/ard-adagfx-ili9341-notouch.h → hardware/_controller/src/guislice/ard-adagfx-ili9341-notouch.h View File


src/guislice/ard-adagfx-ili9341-stmpe610.h → hardware/_controller/src/guislice/ard-adagfx-ili9341-stmpe610.h View File


upload.ps1 → hardware/_controller/upload.ps1 View File


+ 38
- 0
hardware/mux_rpi/README.md View File

@ -0,0 +1,38 @@
# MUX - Raspberry Pi Edition
This folder contains the necessary sources and information to build a MUX for Raspberry Pis. This mux can be used independently or with the controller.
Note : The mux needs to be configured via sources if not used with the controller.
## Important Considerations
- The Raspberry Pi 4 has 5 available UARTS and we only document how to wire for UART0/1 and UART5
- The Raspberry Pi's prior to the 4 had only UART0 exposed. Please use ONLY the UART0 configuration and setup for these devices.
## Hardware / BoM
| Item | Quantity | Unit Cost |
| ---- | -------- | --------- |
| [Feather M0 Basic Proto](https://www.adafruit.com/product/2772) | 1 | $19.95 |
| [FeatherWing Proto](https://www.adafruit.com/product/2884) | 1 | $4.95 |
| [2x20 pin IDC Box Header](https://www.adafruit.com/product/1993) | 1 | $0.75 |
| [GPIO Ribbon Cable for Raspberry Pi](https://www.adafruit.com/product/1988) | 1 | $2.95 |
| [Header Kit for Feather](https://www.adafruit.com/product/2886) | 1 | $0.96 |
| [I2C Non-Volatile FRAM Breakout](https://www.adafruit.com/product/1895) | 2 | $9.95 |
## Implementation (Incomplete)
- FRAM break out for configuration persistence
- Fall back to saved config *and* goes into stand alone via usb port *if* it's not seeing the main board
- Receive configuration over i2c
- Save configuration to FRAM
- FRAM config reading
- Ability to have USB *and* i2c for the UART output
- Use ring buffer @ 16k for i2c
- Send direct to USB and then add to ring buffer (always send over usb even if not used)
## Implementation (Complete)
## Building / Uploading
The ```make.ps1```, ```build.ps1``` and ```upload.ps1``` scripts can be used to build/upload this project. These scripts call the ```arduino-cli``` commands programatically.

+ 0
- 93
notes.md View File

@ -1,93 +0,0 @@
# Notes
A dumping ground of notes and ideas
## cpp_settings.json
```
{
"configurations": [
{
"name": "Linux",
"includePath": [
"/home/USER/.arduino15/packages/arduino/tools/**",
"/home/USER/.arduino15/packages/arduino/hardware/samd/1.8.7/**",
"/usr/local/share/arduino/libraries/**",
"/usr/local/share/arduino/hardware/**",
"/home/USER/Arduino/libraries/**",
"${workspaceFolder}/**"
],
"forcedInclude": [
"/home/USER/.arduino15/packages/arduino/hardware/samd/1.8.7/cores/arduino/Arduino.h"
],
"intelliSenseMode": "clang-x64",
"compilerPath": "/usr/bin/clang",
"cStandard": "c11",
"cppStandard": "gnu++14"
}
],
"version": 4
}
```
## clang formatter
```
BasedOnStyle: LLVM
Language: Cpp
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: true
AlignConsecutiveDeclarations: true
AlignConsecutiveMacros: true
AlignEscapedNewlines: Left
# AlignOperands: AlignAfterOperator
AlignOperands: true
AlignTrailingComments: true
AllowAllArgumentsOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowAllConstructorInitializersOnNextLine: false
AllowShortBlocksOnASingleLine: true
AllowShortCaseLabelsOnASingleLine: true
AllowShortFunctionsOnASingleLine: true
AllowShortIfStatementsOnASingleLine: true
AllowShortLoopsOnASingleLine: false
BreakBeforeBraces: Attach
BreakStringLiterals: true
IncludeBlocks: Regroup
#IndentCaseBlocks: true
IndentCaseLabels: true
KeepEmptyLinesAtTheStartOfBlocks: false
PointerAlignment: Right
ReflowComments: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceBeforeSquareBrackets: false
UseTab: ForContinuationAndIndentation
IndentWidth: 4
TabWidth: 4
BinPackArguments: false
BinPackParameters: false
```
## Makefile
```
compile=arduino-cli compile --log-level=warn -v
upload=arduino-cli upload
serial := $(shell arduino-cli board list | grep mkrwifi1010 | awk '{print $$1}')
all:
cd ../ && $(compile) --fqbn arduino:samd:mkrwifi1010 PROJECT
upload:
cd ../ && $(upload) --fqbn arduino:samd:mkrwifi1010 -p ${mkr1010_serial} PROJECT
monitor:
screen ${mkr1010} 9600
```

Loading…
Cancel
Save