mirror of
				https://github.com/mfulz/qmk_firmware.git
				synced 2025-10-31 13:22:31 +01:00 
			
		
		
		
	travis pls
This commit is contained in:
		
							parent
							
								
									2e23689b8e
								
							
						
					
					
						commit
						cefa8468fb
					
				| @ -63,6 +63,8 @@ VISUALIZER_ENABLE ?= no #temporarily disabled to make everything compile | |||||||
| LCD_ENABLE ?= yes | LCD_ENABLE ?= yes | ||||||
| LED_ENABLE ?= yes | LED_ENABLE ?= yes | ||||||
| LCD_BACKLIGHT_ENABLE ?= yes | LCD_BACKLIGHT_ENABLE ?= yes | ||||||
|  | MIDI_ENABLE = no | ||||||
|  | RGBLIGHT_ENABLE = no | ||||||
| 
 | 
 | ||||||
| ifndef QUANTUM_DIR | ifndef QUANTUM_DIR | ||||||
| 	include ../../../Makefile | 	include ../../../Makefile | ||||||
|  | |||||||
| @ -1,5 +1,5 @@ | |||||||
| RGBLIGHT_ENABLE = yes | RGBLIGHT_ENABLE ?= yes | ||||||
| MIDI_ENABLE = yes | MIDI_ENABLE ?= yes | ||||||
| 
 | 
 | ||||||
| ifndef QUANTUM_DIR | ifndef QUANTUM_DIR | ||||||
| 	include ../../../../Makefile | 	include ../../../../Makefile | ||||||
|  | |||||||
| @ -847,8 +847,13 @@ void send_nibble(uint8_t number) { | |||||||
|     } |     } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| 
 | void send_unicode_midi(uint32_t unicode) { | ||||||
| 
 |   #ifdef MIDI_ENABLE | ||||||
|  |     uint8_t chunk[4]; | ||||||
|  |     dword_to_bytes(unicode, chunk); | ||||||
|  |     MT_SEND_DATA(DT_UNICODE, chunk, 5); | ||||||
|  |   #endif | ||||||
|  | } | ||||||
| 
 | 
 | ||||||
