diff options
author | Nao Pross <naopross@thearcway.org> | 2018-03-12 16:21:53 +0100 |
---|---|---|
committer | Nao Pross <naopross@thearcway.org> | 2018-03-12 16:21:53 +0100 |
commit | 0bf98ee37b7605dd7b3b98912efac118a653bc82 (patch) | |
tree | 525d1f208128b9efb6dea7d18cb2dc23313156eb /src | |
parent | Update quote, delete mplab garbage (diff) | |
download | Xilofono-0bf98ee37b7605dd7b3b98912efac118a653bc82.tar.gz Xilofono-0bf98ee37b7605dd7b3b98912efac118a653bc82.zip |
Remove midi_note_t enum, update gitignore
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 2 | ||||
-rw-r--r-- | src/midi.c | 4 | ||||
-rw-r--r-- | src/midi.h | 15 | ||||
-rw-r--r-- | src/nbproject/Makefile-genesis.properties | 9 | ||||
-rw-r--r-- | src/nbproject/Makefile-variables.mk | 13 | ||||
-rw-r--r-- | src/nbproject/private/configurations.xml | 2 |
6 files changed, 28 insertions, 17 deletions
@@ -102,7 +102,7 @@ #define MIDI_NOTE_SPEED 127 // max is 0x7F -//#define DEBUG +#define DEBUG /* global variables */ @@ -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; @@ -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 @@ <defaultConf>0</defaultConf> <confs> <conf name="default" type="2"> - <platformToolSN>:=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</platformToolSN> + <platformToolSN>:=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</platformToolSN> <languageToolchainDir>C:\Program Files\Microchip\xc8\v1.44\bin</languageToolchainDir> <mdbdebugger version="1"> <placeholder1>place holder 1</placeholder1> |