Skip to content
This repository was archived by the owner on Apr 24, 2023. It is now read-only.

Commit 4479406

Browse files
committed
Testing 128k
1 parent a897011 commit 4479406

File tree

2 files changed

+13
-18
lines changed

2 files changed

+13
-18
lines changed

platformio.ini.osx

+4-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,7 @@ upload_protocol = esptool
1313

1414
monitor_speed = 115200
1515
board_build.partitions = noota_3g.csv
16-
build_flags = -w -O3
16+
build_flags =
17+
-w -O3
18+
-DBOARD_HAS_PSRAM
19+
-mfix-esp32-psram-cache-issue

src/midiMessage.cpp

+9-17
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
11
#include "Sound/midiMessage.h"
22
#include "Arduino.h"
33

4-
54
byte last_status;
65

7-
void send_channel_message(byte command,
8-
byte channel,
9-
int num_data_bytes,
10-
byte * data)
11-
{
6+
void send_channel_message(byte command, byte channel, int num_data_bytes, byte *data) {
127
// We are assuming that all of the inputs are in a valid range:
138
// Acceptable commands are 0x80 to 0xF0.
149
// Channels must be between 1 and 16.
@@ -23,25 +18,22 @@ void send_channel_message(byte command,
2318
// Combine MS-nybble of command with channel nybble.
2419
first = (command & 0xf0) | ((channel - 1) & 0x0f);
2520

26-
if(first != last_status)
27-
{
21+
if (first != last_status) {
2822
Serial.write(first);
2923
last_status = first;
3024
}
3125

3226
// Then send the right number of data bytes
33-
for(int i = 0; i < num_data_bytes; i++)
34-
{
27+
for (int i = 0; i < num_data_bytes; i++) {
3528
Serial.write(data[i]);
3629
}
3730
}
3831

39-
void midiMessage(uint8_t message, uint8_t channel, uint8_t data1, uint8_t data2)
40-
{
41-
uint8_t data[2];
42-
data[0]=data1;
43-
data[1]=data2;
44-
32+
void midiMessage(uint8_t message, uint8_t channel, uint8_t data1, uint8_t data2) {
33+
uint8_t data[2];
34+
data[0] = data1;
35+
data[1] = data2;
4536

46-
//send_channel_message(message,channel,2,data);
37+
// send_channel_message(message,channel,2,data);
38+
// Serial.printf("MSG: %u\n", data);
4739
}

0 commit comments

Comments
 (0)