Git Product home page Git Product logo

libdaisy's Introduction

libDaisy

Hardware Abstraction Library for the Daisy Audio Platform


libDaisy provides easy access to things such as Audio, Controls, GPIO, MIDI, USB communication, and more.

Features

  • Configurable Audio Callback

  • MIDI Drivers

  • USB Communication (Audio, MIDI, Serial, etc.)

  • Peripheral Device Drivers (SPI, I2S, I2C, etc.)

Code Example

int main(void)
{
    // Init
    float samplerate;
    hw.Init();
    samplerate = hw.AudioSampleRate();
    midi.Init(MidiHandler::INPUT_MODE_UART1, MidiHandler::OUTPUT_MODE_NONE);

    midi.StartReceive();
    hw.StartAdc();
    hw.StartAudio(AudioCallback);
    
    for(;;)
    {
        midi.Listen();
        // Handle MIDI Events
        while (midi.HasEvents())
        {
            HandleMidiMessage(midi.PopEvent());
        }
    }
}

Getting Started

Project Overview

Prefixes and their meanings:

  • sys - System level configuration (clocks, dma, etc.)
  • per - Peripheral level, internal to MCU (i2c, spi, etc.)
  • dev - External device support (external flash chips, DACs, codecs, etc.)
  • hid - User level interface elements (encoders, switches, audio, etc.)
  • ui - User interface building blocks like menu systems, event queues, etc.
  • util - library level elements used within the library (not included via daisy.h)
  • daisy - core API files (specific boards and platforms have extended user APIs that configure libDaisy more below).

Also included is a core/ folder containing:

  • a generic Makefile that can be included in a project Makefile to simplify getting started
  • a linker script for defining the sections of memory used by the firmware
  • core files for starting the hardware (system_stm32h7xx.c, startup_stm32h750xx.s, etc.)

Unit Tests can be found in the test/ folder. Here's a tutorial on how to develop unit tested code for libDaisy.

daisy.h

The base-level include file. This is all you need to include to create your own custom hardware that uses libDaisy.

daisy_seed.h is an example of a board level file that utilizes libDaisy to define some hardware, and provide flexible access.

daisy_seed.h

The SOM-level include file. This can be used with any boards that use the Daisy Seed hardware.

Additional configuration files, with more specific hardware access are provided below for supported hardware platforms.

daisy_platform.h

Several other pairs of files exist for each of the supported hardware platforms that work with Daisy Seed.

These are:

  • daisy_field
  • daisy_patch
  • daisy_petal
  • daisy_pod

With these files a number of additional initialization, and configuration is done by the library.

This allows a user to jump right in without needing a complete understanding of what's going on under the hood.

Contributing

Here are some ways that you can get involved:

  • Proof read the documentation and suggest improvements
  • Test existing functionality and make issues
  • Add new functionality to the library. See issues labeled "feature"
  • Fix problems with existing codebase. See issues labeled "bug" and/or "polish"

Before working on code, please check out our Contribution Guidelines and Style Guide.

Support

Here are some ways to get support and connect with other users and developers:

License

libDaisy is licensed with the permissive MIT open source license.

This allows for modification and reuse in both commercial and personal projects. It does not provide a warranty of any kind.

For the full license, read the LICENSE file in the root directory.

libdaisy's People

Contributors

stephenhensley avatar beserge avatar andrewikenberry avatar theslowgrowth avatar corvusprudens avatar axp avatar stephenmccaul avatar paulbatchelor avatar o5akafeeva avatar recursinging avatar jcolicchio avatar ssteve avatar cosmikwolf avatar brbrr avatar mhetrick avatar jbeda avatar avaars avatar claudiocabral avatar jeremybernstein avatar kisielk avatar tom97531 avatar andrewcapon avatar efairbanks avatar gregburns avatar ifranco avatar kylestetz avatar ndonald2 avatar staffanmelin avatar zeroisnan avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.