From 0bf98ee37b7605dd7b3b98912efac118a653bc82 Mon Sep 17 00:00:00 2001 From: Nao Pross Date: Mon, 12 Mar 2018 16:21:53 +0100 Subject: Remove midi_note_t enum, update gitignore --- .gitignore | 2 +- src/main.c | 2 +- src/midi.c | 4 ++-- src/midi.h | 15 ++------------- src/nbproject/Makefile-genesis.properties | 9 +++++++++ src/nbproject/Makefile-variables.mk | 13 +++++++++++++ src/nbproject/private/configurations.xml | 2 +- 7 files changed, 29 insertions(+), 18 deletions(-) create mode 100644 src/nbproject/Makefile-genesis.properties create mode 100644 src/nbproject/Makefile-variables.mk diff --git a/.gitignore b/.gitignore index 98f6a6a..c02f428 100644 --- a/.gitignore +++ b/.gitignore @@ -7,7 +7,7 @@ hw/__Previews # source code src/build -srd/dist +src/dist # libreoffice files **/.~lock.* diff --git a/src/main.c b/src/main.c index 85bdc11..9563cf4 100644 --- a/src/main.c +++ b/src/main.c @@ -102,7 +102,7 @@ #define MIDI_NOTE_SPEED 127 // max is 0x7F -//#define DEBUG +#define DEBUG /* global variables */ diff --git a/src/midi.c b/src/midi.c index 5513123..7ae8df4 100644 --- a/src/midi.c +++ b/src/midi.c @@ -59,7 +59,7 @@ int midi_set_channel(midi_message_t *pkt, unsigned channel) return 0; } -int midi_note_on(midi_message_t *pkt, unsigned channel, midi_note_t note, uint8_t velocity) +int midi_note_on(midi_message_t *pkt, unsigned channel, unsigned note, uint8_t velocity) { if (pkt == NULL) { return -1; @@ -84,7 +84,7 @@ int midi_note_on(midi_message_t *pkt, unsigned channel, midi_note_t note, uint8_ return 0; } -int midi_note_off(midi_message_t *pkt, unsigned channel, midi_note_t note, uint8_t velocity) +int midi_note_off(midi_message_t *pkt, unsigned channel, unsigned note, uint8_t velocity) { if (pkt == NULL) { return -1; diff --git a/src/midi.h b/src/midi.h index 7ee42b7..0cf458e 100644 --- a/src/midi.h +++ b/src/midi.h @@ -18,17 +18,6 @@ #define MIDI_DATA_MAX_SIZE 4 #endif - -typedef enum { - C = 0, // Do - D = 1, // Re - E = 2, // Mi - F = 3, // Fa - G = 4, // Sol - A = 5, // La - B = 6, // Si -} midi_note_t; - typedef enum { NOTE_OFF = 0x8, NOTE_ON = 0x9, @@ -83,8 +72,8 @@ extern int midi_set_status(midi_message_t *pkt, midi_status_t status); extern int midi_set_channel(midi_message_t *pkt, unsigned channel); // message building -extern int midi_note_on(midi_message_t *pkt, unsigned channel, midi_note_t note, uint8_t velocity); -extern int midi_note_off(midi_message_t *pkt, unsigned channel, midi_note_t note, uint8_t velocity); +extern int midi_note_on(midi_message_t *pkt, unsigned channel, unsigned note, uint8_t velocity); +extern int midi_note_off(midi_message_t *pkt, unsigned channel, unsigned note, uint8_t velocity); // optimization // extern int midi_thin_data(void *buffer, midi_message_t pkt[]); diff --git a/src/nbproject/Makefile-genesis.properties b/src/nbproject/Makefile-genesis.properties new file mode 100644 index 0000000..ea64c31 --- /dev/null +++ b/src/nbproject/Makefile-genesis.properties @@ -0,0 +1,9 @@ +# +#Mon Mar 12 14:17:07 CET 2018 +default.languagetoolchain.dir=C\:\\Program Files\\Microchip\\xc8\\v1.44\\bin +configurations-xml=b7ce4d9a7385ee4bf81a07319272507b +com-microchip-mplab-nbide-embedded-makeproject-MakeProject.md5=5d30ff5128b14865c8a3796a8f0bb8a0 +default.languagetoolchain.version=1.44 +host.platform=windows +conf.ids=default +default.com-microchip-mplab-nbide-toolchainXC8-XC8LanguageToolchain.md5=1ecde863556371fa9144cadd16f678d4 diff --git a/src/nbproject/Makefile-variables.mk b/src/nbproject/Makefile-variables.mk new file mode 100644 index 0000000..095430d --- /dev/null +++ b/src/nbproject/Makefile-variables.mk @@ -0,0 +1,13 @@ +# +# Generated - do not edit! +# +# NOCDDL +# +CND_BASEDIR=`pwd` +# default configuration +CND_ARTIFACT_DIR_default=dist/default/production +CND_ARTIFACT_NAME_default=src.production.hex +CND_ARTIFACT_PATH_default=dist/default/production/src.production.hex +CND_PACKAGE_DIR_default=${CND_DISTDIR}/default/package +CND_PACKAGE_NAME_default=src.tar +CND_PACKAGE_PATH_default=${CND_DISTDIR}/default/package/src.tar diff --git a/src/nbproject/private/configurations.xml b/src/nbproject/private/configurations.xml index 58a3971..4910c01 100644 --- a/src/nbproject/private/configurations.xml +++ b/src/nbproject/private/configurations.xml @@ -4,7 +4,7 @@ 0 - :=MPLABComm-USB-Microchip:=<vid>04D8:=<pid>9009:=<rev>0100:=<man>Microchip Technology, Inc. (www.microchip.com):=<prod>MPLAB ICD3 tm (www.microchip.com):=<sn>JIT153520759:=<drv>x:=<xpt>b:=end + :=MPLABComm-USB-Microchip:=<vid>04D8:=<pid>9009:=<rev>0100:=<man>Microchip Technology, Inc. (www.microchip.com):=<prod>MPLAB ICD3 tm (www.microchip.com):=<sn>JIT153520757:=<drv>x:=<xpt>b:=end C:\Program Files\Microchip\xc8\v1.44\bin place holder 1 -- cgit v1.2.1