CMakeLists.txt 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. # OpenPuck — Zephyr RTOS port.
  2. #
  3. # Migrated from the Arduino/Adafruit-nRF52/TinyUSB sketch in ../OpenPuck.
  4. # Build (from a west workspace with this repo reachable):
  5. # west build -b adafruit_feather_nrf52840 OpenPuckZephyr
  6. #
  7. # The bare-metal RADIO peripheral is driven directly (no BLE/802.15.4), so the
  8. # Bluetooth/IEEE802154/MPSL stacks are disabled in prj.conf and the RADIO IRQ is
  9. # owned by this app.
  10. cmake_minimum_required(VERSION 3.20.0)
  11. find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
  12. project(openpuck C CXX)
  13. target_include_directories(app PRIVATE
  14. ${CMAKE_CURRENT_SOURCE_DIR}/src
  15. ${CMAKE_CURRENT_SOURCE_DIR}/src/compat)
  16. # status_led uses Arduino logical pin numbers; under the absolute-nRF-pin
  17. # digitalWrite shim, the SuperMini's P0.15 blue LED is absolute pin 15 (the
  18. # header's default 24 is the Adafruit logical pin). LED_BUILTIN (P1.15 = 47) is
  19. # set in the Arduino.h shim.
  20. target_compile_definitions(app PRIVATE WAKE_LED_PIN_B=15)
  21. target_sources(app PRIVATE
  22. src/main.cpp
  23. # compatibility layer
  24. src/compat/arduino_compat.cpp
  25. src/compat/littlefs_shim.cpp
  26. src/compat/serial_cdc_glue.cpp
  27. src/compat/usb_glue.cpp # Zephyr USBD backing for the TinyUSB shim
  28. src/compat/usb_device_setup.cpp # usbd_context (HID pool + CDC) bring-up
  29. src/compat/usb_webusb_class.cpp # WebUSB vendor class (config panel pipe)
  30. src/compat/usb_xinput_class.cpp # XInput (Xbox) vendor class
  31. # ported firmware modules
  32. src/config.cpp
  33. src/bonds.cpp
  34. src/identity.cpp
  35. src/triton.cpp
  36. src/gamepad_util.cpp
  37. src/radio.cpp
  38. src/rf_link.cpp
  39. src/rf_diag.cpp
  40. src/haptics.cpp
  41. src/status_led.cpp
  42. src/controllers.cpp
  43. src/puck_hid.cpp
  44. src/mode_lizard.cpp
  45. src/mode_switch_hori.cpp
  46. src/mode_switch_pro.cpp
  47. src/mode_ps5.cpp
  48. src/mode_hidgyro.cpp
  49. src/mode_xinput.cpp
  50. src/webusb_config.cpp
  51. src/serial_console.cpp
  52. src/usb_mount.cpp
  53. src/wake_hid.cpp
  54. )