Skip to content

Conversation

@fmulassano
Copy link

Summary

This PR adds support for the Cosmolab board by Faselunare and updates Oopsy to be compatible with libdaisy v8.0.0.

Changes

  • ✅ Added Cosmolab board support (32 pads, 8 knobs, 48 LEDs, OLED, MIDI)
  • ✅ Updated to libdaisy v8.0.0 with all breaking changes addressed
  • ✅ Comprehensive changelog documentation in README

Breaking Changes Addressed

  • GPIO/Pin migration (dsy_gpio → GPIO class)
  • UartHandler API migration (DMA listen mode)
  • Hardware structure updates (seed → som)
  • Component definitions updates

See README.md for detailed changelog.

Testing

  • ✅ Compiled successfully with libdaisy v8.0.0
  • ✅ Tested with Cosmolab board
  • ✅ All examples compile correctly

Credits

Update performed by Francesco Mulassano (Faselunare)

Francesco Mulassano added 20 commits December 5, 2025 23:13
- Add cosmolab.json board configuration
- Add cosmolab case in oopsy.js
- Add cosmolab mapping in oopsy-objectmappings.txt
- Add cosmolab to board selection menu
- Add oopsy_cosmolab.maxpat template
- Add component_defs.json with CD4021Switch and other component definitions
- Add component_defs_patchsm.json and component_defs_petalsm.json
- Add json2daisy.js for JSON-based board configuration
- Add daisy_glue.js helper functions

These files are required for cosmolab.json and other JSON-based board configurations.
- Add require statements for json2daisy.js and daisy_glue.js
- Replace generate_target_struct with json2daisy.generate_header
- Use json2daisy.format_map for component mapping
- Add 'using json2daisy::Daisy;' in generated C++ code
- Add hardware.includes support in Makefile
- Add APP_TYPE and petal_sm support in Makefile

This enables support for CD4021Switch and other components defined in component_defs.json
…patibility

- Update genlib_daisy.h to use hardware.som instead of hardware.seed
- Replace sub_board with som pointer
- Update component_defs.json to use GPIO::Pull::PULLUP instead of Switch::PULL_UP
- Add support for OOPSY_OLD_JSON flag for backward compatibility
- Replace StartRx() with DmaListenStart() for MIDI reception
- Replace Readable()/PopRx() with DMA buffer reading
- Update Pin syntax from {DSY_GPIOB, 7} to Pin(DSY_GPIOB, 7)
- Add MidiRxCallback for DMA circular buffer handling
- Update GateIn: use Pin directly instead of dsy_gpio_pin pointer
- Update GateOut: use GPIO class with Config instead of dsy_gpio
- Update Switch: use GPIO::Pull::PULLUP instead of Switch::PULL_UP
- Fix Pin constructor: use GPIOPort::B instead of DSY_GPIOB
- Replace hardware.seed.AudioSampleRate() with som->AudioSampleRate()
- Replace hardware.seed.AudioBlockSize() with som->AudioBlockSize()
- Update Switch PULL_UP to GPIO::Pull::PULLUP
- Add OOPSY_OLD_JSON compatibility check
…upport

- Document all breaking changes and API migrations
- Explain why each change was necessary
- Add Cosmolab board feature list
- Include migration notes and disclaimer
- Credit Francesco Mulassano (Faselunare) for the update
Francesco Mulassano added 2 commits December 8, 2025 15:29
Major Changes:
- Added CD4021SwitchInverted component for hardware with pull-up resistors
- Fixed PCA9685 LED driver support via LoopProcess() call
- Updated to libDaisy v8.0.0 (from v5.x)
- Added Cosmolab board definition (cosmolab.json v1.0.0)

Technical Details:
- LoopProcess() fix enables I2C peripherals (PCA9685 LEDs, etc.)
- CD4021SwitchInverted supports inverted button polarity
- Follows libDaisy POLARITY_INVERTED pattern
- Fully backward compatible

Hardware Support:
- 32 LED-backlit buttons via CD4021 shift registers
- 48 LEDs total via PCA9685 I2C drivers (32 buttons + 16 for knobs)
- 8 potentiometers with dual LED feedback
- 4 CV in, 2 CV out, 1 trig in, 1 trig out (Eurorack)
- MIDI I/O, OLED display (64x32)

Documentation:
- COSMOLAB_README.md - Complete technical documentation
- CHANGELOG.md - Version history
- COSMOLAB_BOARDS_README.md - Board selection guide

Tested: ✅ All features verified on actual Cosmolab hardware v1
Version: 1.0.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant