Setup basic Daisy environment

This commit is contained in:
Christian Colglazier 2020-07-12 09:51:35 -04:00
parent f2549a2248
commit 7f253faf5c
8 changed files with 63 additions and 1 deletions

3
.gitignore vendored
View File

@ -1,3 +1,6 @@
# Daisy
build/
# Prerequisites # Prerequisites
*.d *.d

6
.gitmodules vendored Normal file
View File

@ -0,0 +1,6 @@
[submodule "libDaisy"]
path = libDaisy
url = git@github.com:electro-smith/libDaisy.git
[submodule "daisySP"]
path = daisySP
url = git@github.com:electro-smith/DaisySP.git

9
Makefile Normal file
View File

@ -0,0 +1,9 @@
TARGET = Main
CPP_SOURCES = src/main.cpp
LIBDAISY_DIR = ./libDaisy
DAISYSP_DIR = ./daisySP
SYSTEM_FILES_DIR = $(LIBDAISY_DIR)/core
include $(SYSTEM_FILES_DIR)/Makefile

View File

@ -1 +1,3 @@
# AnswerDo # Daisy Patch Template
A starting point for creating Daisy Patch Projects.

1
daisySP Submodule

@ -0,0 +1 @@
Subproject commit ddaa1588c793e115f9e0ca915069376caf2e120a

1
libDaisy Submodule

@ -0,0 +1 @@
Subproject commit 504f10264c39b04e5ef4d85d4c10d052d44919f2

37
src/main.cpp Normal file
View File

@ -0,0 +1,37 @@
#include "daisysp.h"
#include "daisy_patch.h"
#include <string>
#include "main.h"
using namespace daisy;
using namespace daisysp;
DaisyPatch patch;
int main(void) {
patch.Init();
patch.StartAdc();
while(true) {
ProcessControls();
ProcessOled();
ProcessOutputs();
}
}
void ProcessControls() {}
void ProcessOutputs() {}
void ProcessOled() {
patch.display.Fill(false);
std::string str;
char* cstr = &str[0];
patch.display.SetCursor(0,0);
str = "Daisy Template";
patch.display.WriteString(cstr, Font_7x10, true);
patch.display.Update();
}

3
src/main.h Normal file
View File

@ -0,0 +1,3 @@
void ProcessControls();
void ProcessOled();
void ProcessOutputs();