diff options
| -rw-r--r-- | quantum/rgblight.c | 13 | ||||
| -rw-r--r-- | quantum/rgblight.h | 1 | ||||
| -rw-r--r-- | tmk_core/protocol/lufa/lufa.c | 291 | ||||
| -rw-r--r-- | tmk_core/protocol/lufa/lufa.h | 16 |
4 files changed, 206 insertions, 115 deletions
diff --git a/quantum/rgblight.c b/quantum/rgblight.c index 00620da58..bb03d6e91 100644 --- a/quantum/rgblight.c +++ b/quantum/rgblight.c | |||
| @@ -183,6 +183,19 @@ void rgblight_init(void) { | |||
| 183 | } | 183 | } |
| 184 | } | 184 | } |
| 185 | 185 | ||
| 186 | void rgblight_update_dword(uint32_t dword) { | ||
| 187 | rgblight_config.raw = dword; | ||
| 188 | eeconfig_update_rgblight(rgblight_config.raw); | ||
| 189 | if (rgblight_config.enable) | ||
| 190 | rgblight_mode(rgblight_config.mode); | ||
| 191 | else { | ||
| 192 | #ifdef RGBLIGHT_ANIMATIONS | ||
| 193 | rgblight_timer_disable(); | ||
| 194 | #endif | ||
| 195 | rgblight_set(); | ||
| 196 | } | ||
| 197 | } | ||
| 198 | |||
| 186 | void rgblight_increase(void) { | 199 | void rgblight_increase(void) { |
| 187 | uint8_t mode = 0; | 200 | uint8_t mode = 0; |
| 188 | if (rgblight_config.mode < RGBLIGHT_MODES) { | 201 | if (rgblight_config.mode < RGBLIGHT_MODES) { |
diff --git a/quantum/rgblight.h b/quantum/rgblight.h index a3673348e..28a410e48 100644 --- a/quantum/rgblight.h +++ b/quantum/rgblight.h | |||
| @@ -65,6 +65,7 @@ void rgblight_enable(void); | |||
| 65 | void rgblight_step(void); | 65 | void rgblight_step(void); |
| 66 | void rgblight_mode(uint8_t mode); | 66 | void rgblight_mode(uint8_t mode); |
| 67 | void rgblight_set(void); | 67 | void rgblight_set(void); |
| 68 | void rgblight_update_dword(uint32_t dword); | ||
| 68 | void rgblight_increase_hue(void); | 69 | void rgblight_increase_hue(void); |
| 69 | void rgblight_decrease_hue(void); | 70 | void rgblight_decrease_hue(void); |
| 70 | void rgblight_increase_sat(void); | 71 | void rgblight_increase_sat(void); |
diff --git a/tmk_core/protocol/lufa/lufa.c b/tmk_core/protocol/lufa/lufa.c index c4531c8d7..c3234b8ce 100644 --- a/tmk_core/protocol/lufa/lufa.c +++ b/tmk_core/protocol/lufa/lufa.c | |||
| @@ -1145,39 +1145,96 @@ void sysex_callback(MidiDevice * device, uint16_t start, uint8_t length, uint8_t | |||
| 1145 | 1145 | ||
| 1146 | } | 1146 | } |
| 1147 | 1147 | ||
| 1148 | uint32_t decode_uint32_chunk(uint8_t * data) { | 1148 | void dword_to_bytes(uint32_t dword, uint8_t * bytes) { |
| 1149 | uint32_t part1 = *data++; | 1149 | bytes[0] = (dword >> 24) & 0xFF; |
| 1150 | uint32_t part2 = *data++; | 1150 | bytes[1] = (dword >> 16) & 0xFF; |
| 1151 | uint32_t part3 = *data++; | 1151 | bytes[2] = (dword >> 8) & 0xFF; |
| 1152 | uint32_t part4 = *data++; | 1152 | bytes[3] = (dword >> 0) & 0xFF; |
| 1153 | uint32_t part5 = *data++; | ||
| 1154 | return ((part1 & 0x1FUL) << 28) | (part2 << 21) | (part3 << 14) | (part4 << 7) | part5; | ||
| 1155 | } | 1153 | } |
| 1156 | 1154 | ||
| 1157 | uint32_t decode_uint8_chunk(uint8_t * data) { | 1155 | uint32_t bytes_to_dword(uint8_t * bytes, uint8_t index) { |
| 1158 | uint32_t part4 = *data++; | 1156 | return ((uint32_t)bytes[index + 0] << 24) | ((uint32_t)bytes[index + 1] << 16) | ((uint32_t)bytes[index + 2] << 8) | (uint32_t)bytes[index + 3]; |
| 1159 | uint32_t part5 = *data++; | ||
| 1160 | return (part4 << 7) | part5; | ||
| 1161 | } | 1157 | } |
| 1162 | 1158 | ||
| 1163 | void encode_uint32_chunk(uint32_t data, uint8_t * pointer) { | 1159 | enum MESSAGE_TYPE { |
| 1164 | *pointer++ = (data >> 28) & 0x7F; | 1160 | MT_GET_DATA = 0x10, // Get data from keyboard |
| 1165 | *pointer++ = (data >> 21) & 0x7F; | 1161 | MT_GET_DATA_ACK = 0x11, // returned data to process (ACK) |
| 1166 | *pointer++ = (data >> 14) & 0x7F; | 1162 | MT_SET_DATA = 0x20, // Set data on keyboard |
| 1167 | *pointer++ = (data >> 7) & 0x7F; | 1163 | MT_SET_DATA_ACK = 0x21, // returned data to confirm (ACK) |
| 1168 | *pointer++ = (data) & 0x7F; | 1164 | MT_SEND_DATA = 0x30, // Sending data/action from keyboard |
| 1165 | MT_SEND_DATA_ACK = 0x31, // returned data/action confirmation (ACK) | ||
| 1166 | MT_EXE_ACTION = 0x40, // executing actions on keyboard | ||
| 1167 | MT_EXE_ACTION_ACK =0x41, // return confirmation/value (ACK) | ||
| 1168 | MT_TYPE_ERROR = 0x80 // type not recofgnised (ACK) | ||
| 1169 | }; | ||
| 1170 | |||
| 1171 | enum DATA_TYPE { | ||
| 1172 | DT_NONE = 0x00, | ||
| 1173 | DT_HANDSHAKE, | ||
| 1174 | DT_DEFAULT_LAYER, | ||
| 1175 | DT_CURRENT_LAYER, | ||
| 1176 | DT_KEYMAP_OPTIONS, | ||
| 1177 | DT_BACKLIGHT, | ||
| 1178 | DT_RGBLIGHT, | ||
| 1179 | DT_UNICODE, | ||
| 1180 | DT_DEBUG, | ||
| 1181 | DT_AUDIO, | ||
| 1182 | DT_QUANTUM_ACTION, | ||
| 1183 | DT_KEYBOARD_ACTION, | ||
| 1184 | DT_USER_ACTION, | ||
| 1185 | |||
| 1186 | }; | ||
| 1187 | |||
| 1188 | void send_bytes_sysex(uint8_t message_type, uint8_t data_type, uint8_t * bytes, uint8_t length) { | ||
| 1189 | // SEND_STRING("\nTX: "); | ||
| 1190 | // for (uint8_t i = 0; i < length; i++) { | ||
| 1191 | // send_byte(bytes[i]); | ||
| 1192 | // SEND_STRING(" "); | ||
| 1193 | // } | ||
| 1194 | uint8_t * precode = malloc(sizeof(uint8_t) * (length + 2)); | ||
| 1195 | precode[0] = message_type; | ||
| 1196 | precode[1] = data_type; | ||
| 1197 | memcpy(precode + 2, bytes, length); | ||
| 1198 | uint8_t * encoded = malloc(sizeof(uint8_t) * (sysex_encoded_length(length + 2))); | ||
| 1199 | uint16_t encoded_length = sysex_encode(encoded, precode, length + 2); | ||
| 1200 | uint8_t * array = malloc(sizeof(uint8_t) * (encoded_length + 5)); | ||
| 1201 | array[0] = 0xF0; | ||
| 1202 | array[1] = 0x00; | ||
| 1203 | array[2] = 0x00; | ||
| 1204 | array[3] = 0x00; | ||
| 1205 | array[encoded_length + 4] = 0xF7; | ||
| 1206 | memcpy(array + 4, encoded, encoded_length); | ||
| 1207 | midi_send_array(&midi_device, encoded_length + 5, array); | ||
| 1208 | |||
| 1209 | // SEND_STRING("\nTD: "); | ||
| 1210 | // for (uint8_t i = 0; i < encoded_length + 5; i++) { | ||
| 1211 | // send_byte(array[i]); | ||
| 1212 | // SEND_STRING(" "); | ||
| 1213 | // } | ||
| 1169 | } | 1214 | } |
| 1170 | 1215 | ||
| 1171 | void encode_uint8_chunk(uint8_t data, uint8_t * pointer) { | 1216 | #define MT_GET_DATA(data_type, data, length) send_bytes_sysex(MT_GET_DATA, data_type, data, length) |
| 1172 | *pointer++ = (data >> 7) & 0x7F; | 1217 | #define MT_GET_DATA_ACK(data_type, data, length) send_bytes_sysex(MT_GET_DATA_ACK, data_type, data, length) |
| 1173 | *pointer++ = (data) & 0x7F; | 1218 | #define MT_SET_DATA(data_type, data, length) send_bytes_sysex(MT_SET_DATA, data_type, data, length) |
| 1219 | #define MT_SET_DATA_ACK(data_type, data, length) send_bytes_sysex(MT_SET_DATA_ACK, data_type, data, length) | ||
| 1220 | #define MT_SEND_DATA(data_type, data, length) send_bytes_sysex(MT_SEND_DATA, data_type, data, length) | ||
| 1221 | #define MT_SEND_DATA_ACK(data_type, data, length) send_bytes_sysex(MT_SEND_DATA_ACK, data_type, data, length) | ||
| 1222 | #define MT_EXE_ACTION(data_type, data, length) send_bytes_sysex(MT_EXE_ACTION, data_type, data, length) | ||
| 1223 | #define MT_EXE_ACTION_ACK(data_type, data, length) send_bytes_sysex(MT_EXE_ACTION_ACK, data_type, data, length) | ||
| 1224 | |||
| 1225 | __attribute__ ((weak)) | ||
| 1226 | bool sysex_process_quantum(uint8_t length, uint8_t * data) { | ||
| 1227 | return sysex_process_keyboard(length, data); | ||
| 1174 | } | 1228 | } |
| 1175 | 1229 | ||
| 1176 | void dword_to_bytes(uint8_t * bytes, uint32_t dword) { | 1230 | __attribute__ ((weak)) |
| 1177 | bytes[0] = (dword >> 24) & 0xFF; | 1231 | bool sysex_process_keyboard(uint8_t length, uint8_t * data) { |
| 1178 | bytes[1] = (dword >> 16) & 0xFF; | 1232 | return sysex_process_user(length, data); |
| 1179 | bytes[2] = (dword >> 8) & 0xFF; | 1233 | } |
| 1180 | bytes[3] = (dword >> 0) & 0xFF; | 1234 | |
| 1235 | __attribute__ ((weak)) | ||
| 1236 | bool sysex_process_user(uint8_t length, uint8_t * data) { | ||
| 1237 | return true; | ||
| 1181 | } | 1238 | } |
| 1182 | 1239 | ||
| 1183 | void sysex_buffer_callback(MidiDevice * device, uint8_t length, uint8_t * data) { | 1240 | void sysex_buffer_callback(MidiDevice * device, uint8_t length, uint8_t * data) { |
| @@ -1186,114 +1243,128 @@ void sysex_buffer_callback(MidiDevice * device, uint8_t length, uint8_t * data) | |||
| 1186 | // send_byte(data[i]); | 1243 | // send_byte(data[i]); |
| 1187 | // SEND_STRING(" "); | 1244 | // SEND_STRING(" "); |
| 1188 | // } | 1245 | // } |
| 1246 | if (!sysex_process_quantum(length, data)) | ||
| 1247 | return; | ||
| 1189 | 1248 | ||
| 1190 | switch (*data++) { | 1249 | switch (data[0]) { |
| 1191 | case 0x07: ; // Quantum action | 1250 | case MT_SET_DATA: |
| 1192 | break; | 1251 | switch (data[1]) { |
| 1193 | case 0x08: ; // Keyboard action | 1252 | case DT_DEFAULT_LAYER: { |
| 1194 | break; | 1253 | eeconfig_update_default_layer(data[2]); |
| 1195 | case 0x09: ; // User action | 1254 | default_layer_set((uint32_t)(data[2])); |
| 1196 | break; | ||
| 1197 | case 0x12: ; // Set info on keyboard | ||
| 1198 | switch (*data++) { | ||
| 1199 | case 0x02: ; // set default layer | ||
| 1200 | eeconfig_update_default_layer(data[0] << 8 | data[1]); | ||
| 1201 | default_layer_set((uint32_t)(data[0] << 8 | data[1])); | ||
| 1202 | break; | 1255 | break; |
| 1203 | case 0x08: ; // set keymap options | 1256 | } |
| 1204 | eeconfig_update_keymap(data[0]); | 1257 | case DT_KEYMAP_OPTIONS: { |
| 1258 | eeconfig_update_keymap(data[2]); | ||
| 1259 | break; | ||
| 1260 | } | ||
| 1261 | case DT_RGBLIGHT: { | ||
| 1262 | #ifdef RGBLIGHT_ENABLE | ||
| 1263 | uint32_t rgblight = bytes_to_dword(data, 2); | ||
| 1264 | rgblight_update_dword(rgblight); | ||
| 1265 | #endif | ||
| 1205 | break; | 1266 | break; |
| 1267 | } | ||
| 1206 | } | 1268 | } |
| 1207 | break; | 1269 | case MT_GET_DATA: |
| 1208 | case 0x13: ; // Get info from keyboard | 1270 | switch (data[1]) { |
| 1209 | switch (*data++) { | 1271 | case DT_HANDSHAKE: { |
| 1210 | case 0x00: ; // Handshake | 1272 | MT_GET_DATA_ACK(DT_HANDSHAKE, NULL, 0); |
| 1211 | send_bytes_sysex(0x00, NULL, 0); | ||
| 1212 | break; | 1273 | break; |
| 1213 | case 0x01: ; // Get debug state | 1274 | } |
| 1275 | case DT_DEBUG: { | ||
| 1214 | uint8_t debug_bytes[1] = { eeprom_read_byte(EECONFIG_DEBUG) }; | 1276 | uint8_t debug_bytes[1] = { eeprom_read_byte(EECONFIG_DEBUG) }; |
| 1215 | send_bytes_sysex(0x01, debug_bytes, 1); | 1277 | MT_GET_DATA_ACK(DT_DEBUG, debug_bytes, 1); |
| 1216 | break; | 1278 | break; |
| 1217 | case 0x02: ; // Get default layer | 1279 | } |
| 1280 | case DT_DEFAULT_LAYER: { | ||
| 1218 | uint8_t default_bytes[1] = { eeprom_read_byte(EECONFIG_DEFAULT_LAYER) }; | 1281 | uint8_t default_bytes[1] = { eeprom_read_byte(EECONFIG_DEFAULT_LAYER) }; |
| 1219 | send_bytes_sysex(0x02, default_bytes, 1); | 1282 | MT_GET_DATA_ACK(DT_DEFAULT_LAYER, default_bytes, 1); |
| 1220 | break; | 1283 | break; |
| 1221 | #ifdef AUDIO_ENABLE | 1284 | } |
| 1222 | case 0x03: ; // Get backlight state | 1285 | case DT_CURRENT_LAYER: { |
| 1223 | uint8_t audio_bytes[1] = { eeprom_read_byte(EECONFIG_AUDIO) }; | ||
| 1224 | send_bytes_sysex(0x03, audio_bytes, 1); | ||
| 1225 | #endif | ||
| 1226 | case 0x04: ; // Get layer state | ||
| 1227 | uint8_t layer_state_bytes[4]; | 1286 | uint8_t layer_state_bytes[4]; |
| 1228 | dword_to_bytes(layer_state_bytes, layer_state); | 1287 | dword_to_bytes(layer_state, layer_state_bytes); |
| 1229 | send_bytes_sysex(0x04, layer_state_bytes, 4); | 1288 | MT_GET_DATA_ACK(DT_CURRENT_LAYER, layer_state_bytes, 4); |
| 1230 | break; | 1289 | break; |
| 1231 | #ifdef BACKLIGHT_ENABLE | 1290 | } |
| 1232 | case 0x06: ; // Get backlight state | 1291 | case DT_AUDIO: { |
| 1233 | uint8_t backlight_bytes[1] = { eeprom_read_byte(EECONFIG_BACKLIGHT) }; | 1292 | #ifdef AUDIO_ENABLE |
| 1234 | send_bytes_sysex(0x06, backlight_bytes, 1); | 1293 | uint8_t audio_bytes[1] = { eeprom_read_byte(EECONFIG_AUDIO) }; |
| 1235 | #endif | 1294 | MT_GET_DATA_ACK(DT_AUDIO, audio_bytes, 1); |
| 1236 | #ifdef RGBLIGHT_ENABLE | 1295 | #else |
| 1237 | case 0x07: ; // Get rgblight state | 1296 | MT_GET_DATA_ACK(DT_AUDIO, NULL, 0); |
| 1238 | uint8_t rgblight_bytes[4]; | 1297 | #endif |
| 1239 | dword_to_bytes(rgblight_bytes, eeprom_read_dword(EECONFIG_RGBLIGHT)); | ||
| 1240 | send_bytes_sysex(0x07, rgblight_bytes, 4); | ||
| 1241 | #endif | ||
| 1242 | case 0x08: ; // Keymap options | ||
| 1243 | uint8_t keymap_bytes[1] = { eeconfig_read_keymap() }; | ||
| 1244 | send_bytes_sysex(0x08, keymap_bytes, 1); | ||
| 1245 | break; | 1298 | break; |
| 1246 | } | 1299 | } |
| 1247 | break; | 1300 | case DT_BACKLIGHT: { |
| 1248 | #ifdef RGBLIGHT_ENABLE | 1301 | #ifdef BACKLIGHT_ENABLE |
| 1249 | case 0x27: ; // RGB LED functions | 1302 | uint8_t backlight_bytes[1] = { eeprom_read_byte(EECONFIG_BACKLIGHT) }; |
| 1250 | switch (*data++) { | 1303 | MT_GET_DATA_ACK(DT_BACKLIGHT, backlight_bytes, 1); |
| 1251 | case 0x00: ; // Update HSV | 1304 | #else |
| 1252 | rgblight_sethsv((data[0] << 8 | data[1]) % 360, data[2], data[3]); | 1305 | MT_GET_DATA_ACK(DT_BACKLIGHT, NULL, 0); |
| 1306 | #endif | ||
| 1253 | break; | 1307 | break; |
| 1254 | case 0x01: ; // Update RGB | 1308 | } |
| 1309 | case DT_RGBLIGHT: { | ||
| 1310 | #ifdef RGBLIGHT_ENABLE | ||
| 1311 | uint8_t rgblight_bytes[4]; | ||
| 1312 | dword_to_bytes(eeconfig_read_rgblight(), rgblight_bytes); | ||
| 1313 | MT_GET_DATA_ACK(DT_RGBLIGHT, rgblight_bytes, 4); | ||
| 1314 | #else | ||
| 1315 | MT_GET_DATA_ACK(DT_RGBLIGHT, NULL, 0) | ||
| 1316 | #endif | ||
| 1255 | break; | 1317 | break; |
| 1256 | case 0x02: ; // Update mode | 1318 | } |
| 1257 | rgblight_mode(data[0]); | 1319 | case DT_KEYMAP_OPTIONS: { |
| 1320 | uint8_t keymap_bytes[1] = { eeconfig_read_keymap() }; | ||
| 1321 | MT_GET_DATA_ACK(DT_KEYMAP_OPTIONS, keymap_bytes, 1); | ||
| 1322 | break; | ||
| 1323 | } | ||
| 1324 | default: | ||
| 1258 | break; | 1325 | break; |
| 1259 | } | 1326 | } |
| 1260 | break; | 1327 | break; |
| 1261 | #endif | 1328 | case MT_SET_DATA_ACK: |
| 1329 | case MT_GET_DATA_ACK: | ||
| 1330 | break; | ||
| 1331 | case MT_SEND_DATA: | ||
| 1332 | break; | ||
| 1333 | case MT_SEND_DATA_ACK: | ||
| 1334 | break; | ||
| 1335 | case MT_EXE_ACTION: | ||
| 1336 | break; | ||
| 1337 | case MT_EXE_ACTION_ACK: | ||
| 1338 | break; | ||
| 1339 | case MT_TYPE_ERROR: | ||
| 1340 | break; | ||
| 1341 | default: ; // command not recognised | ||
| 1342 | send_bytes_sysex(MT_TYPE_ERROR, DT_NONE, data, length); | ||
| 1343 | break; | ||
| 1344 | |||
| 1345 | // #ifdef RGBLIGHT_ENABLE | ||
| 1346 | // case 0x27: ; // RGB LED functions | ||
| 1347 | // switch (*data++) { | ||
| 1348 | // case 0x00: ; // Update HSV | ||
| 1349 | // rgblight_sethsv((data[0] << 8 | data[1]) % 360, data[2], data[3]); | ||
| 1350 | // break; | ||
| 1351 | // case 0x01: ; // Update RGB | ||
| 1352 | // break; | ||
| 1353 | // case 0x02: ; // Update mode | ||
| 1354 | // rgblight_mode(data[0]); | ||
| 1355 | // break; | ||
| 1356 | // } | ||
| 1357 | // break; | ||
| 1358 | // #endif | ||
| 1262 | } | 1359 | } |
| 1263 | 1360 | ||
| 1264 | } | 1361 | } |
| 1265 | 1362 | ||
| 1266 | void send_unicode_midi(uint32_t unicode) { | 1363 | void send_unicode_midi(uint32_t unicode) { |
| 1267 | uint8_t chunk[5]; | 1364 | uint8_t chunk[4]; |
| 1268 | encode_uint32_chunk(unicode, chunk); | 1365 | dword_to_bytes(unicode, chunk); |
| 1269 | send_bytes_sysex(0x05, chunk, 5); | 1366 | MT_SEND_DATA(DT_UNICODE, chunk, 5); |
| 1270 | } | 1367 | } |
| 1271 | 1368 | ||
| 1272 | void send_bytes_sysex(uint8_t type, uint8_t * bytes, uint8_t length) { | ||
| 1273 | // SEND_STRING("\nTX: "); | ||
| 1274 | // for (uint8_t i = 0; i < length; i++) { | ||
| 1275 | // send_byte(bytes[i]); | ||
| 1276 | // SEND_STRING(" "); | ||
| 1277 | // } | ||
| 1278 | uint8_t * precode = malloc(sizeof(uint8_t) * (length + 1)); | ||
| 1279 | precode[0] = type; | ||
| 1280 | memcpy(precode + 1, bytes, length); | ||
| 1281 | uint8_t * encoded = malloc(sizeof(uint8_t) * (sysex_encoded_length(length + 1))); | ||
| 1282 | uint16_t encoded_length = sysex_encode(encoded, precode, length + 1); | ||
| 1283 | uint8_t * array = malloc(sizeof(uint8_t) * (encoded_length + 5)); | ||
| 1284 | array[0] = 0xF0; | ||
| 1285 | array[1] = 0x00; | ||
| 1286 | array[2] = 0x00; | ||
| 1287 | array[3] = 0x00; | ||
| 1288 | array[encoded_length + 4] = 0xF7; | ||
| 1289 | memcpy(array + 4, encoded, encoded_length); | ||
| 1290 | midi_send_array(&midi_device, encoded_length + 5, array); | ||
| 1291 | |||
| 1292 | // SEND_STRING("\nTD: "); | ||
| 1293 | // for (uint8_t i = 0; i < encoded_length + 5; i++) { | ||
| 1294 | // send_byte(array[i]); | ||
| 1295 | // SEND_STRING(" "); | ||
| 1296 | // } | ||
| 1297 | } | ||
| 1298 | 1369 | ||
| 1299 | #endif | 1370 | #endif |
diff --git a/tmk_core/protocol/lufa/lufa.h b/tmk_core/protocol/lufa/lufa.h index 198964f90..99b089f42 100644 --- a/tmk_core/protocol/lufa/lufa.h +++ b/tmk_core/protocol/lufa/lufa.h | |||
| @@ -73,13 +73,19 @@ typedef struct { | |||
| 73 | MidiDevice midi_device; | 73 | MidiDevice midi_device; |
| 74 | 74 | ||
| 75 | void sysex_callback(MidiDevice * device, uint16_t start, uint8_t length, uint8_t * data); | 75 | void sysex_callback(MidiDevice * device, uint16_t start, uint8_t length, uint8_t * data); |
| 76 | uint32_t decode_uint32_chunk(uint8_t * data); | ||
| 77 | uint32_t decode_uint8_chunk(uint8_t * data); | ||
| 78 | void encode_uint32_chunk(uint32_t data, uint8_t * pointer); | ||
| 79 | void encode_uint8_chunk(uint8_t data, uint8_t * pointer); | ||
| 80 | void sysex_buffer_callback(MidiDevice * device, uint8_t length, uint8_t * data); | 76 | void sysex_buffer_callback(MidiDevice * device, uint8_t length, uint8_t * data); |
| 81 | void send_unicode_midi(uint32_t unicode); | 77 | void send_unicode_midi(uint32_t unicode); |
| 82 | void send_bytes_sysex(uint8_t type, uint8_t * bytes, uint8_t length); | 78 | void send_bytes_sysex(uint8_t message_type, uint8_t data_type, uint8_t * bytes, uint8_t length); |
| 79 | |||
| 80 | __attribute__ ((weak)) | ||
| 81 | bool sysex_process_quantum(uint8_t length, uint8_t * data); | ||
| 82 | |||
| 83 | __attribute__ ((weak)) | ||
| 84 | bool sysex_process_keyboard(uint8_t length, uint8_t * data); | ||
| 85 | |||
| 86 | __attribute__ ((weak)) | ||
| 87 | bool sysex_process_user(uint8_t length, uint8_t * data); | ||
| 88 | |||
| 83 | #endif | 89 | #endif |
| 84 | 90 | ||
| 85 | // #if LUFA_VERSION_INTEGER < 0x120730 | 91 | // #if LUFA_VERSION_INTEGER < 0x120730 |
