README.txt 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. ,-------.
  2. ---( Files )---
  3. `-------'
  4. README.md - User Manual : Body [github markdown]
  5. _images/ - User Manual : Images
  6. _images/GIMP/ - User Manual : GIMP image masters
  7. LICENSE - Tech Docs : MIT Licence file
  8. README.txt - Tech Docs : Dev notes
  9. notes.txt - Tech Docs : Random dev notes
  10. info.sh - Tech Docs : Retrieve info from source code
  11. application.fam - FAP : Header file
  12. WiiEC.png - FAP : Icon {10x10}
  13. gfx/ - Analyser : Images [generated by bc_image_tool]
  14. wii_anal.c|h - Analyser : Main application
  15. wii_anal_ec.c|h - Analyser : Extension controller actions
  16. wii_anal_keys.c|h - Analyser : Keyboard handling
  17. wii_anal_lcd.c|h - Analyser : LCD handling
  18. i2c_workaround.h - Temporary workaround for i2c bug in FZ code
  19. err.h - Errors
  20. bc_logging.h - Logging macros - especially LOG_LEVEL
  21. wii_i2c.c|h - i2c functionality
  22. wii_ec.c|h - Extension Controller basic functions
  23. wii_ec_macros.h - Bespoke Extension Controller handy-dandy MACROs
  24. wii_ec_classic.c|h - EC: Classic Controller Pro scene
  25. wii_ec_nunchuck.c|h - EC: Nunchuck scene
  26. wii_ec_udraw.c|h - EC: UDraw scene - not written
  27. ,----------------------------------.
  28. ---( Adding a new Extension Controller )---
  29. `----------------------------------'
  30. //! I'll finish this when I write the UDraw code
  31. Create a new Extension Controller called "mydev"
  32. Create wii_ec_mydev.c and wii_ec_mydev.h
  33. In wii_ec_mydev.c|h
  34. Create the functions [& prototypes]
  35. bool mydev_init (wiiEC_t* const) ; // Additional initialisation code
  36. void mydev_decode (wiiEC_t* const) ; // Decode controller input data
  37. void mydev_msg (wiiEC_t* const, FuriMessageQueue* const) ; // Put event messages in the event queue
  38. void mydev_calib (wiiEC_t* const, ecCalib_t) ; // Controller calibration function
  39. void mydev_show (Canvas* const, state_t* const) ; // Scene LCD display
  40. bool mydev_key (const eventMsg_t* const, state_t* const) ; // Scene key controls
  41. In wii_ec.h
  42. Include the new header
  43. #include "wii_ec_mydev.h"
  44. Add a perhipheral id to enum ecPid
  45. PID_MYDEV
  46. In wii_anal.h
  47. As a scene name to enum scene
  48. SCENE_MYDEV
  49. In wii_ec.c
  50. Add the device definition to the ecId[] array
  51. [PID_MYDEV] = { {0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, "My Device", SCENE_MYDEV,
  52. mydev_init, mydev_decode, mydev_msg, mydev_calib, mydev_show, mydev_key },