flipperzero-firmware icon indicating copy to clipboard operation
flipperzero-firmware copied to clipboard

[FL-3669] Expansion module protocol

Open gsurkov opened this issue 2 years ago • 2 comments

What's new

  • UART refactoring by @skotopes (better access model)
  • Standard expansion module protocol with automatic detection, software flow control and RPC support
  • Reference parser implementation
  • Integration test application and unit tests for the parser

TODO:

  • [x] Documentation (Doxygen, protocol description)
  • [x] Robustness (make it resilient to garbage data and unexpected disconnects)
  • [x] Basic error detection via checksum
  • [x] Code cleanup and optimisation

Verification

  1. Connect the hardware programmer with jumper wires so it does not interfere with pins 13 to 15.
  2. Connect pins 13 to 16 and 14 to 15 with jumper wires.
  3. Flash the firmware.
  4. Launch the test application: ./fbt launch APPSRC=expansion_test
  5. An audovisual alert should play shortly.
  6. Check that the test applicaton has exited and the respective RPC session was closed.
  7. Download file /ext/ExpansionTest/test.txt using qFlipper or any other method.
  8. Check that it is identical to the file found in the application source assets folder.

Checklist (For Reviewer)

  • [ ] PR has description of feature/bug or link to Confluence/Jira task
  • [ ] Description contains actions to verify feature/bugfix
  • [ ] I've built this code, uploaded it to the device and verified feature/bugfix

gsurkov avatar Nov 29 '23 18:11 gsurkov

Compiled f7 firmware for commit 03910e6d:

github-actions[bot] avatar Nov 29 '23 18:11 github-actions[bot]

PVS-Studio report for commit 4420706f:

github-actions[bot] avatar Dec 26 '23 09:12 github-actions[bot]