electro-smith / libDaisy

Hardware Library for the Daisy Audio Platform
https://www.electro-smith.com/daisy
MIT License
336 stars 144 forks source link

clean up directories for libdaisy, and daisysp #17

Closed stephenhensley closed 4 years ago

stephenhensley commented 4 years ago

Still thinking of how exactly I want to organize stuff for each lib...

For libdaisy:

I'd like to keep .c/.h pairs together, but I think there should be a few different source directories (now that the number of files is growing, its probably a good time to do this).

probably something like, core/, device/, peripheral/, interface/

That satisfies most of the difference.

e.g.

Also since a 'board' file is now required, its most likely that a user would include dsy_seed.h instead of just libdaisy.h since that will have all of the hardware mapping. It might be worth it to add a board/ folder or something that contains official boards.

daisysp

I'm still torn on this one, but I'm leaning toward a combined header file for the whole library.

In which case I'll probably just move all of the current .c/.h files into a dir, modules/ -- the build system can concatenate all header files within this folder to create daisysp.h

Anything that's not user-facing, that needs to be used within the library can be in a core/ folder or something else with a similar name. I don't think there are any such files in there for now, but mentioning it for planning sake.

PaulBatchelor commented 4 years ago

@stephenhensley Have you considered making a new repo for daisysp? It seems fitting, considering that right now they are two separately generated libraries. You could always include daisysp as a git submodule.

stephenhensley commented 4 years ago

@PaulBatchelor yeah, at some point we'll probably split it to libdaisy, daisysp, and daisy_examples.

I think its practical to keep it together for now, though.

PaulBatchelor commented 4 years ago

yeah, I think that's fine for now. Faust did this approach as well.

I think from a design/architecture perspective, it will be most beneficial to keep the DSP abstractions and the low-level components as separate as possible. I think you want to be able to give the community a chance to be creative at every level.

stephenhensley commented 4 years ago

Yeah, totally. I'd like to keep the DSP completely independent from the low level/hardware related stuff.

This may get a bit blurry with things that take advantage of actual CMSIS/ARM dsp instructions, but for the most part it should be able to be built, and used on a pc as much as on an ARM platform.

andrewikenberry commented 4 years ago

this happened enough for now -- daisysp/modules libdaisy/src etc.