Actually match teensy/arduino signatures
This commit is contained in:
parent
8e6effaa41
commit
1e9b470619
4 changed files with 10 additions and 8 deletions
|
|
@ -393,7 +393,8 @@ void configShowMessage(const char* message) {
|
|||
uint8_t* sysex_rcv_buffer = NULL;
|
||||
uint16_t sysex_buf_size = 0;
|
||||
|
||||
void handleSysexChunk(const uint8_t *data, const uint16_t length, const uint8_t last) {
|
||||
|
||||
void handleSysexChunk(const uint8_t *data, uint16_t length, bool last) {
|
||||
uint16_t pos;
|
||||
|
||||
if(!sysex_rcv_buffer) {
|
||||
|
|
@ -423,7 +424,7 @@ void handleSysexChunk(const uint8_t *data, const uint16_t length, const uint8_t
|
|||
}
|
||||
|
||||
|
||||
void handleSysex(const uint8_t *data, const unsigned int length) {
|
||||
void handleSysex(uint8_t *data, unsigned int length) {
|
||||
//Note: Sysex data as received here contains sysex start and end markers (0xF0 and 0xF7)
|
||||
|
||||
//Too short to even contain a 3-byte vendor id is not for us.
|
||||
|
|
|
|||
|
|
@ -133,8 +133,9 @@ void sendSysexSettings();
|
|||
void sendSysexMessage(const char* messageCode);
|
||||
void sendSysexVersion();
|
||||
|
||||
void handleSysex(const uint8_t *data, const unsigned int length);
|
||||
void handleSysexChunk(const uint8_t *data, const uint16_t length, const bool last);
|
||||
void handleSysex(uint8_t *data, unsigned int length);
|
||||
void handleSysexChunk(const uint8_t *data, uint16_t length, bool last);
|
||||
|
||||
uint32_t crc32(const uint8_t *message, const size_t length);
|
||||
|
||||
void configInitScreen();
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ public:
|
|||
void sendSysEx(uint16_t length, const uint8_t *data, bool hasTerm=false, uint8_t cable=0);
|
||||
bool read(uint8_t channel=0);
|
||||
void setHandleSystemExclusive(void (*fptr) (const uint8_t *array, unsigned int size));
|
||||
void setHandleSystemExclusive(void (*fptr) (const uint8_t *data, uint16_t length, uint8_t complete));
|
||||
void setHandleSystemExclusive(void (*fptr) (const uint8_t *data, uint16_t length, bool complete));
|
||||
|
||||
void receiveMidiData(const uint8_t *data, const uint16_t length); //Send midi data "into simulator"
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -134,12 +134,12 @@ void SimUsbMidi::receiveMidiData(const uint8_t *data, const uint16_t length) {
|
|||
}
|
||||
}
|
||||
|
||||
//Regular sysex handler. For some reason the data pointer is not const, but we'll set it as such to not be dumb.
|
||||
//MIDI SysEx handlers. Choice of data types is a bit odd, but done to match Arduino/Teensy libraries
|
||||
void SimUsbMidi::setHandleSystemExclusive(void (*fptr) (const uint8_t *array, unsigned int size)) {
|
||||
this->usb_midi_handleSysExComplete = fptr;
|
||||
}
|
||||
|
||||
//"Chunked" sysex handler (teensy extension), for large messages
|
||||
void SimUsbMidi::setHandleSystemExclusive(void (*fptr) (const uint8_t *array, uint16_t size, uint8_t last)) {
|
||||
this->usb_midi_handleSysExPartial = fptr;
|
||||
void SimUsbMidi::setHandleSystemExclusive(void (*fptr) (const uint8_t *array, uint16_t size, bool last)) {
|
||||
this->usb_midi_handleSysExPartial = (void (*)(const uint8_t *, uint16_t, uint8_t))fptr;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue