summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.c2
-rw-r--r--src/midi.c4
-rw-r--r--src/midi.h15
-rw-r--r--src/nbproject/Makefile-genesis.properties9
-rw-r--r--src/nbproject/Makefile-variables.mk13
-rw-r--r--src/nbproject/private/configurations.xml2
6 files changed, 28 insertions, 17 deletions
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 @@
<defaultConf>0</defaultConf>
<confs>
<conf name="default" type="2">
- <platformToolSN>:=MPLABComm-USB-Microchip:=&lt;vid>04D8:=&lt;pid>9009:=&lt;rev>0100:=&lt;man>Microchip Technology, Inc. (www.microchip.com):=&lt;prod>MPLAB ICD3 tm (www.microchip.com):=&lt;sn>JIT153520759:=&lt;drv>x:=&lt;xpt>b:=end</platformToolSN>
+ <platformToolSN>:=MPLABComm-USB-Microchip:=&lt;vid>04D8:=&lt;pid>9009:=&lt;rev>0100:=&lt;man>Microchip Technology, Inc. (www.microchip.com):=&lt;prod>MPLAB ICD3 tm (www.microchip.com):=&lt;sn>JIT153520757:=&lt;drv>x:=&lt;xpt>b:=end</platformToolSN>
<languageToolchainDir>C:\Program Files\Microchip\xc8\v1.44\bin</languageToolchainDir>
<mdbdebugger version="1">
<placeholder1>place holder 1</placeholder1>