@@ -178,18 +178,6 @@ const unsigned char LIBMK_LAYOUT[2][3][LIBMK_MAX_ROWS][LIBMK_MAX_COLS] = {
178178};
179179
180180
181- const char * LIBMK_MODEL_STRINGS [] = {
182- "MasterKeys Pro L RGB" , // 0
183- "MasterKeys Pro S RGB" , // 1
184- "MasterKeys Pro L White" , // 2
185- "MasterKeys Pro M White" , // 3
186- "Unknown Model" , // 4
187- "MasterKeys Pro M RGB" , // 5
188- "Unknown Model" , // 6
189- "MasterKeys Pro S White" ,
190- };
191-
192-
193181bool libmk_init (void ) {
194182 int result = libusb_init (& Context );
195183#ifdef LIBMK_USB_DEBUG
@@ -472,9 +460,9 @@ int libmk_enable_control(LibMK_Handle* handle) {
472460
473461
474462int libmk_send_control_packet (LibMK_Handle * handle ) {
475- r = libmk_set_control_mode (handle , LIBMK_CUSTOM_CTRL );
463+ int r = libmk_set_control_mode (handle , LIBMK_CUSTOM_CTRL );
476464 if (r != LIBMK_SUCCESS )
477- return LIBMK_ERR_SEND ;
465+ return r ;
478466 LibMK_Firmware * fw ;
479467 r = libmk_get_firmware_version (handle , & fw );
480468 if (r != LIBMK_SUCCESS ) {
@@ -565,40 +553,16 @@ int libmk_set_full_color(LibMK_Handle* handle,
565553
566554
567555int libmk_send_packet (LibMK_Handle * handle , unsigned char * packet ) {
568- <<<<<<< HEAD
569- == = == ==
570- /** Send a single packet of data to the specified device
571- *
572- * Calls libmk_send_recv_packet but instructs it not to care about
573- * receiving a response.
574- */
575556 return libmk_send_recv_packet (handle , packet , true);
576557}
577558
578559
579560int libmk_send_recv_packet (
580561 LibMK_Handle * handle , unsigned char * packet , bool response_required ) {
581- /** Send a single packet of data to the specified device
582- *
583- * The device operates in INTERRUPT mode, expects 64 bytes of data
584- * every time. First sends the packet to the device OUT endpoint,
585- * then reads a packet from the device IN endpoint. If the packet
586- * was correctly formatted, this received packet has the same header
587- * as the packet sent. If the header is HEADER_ERROR, then a
588- * protocol error has occurred and the packet was rejected.
589- *
590- * response_required: Boolean argument that determines whether an
591- * acknowledgement packet is required from the keyboard. Nearly
592- * all operations yield a confirmation packet, but some do not. If
593- * it is not required, the function will still attempt to retrieve
594- * a response, but not care if it is not available.
595- */
596562 if (handle == NULL )
597563 handle = DeviceHandle ;
598564 if (handle == NULL )
599565 return LIBMK_ERR_DEV_NOT_SET ;
600-
601- >>>>>>> 748 c903 ... Fix errors during profile control
602566 int t , result ;
603567 int r = libusb_interrupt_transfer (
604568 handle -> handle , LIBMK_EP_OUT | LIBUSB_ENDPOINT_OUT ,
0 commit comments