| __attribute__ ((weak)) | __attribute__ ((weak)) | ||||||
| void led_set_user(uint8_t usb_led) { | void led_set_user(uint8_t usb_led) { | ||||||
|  | |||||||
| @ -119,4 +119,6 @@ void send_nibble(uint8_t number); | |||||||
| void led_set_user(uint8_t usb_led); | void led_set_user(uint8_t usb_led); | ||||||
| void led_set_kb(uint8_t usb_led); | void led_set_kb(uint8_t usb_led); | ||||||
| 
 | 
 | ||||||
|  | void send_unicode_midi(uint32_t unicode); | ||||||
|  | 
 | ||||||
| #endif | #endif | ||||||
|  | |||||||
| @ -72,7 +72,7 @@ | |||||||
|     #include "virtser.h" |     #include "virtser.h" | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
| #ifdef RGB_MIDI | #if (defined(RGB_MIDI) | defined(RGBLIGHT_ANIMATIONS)) & defined(RGBLIGHT_ENABLE) | ||||||
|     #include "rgblight.h"         |     #include "rgblight.h"         | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
| @ -1156,35 +1156,6 @@ uint32_t bytes_to_dword(uint8_t * bytes, uint8_t index) { | |||||||
|     return ((uint32_t)bytes[index + 0] << 24) | ((uint32_t)bytes[index + 1] << 16) | ((uint32_t)bytes[index + 2] << 8) | (uint32_t)bytes[index + 3]; |     return ((uint32_t)bytes[index + 0] << 24) | ((uint32_t)bytes[index + 1] << 16) | ((uint32_t)bytes[index + 2] << 8) | (uint32_t)bytes[index + 3]; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| enum MESSAGE_TYPE { |  | ||||||
|     MT_GET_DATA =      0x10, // Get data from keyboard
 |  | ||||||
|     MT_GET_DATA_ACK =  0x11, // returned data to process (ACK)
 |  | ||||||
|     MT_SET_DATA =      0x20, // Set data on keyboard
 |  | ||||||
|     MT_SET_DATA_ACK =  0x21, // returned data to confirm (ACK)
 |  | ||||||
|     MT_SEND_DATA =     0x30, // Sending data/action from keyboard
 |  | ||||||
|     MT_SEND_DATA_ACK = 0x31, // returned data/action confirmation (ACK)
 |  | ||||||
|     MT_EXE_ACTION =    0x40, // executing actions on keyboard
 |  | ||||||
|     MT_EXE_ACTION_ACK =0x41, // return confirmation/value (ACK)
 |  | ||||||
|     MT_TYPE_ERROR =    0x80 // type not recofgnised (ACK)
 |  | ||||||
| }; |  | ||||||
| 
 |  | ||||||
| enum DATA_TYPE { |  | ||||||
|     DT_NONE = 0x00, |  | ||||||
|     DT_HANDSHAKE, |  | ||||||
|     DT_DEFAULT_LAYER, |  | ||||||
|     DT_CURRENT_LAYER, |  | ||||||
|     DT_KEYMAP_OPTIONS, |  | ||||||
|     DT_BACKLIGHT, |  | ||||||
|     DT_RGBLIGHT, |  | ||||||
|     DT_UNICODE, |  | ||||||
|     DT_DEBUG, |  | ||||||
|     DT_AUDIO, |  | ||||||
|     DT_QUANTUM_ACTION, |  | ||||||
|     DT_KEYBOARD_ACTION, |  | ||||||
|     DT_USER_ACTION, |  | ||||||
| 
 |  | ||||||
| }; |  | ||||||
| 
 |  | ||||||
| void send_bytes_sysex(uint8_t message_type, uint8_t data_type, uint8_t * bytes, uint8_t length) { | void send_bytes_sysex(uint8_t message_type, uint8_t data_type, uint8_t * bytes, uint8_t length) { | ||||||
|     // SEND_STRING("\nTX: ");
 |     // SEND_STRING("\nTX: ");
 | ||||||
|     // for (uint8_t i = 0; i < length; i++) {
 |     // for (uint8_t i = 0; i < length; i++) {
 | ||||||
| @ -1213,15 +1184,6 @@ void send_bytes_sysex(uint8_t message_type, uint8_t data_type, uint8_t * bytes, | |||||||
|     // }
 |     // }
 | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| #define MT_GET_DATA(data_type, data, length) send_bytes_sysex(MT_GET_DATA, data_type, data, length) |  | ||||||
| #define MT_GET_DATA_ACK(data_type, data, length) send_bytes_sysex(MT_GET_DATA_ACK, data_type, data, length) |  | ||||||
| #define MT_SET_DATA(data_type, data, length) send_bytes_sysex(MT_SET_DATA, data_type, data, length) |  | ||||||
| #define MT_SET_DATA_ACK(data_type, data, length) send_bytes_sysex(MT_SET_DATA_ACK, data_type, data, length) |  | ||||||
| #define MT_SEND_DATA(data_type, data, length) send_bytes_sysex(MT_SEND_DATA, data_type, data, length) |  | ||||||
| #define MT_SEND_DATA_ACK(data_type, data, length) send_bytes_sysex(MT_SEND_DATA_ACK, data_type, data, length) |  | ||||||
| #define MT_EXE_ACTION(data_type, data, length) send_bytes_sysex(MT_EXE_ACTION, data_type, data, length) |  | ||||||
| #define MT_EXE_ACTION_ACK(data_type, data, length) send_bytes_sysex(MT_EXE_ACTION_ACK, data_type, data, length) |  | ||||||
| 
 |  | ||||||
| __attribute__ ((weak)) | __attribute__ ((weak)) | ||||||
| bool sysex_process_quantum(uint8_t length, uint8_t * data) { | bool sysex_process_quantum(uint8_t length, uint8_t * data) { | ||||||
|     return sysex_process_keyboard(length, data); |     return sysex_process_keyboard(length, data); | ||||||
| @ -1312,7 +1274,7 @@ void sysex_buffer_callback(MidiDevice * device, uint8_t length, uint8_t * data) | |||||||
|                         dword_to_bytes(eeconfig_read_rgblight(), rgblight_bytes); |                         dword_to_bytes(eeconfig_read_rgblight(), rgblight_bytes); | ||||||
|                         MT_GET_DATA_ACK(DT_RGBLIGHT, rgblight_bytes, 4); |                         MT_GET_DATA_ACK(DT_RGBLIGHT, rgblight_bytes, 4); | ||||||
|                     #else |                     #else | ||||||
|                         MT_GET_DATA_ACK(DT_RGBLIGHT, NULL, 0) |                         MT_GET_DATA_ACK(DT_RGBLIGHT, NULL, 0); | ||||||
|                     #endif |                     #endif | ||||||
|                     break; |                     break; | ||||||
|                 } |                 } | ||||||
| @ -1360,11 +1322,4 @@ void sysex_buffer_callback(MidiDevice * device, uint8_t length, uint8_t * data) | |||||||
| 
 | 
 | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void send_unicode_midi(uint32_t unicode) { |  | ||||||
|     uint8_t chunk[4]; |  | ||||||
|     dword_to_bytes(unicode, chunk); |  | ||||||
|     MT_SEND_DATA(DT_UNICODE, chunk, 5); |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| #endif | #endif | ||||||
|  | |||||||
| @ -74,8 +74,9 @@ typedef struct { | |||||||
| 
 | 
 | ||||||
|   void sysex_callback(MidiDevice * device, uint16_t start, uint8_t length, uint8_t * data); |   void sysex_callback(MidiDevice * device, uint16_t start, uint8_t length, uint8_t * data); | ||||||
|   void sysex_buffer_callback(MidiDevice * device, uint8_t length, uint8_t * data); |   void sysex_buffer_callback(MidiDevice * device, uint8_t length, uint8_t * data); | ||||||
|   void send_unicode_midi(uint32_t unicode); |  | ||||||
|   void send_bytes_sysex(uint8_t message_type, uint8_t data_type, uint8_t * bytes, uint8_t length); |   void send_bytes_sysex(uint8_t message_type, uint8_t data_type, uint8_t * bytes, uint8_t length); | ||||||
|  |   void dword_to_bytes(uint32_t dword, uint8_t * bytes); | ||||||
|  |   uint32_t bytes_to_dword(uint8_t * bytes, uint8_t index); | ||||||
| 
 | 
 | ||||||
|   __attribute__ ((weak)) |   __attribute__ ((weak)) | ||||||
|   bool sysex_process_quantum(uint8_t length, uint8_t * data); |   bool sysex_process_quantum(uint8_t length, uint8_t * data); | ||||||
| @ -86,6 +87,45 @@ typedef struct { | |||||||
|   __attribute__ ((weak)) |   __attribute__ ((weak)) | ||||||
|   bool sysex_process_user(uint8_t length, uint8_t * data); |   bool sysex_process_user(uint8_t length, uint8_t * data); | ||||||
| 
 | 
 | ||||||
|  |   enum MESSAGE_TYPE { | ||||||
|  |       MT_GET_DATA =      0x10, // Get data from keyboard
 | ||||||
|  |       MT_GET_DATA_ACK =  0x11, // returned data to process (ACK)
 | ||||||
|  |       MT_SET_DATA =      0x20, // Set data on keyboard
 | ||||||
|  |       MT_SET_DATA_ACK =  0x21, // returned data to confirm (ACK)
 | ||||||
|  |       MT_SEND_DATA =     0x30, // Sending data/action from keyboard
 | ||||||
|  |       MT_SEND_DATA_ACK = 0x31, // returned data/action confirmation (ACK)
 | ||||||
|  |       MT_EXE_ACTION =    0x40, // executing actions on keyboard
 | ||||||
|  |       MT_EXE_ACTION_ACK =0x41, // return confirmation/value (ACK)
 | ||||||
|  |       MT_TYPE_ERROR =    0x80 // type not recofgnised (ACK)
 | ||||||
|  |   }; | ||||||
|  | 
 | ||||||
|  |   enum DATA_TYPE { | ||||||
|  |       DT_NONE = 0x00, | ||||||
|  |       DT_HANDSHAKE, | ||||||
|  |       DT_DEFAULT_LAYER, | ||||||
|  |       DT_CURRENT_LAYER, | ||||||
|  |       DT_KEYMAP_OPTIONS, | ||||||
|  |       DT_BACKLIGHT, | ||||||
|  |       DT_RGBLIGHT, | ||||||
|  |       DT_UNICODE, | ||||||
|  |       DT_DEBUG, | ||||||
|  |       DT_AUDIO, | ||||||
|  |       DT_QUANTUM_ACTION, | ||||||
|  |       DT_KEYBOARD_ACTION, | ||||||
|  |       DT_USER_ACTION, | ||||||
|  | 
 | ||||||
|  |   }; | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |   #define MT_GET_DATA(data_type, data, length) send_bytes_sysex(MT_GET_DATA, data_type, data, length) | ||||||
|  |   #define MT_GET_DATA_ACK(data_type, data, length) send_bytes_sysex(MT_GET_DATA_ACK, data_type, data, length) | ||||||
|  |   #define MT_SET_DATA(data_type, data, length) send_bytes_sysex(MT_SET_DATA, data_type, data, length) | ||||||
|  |   #define MT_SET_DATA_ACK(data_type, data, length) send_bytes_sysex(MT_SET_DATA_ACK, data_type, data, length) | ||||||
|  |   #define MT_SEND_DATA(data_type, data, length) send_bytes_sysex(MT_SEND_DATA, data_type, data, length) | ||||||
|  |   #define MT_SEND_DATA_ACK(data_type, data, length) send_bytes_sysex(MT_SEND_DATA_ACK, data_type, data, length) | ||||||
|  |   #define MT_EXE_ACTION(data_type, data, length) send_bytes_sysex(MT_EXE_ACTION, data_type, data, length) | ||||||
|  |   #define MT_EXE_ACTION_ACK(data_type, data, length) send_bytes_sysex(MT_EXE_ACTION_ACK, data_type, data, length) | ||||||
|  | 
 | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
| // #if LUFA_VERSION_INTEGER < 0x120730
 | // #if LUFA_VERSION_INTEGER < 0x120730
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Jack Humbert
						Jack Humbert