-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from mxmxmx/dev
[v1.1]
- Loading branch information
Showing
9 changed files
with
168 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# BOM for cv | midi | ||
|
||
### resistors 0603: | ||
### resistors 0603 (1%): | ||
|
||
| value | # | note | | ||
| --- | ---: | --- | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#include "C2M_MIDI.h" | ||
#include "C2M_options.h" | ||
#include "Arduino.h" | ||
|
||
namespace C2M { | ||
|
||
/*static*/ | ||
void MIDI::Init() { | ||
Serial1.begin(31250); | ||
} | ||
|
||
int MIDI::rx() { | ||
return (Serial1.available() > 0); | ||
} | ||
|
||
void MIDI::send_data(uint8_t statusByte, uint8_t param1, uint8_t param2) { | ||
|
||
#ifdef USE_TX_BUFFER | ||
uint8_t tx_buf[0x3]; | ||
|
||
tx_buf[0] = statusByte; | ||
tx_buf[1] = param1; | ||
tx_buf[2] = param2; | ||
|
||
Serial1.write(tx_buf, 0x3); | ||
#else | ||
Serial1.write(statusByte); Serial1.write(param1); Serial1.write(param2); | ||
#endif | ||
} | ||
|
||
}; // namespace 2CM | ||
|
||
// C2M_MIDI |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#ifndef C2M_MIDI_H_ | ||
#define C2M_MIDI_H_ | ||
|
||
#include <stdint.h> | ||
|
||
namespace C2M { | ||
|
||
class MIDI { | ||
|
||
public: | ||
|
||
static void Init(); | ||
static int rx(); | ||
static void send_data(uint8_t statusByte, uint8_t param1, uint8_t param2); | ||
|
||
}; | ||
|
||
}; // namespace 2CM | ||
|
||
#endif // C2M_MIDI_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.