diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..4744464 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,91 @@ +version: 2.1 + +orbs: + win: circleci/windows@1.0.0 + +workflows: + version: 2 + builds: + jobs: + - build-linux: + filters: # required since `deploy` has tag filters AND requires `build` + tags: + only: /.*/ + - build-windows: + filters: # required since `deploy` has tag filters AND requires `build` + tags: + only: /.*/ + #- build-mac: + # filters: # required since `deploy` has tag filters AND requires `build` + # tags: + # only: /.*/ + +jobs: + build-linux: + working_directory: ~/ykush + docker: + - image: gcc + steps: + - checkout + - run: + name: install deps + command: | + apt update + apt install -y libusb-1.0-0 libusb-1.0-0-dev + - run: + name: build + command: | + make + bin/ykushcmd -h + - store_artifacts: + path: bin/ykushcmd + destination: bin/linux/ykushcmd + build-windows: + executor: + name: win/vs2019 + shell: powershell.exe + working_directory: ~/ykush + steps: + - checkout + - run: + name: "Install deps" + command: choco install mingw make + - run: + name: "Build 64" + command: | + make -f Makefile_win64 + bin/Win64/ykushcmd_win64.exe -h + - store_artifacts: + path: bin/Win64/libhidapi.dll + destination: bin/win64/libhidapi.dll + - store_artifacts: + path: bin/Win64/ykushcmd_win64.exe + destination: bin/win64/ykushcmd.exe + # should install mingw32 + #- run: + # name: "Build 32" + # command: | + # make -f Makefile_win32 + # bin/Win32/ykushcmd_win32.exe -h + #- store_artifacts: + # path: bin/Win32/libhidapi.dll + # destination: bin/win32/libhidapi.dll + #- store_artifacts: + # path: bin/Win32/ykushcmd_win32.exe + # destination: bin/win32/ykushcmd.exe + #build-mac: + # macos: # indicate that we are using the macOS executor + # xcode: "10.0.0" # indicate our selected version of Xcode + # steps: + # - checkout + # - run: + # name: install deps + # command: brew install gcc make libhid + # - run: + # name: build + # command: | + # make + # bin/ykushcmd -h + # - store_artifacts: + # path: bin/ykushcmd + # destination: bin/macos/ykushcmd diff --git a/Makefile b/Makefile index 501f1d2..4b6fd85 100644 --- a/Makefile +++ b/Makefile @@ -19,14 +19,14 @@ PROG_OBJ = $(PROG_SOURCE_FULL:.cpp=.o) DEFINES += _LINUX_ DEFINES += _LIBUSB_ -COMPILE_FLAGS += $(addprefix -D, $(DEFINES)) +COMPILE_FLAGS += $(addprefix -D, $(DEFINES)) -Werror CUR_PATH = $(shell echo $(PWD)) INCLUDEPATHS = $(addprefix -I$(CUR_PATH)/, $(dir $(SOURCE_FULL)) libusb ) -LOADPATHS = +LOADPATHS = LIBS = -lusb-1.0 CPP = g++ - + ykushcmd : $(PROG_OBJ) $(OBJS) @@ -40,5 +40,5 @@ $(OBJS) : %.o : %.cpp %.h clean : - rm -f bin/yktrl $(OBJS) $(PROG_OBJ) + rm -f bin/ykushcmd $(OBJS) $(PROG_OBJ) diff --git a/Makefile_win32 b/Makefile_win32 index ddc252d..18775f1 100644 --- a/Makefile_win32 +++ b/Makefile_win32 @@ -23,8 +23,8 @@ FLAGS = -static-libgcc -static-libstdc++ #Change MinGW exec name to match version instaled in your system CPP = i686-w64-mingw32-g++ -#CPP_WIN32 = i686-w64-mingw32-g++ -#CPP_WIN64 = x86_64-w64-mingw32-g++ +#CPP_WIN32 = i686-w64-mingw32-g++ +#CPP_WIN64 = x86_64-w64-mingw32-g++ ykushcmd_win32.exe : $(PROG_OBJ) $(OBJS) @@ -38,5 +38,5 @@ $(OBJS) : %.o : %.cpp %.h clean : - rm -f bin/Win32/yktrl_win32.exe $(OBJS) $(PROG_OBJ) + rm -f bin/Win32/ykushcmd_win32.exe $(OBJS) $(PROG_OBJ) diff --git a/Makefile_win64 b/Makefile_win64 index c9a644f..67f2e6e 100644 --- a/Makefile_win64 +++ b/Makefile_win64 @@ -17,18 +17,18 @@ PROG_OBJ = $(PROG_SOURCE_FULL:.cpp=.o) CUR_PATH = $(CURDIR) INCLUDEPATHS = $(addprefix -I$(CUR_PATH)/, $(dir $(SOURCE_FULL)) hidapi ) -LOADPATHS = -L$(CUR_PATH)/hidapi/mingw32 +LOADPATHS = -L$(CUR_PATH)/hidapi/mingw64 LIBS = -lhidapi FLAGS = -static-libgcc -static-libstdc++ #Change MinGW exec name to match version instaled in your system CPP = x86_64-w64-mingw32-g++ -#CPP_WIN32 = i686-w64-mingw32-g++ -#CPP_WIN64 = x86_64-w64-mingw32-g++ +#CPP_WIN32 = i686-w64-mingw32-g++ +#CPP_WIN64 = x86_64-w64-mingw32-g++ ykushcmd_win64.exe : $(PROG_OBJ) $(OBJS) - $(CPP) $(FLAGS) $(LOADPATHS) -o bin/Win32/$@ $(PROG_OBJ) $(OBJS) $(LIBS) + $(CPP) $(FLAGS) $(LOADPATHS) -o bin/Win64/$@ $(PROG_OBJ) $(OBJS) $(LIBS) $(PROG_OBJ) : %.o : %.cpp $(CPP) $(FLAGS) $(PREPROCESSOR_DEFS) $(INCLUDEPATHS) -c $< -o $@ @@ -38,5 +38,5 @@ $(OBJS) : %.o : %.cpp %.h clean : - rm -f bin/Win64/yktrl_win32.exe $(OBJS) $(PROG_OBJ) + rm -f bin/Win64/ykushcmd_win64.exe $(OBJS) $(PROG_OBJ) diff --git a/libusb/libusb.h b/libusb/libusb.h index 8a6b0bf..45cb85b 100644 --- a/libusb/libusb.h +++ b/libusb/libusb.h @@ -1274,7 +1274,7 @@ enum libusb_capability { * still have to call additional libusb functions such as * \ref libusb_detach_kernel_driver(). */ LIBUSB_CAP_HAS_HID_ACCESS = 0x0100, - /** The library supports detaching of the default USB driver, using + /** The library supports detaching of the default USB driver, using * \ref libusb_detach_kernel_driver(), if one is set by the OS kernel */ LIBUSB_CAP_SUPPORTS_DETACH_KERNEL_DRIVER = 0x0101 }; diff --git a/src/commandParser.cpp b/src/commandParser.cpp index 6827eab..64edf9e 100644 --- a/src/commandParser.cpp +++ b/src/commandParser.cpp @@ -70,18 +70,18 @@ enum Board { }; -int commandParser(int argc, char** argv) -{ - Help help(argv[0]); +int commandParser(int argc, char** argv) +{ + Help help(argv[0]); std::string str_ykush ("ykush"); std::string str_ykush3 ("ykush3"); std::string str_ykush2 ("ykush2"); std::string str_ykushxs ("ykushxs"); if ( argc <= 1) { - help.print_all(); + help.print_all(); return 0; - } + } //Parse input options and define action if( argc >= 2) { @@ -101,14 +101,12 @@ int commandParser(int argc, char** argv) return ykush_cmd_parser(argc - 1 , &argv[1]); else help.print_all(); - return -1; } else { //YKUSH return ykush_cmd_parser(argc, argv); } } - return 0; } diff --git a/src/yk_usb_device.cpp b/src/yk_usb_device.cpp index 9c3a57b..9c0ba00 100644 --- a/src/yk_usb_device.cpp +++ b/src/yk_usb_device.cpp @@ -29,7 +29,7 @@ limitations under the License. #ifdef _LIBUSB_ // Uses libusb directly -int UsbDevice::listConnected() +int UsbDevice::listConnected() { UsbHid *usbhid = new UsbHid(); struct hid_device_info *devs, *cur_dev; @@ -52,12 +52,12 @@ int UsbDevice::listConnected() } #else // Uses hidapi -int UsbDevice::listConnected() +int UsbDevice::listConnected() { int i=0; struct hid_device_info *devs, *cur_dev; - + devs = hid_enumerate(vid, pid); if (devs == NULL) return 0; @@ -65,10 +65,10 @@ int UsbDevice::listConnected() cur_dev = devs; while (cur_dev) { i++; - printf("%d. Board found with serial number: %ls\n", i, cur_dev->serial_number); + printf("%d. Board found with serial number: %ls\n", i, cur_dev->serial_number); cur_dev = cur_dev->next; } - + hid_free_enumeration(devs); return i; @@ -78,16 +78,17 @@ int UsbDevice::listConnected() UsbDevice::UsbDevice(unsigned int vendor_id, unsigned int product_id) { pid = product_id; vid = vendor_id; + usb_serial = NULL; } /** - * Sends HID report with the data provided in the input buffer "msg". + * Sends HID report with the data provided in the input buffer "msg". * * \param [in] serial Pointer to a char array containing the serial number. * \param [in] msg Pointer to buffer containing the HID report message to be sent to USB device. * \param [out] resp_msg Pointer to buffer to which the HID report message replied by the device. - * + * * \retval 0 No error. * \retval -1 Unable to open USB device. * \retval -2 Unable to write HID report to USB device. @@ -98,17 +99,17 @@ UsbDevice::UsbDevice(unsigned int vendor_id, unsigned int product_id) { * output. * * - * Precedences: + * Precedences: * * Requires that VENDOR_ID and PRODUCT_ID constants are defined. * * *****************************************************************/ #ifdef _LIBUSB_ -int UsbDevice::sendHidReport(char *serial, unsigned char *msg, unsigned char *resp_msg, int report_size) +int UsbDevice::sendHidReport(char *serial, unsigned char *msg, unsigned char *resp_msg, int report_size) { UsbHid *usbhid = new UsbHid(); - int res; + int res; res = usbhid->open(vid, pid, serial); if (res < 0) { @@ -133,8 +134,8 @@ int UsbDevice::sendHidReport(char *serial, unsigned char *msg, unsigned char *re return 0; } #else -int UsbDevice::sendHidReport(char *serial, unsigned char *msg, unsigned char *resp_msg, int report_size) -{ +int UsbDevice::sendHidReport(char *serial, unsigned char *msg, unsigned char *resp_msg, int report_size) +{ const size_t newsize = 100; wchar_t cserial[newsize]; int res, i; @@ -144,13 +145,13 @@ int UsbDevice::sendHidReport(char *serial, unsigned char *msg, unsigned char *re if (report_size <= 64) { out_buf[0] = 0; for (i = 0; i < report_size; i++) { - out_buf[i+1] = msg[i]; + out_buf[i+1] = msg[i]; } } else { std::cout << "Invalid report size\n"; return -1; } - + if (serial) { // Convert to a wchar_t* size_t origsize = strlen(serial) + 1; @@ -160,9 +161,9 @@ int UsbDevice::sendHidReport(char *serial, unsigned char *msg, unsigned char *re } - // Open the USB device + // Open the USB device handle = hid_open(vid, pid, serial ? cserial : NULL); - + if (handle == NULL) { //printf("\n\nERROR: Unable to open USB device\n"); return -1; @@ -188,7 +189,7 @@ int UsbDevice::sendHidReport(char *serial, unsigned char *msg, unsigned char *re resp_msg[i] = in_buf[i]; } - return 0; + return 0; } #endif diff --git a/src/yk_usb_device.h b/src/yk_usb_device.h index a689111..9312704 100644 --- a/src/yk_usb_device.h +++ b/src/yk_usb_device.h @@ -33,7 +33,7 @@ limitations under the License. /** * \ingroup yepkit_usb_device_handler - * + * * \brief Handles the USB HID for a given PID and VID. */ class UsbDevice { @@ -45,15 +45,15 @@ class UsbDevice { /** * Prints to standard output the list of connected devices with PID a VID provided in the class constructor. - * + * * \return Number of attached devices. */ int listConnected(void); //List connected devices private: - unsigned short vid; - unsigned short pid; + unsigned short vid; + unsigned short pid; #ifndef _LIBUSB_ hid_device *handle; #endif @@ -62,12 +62,12 @@ class UsbDevice { unsigned char hid_report_out[64]; unsigned char hid_report_in[64]; - char *usb_serial = NULL; + char *usb_serial; }; /***************************************************************** - * Function: + * Function: * * send_usb_msg * @@ -75,7 +75,7 @@ class UsbDevice { * Description: * * Sends HID report with the data provided in the input buffer - * "msg". + * "msg". * * * Inputs: @@ -97,13 +97,13 @@ class UsbDevice { * output. * * - * Precedences: + * Precedences: * * Requires that VENDOR_ID and PRODUCT_ID constants are defined. * * *****************************************************************/ -int send_usb_msg(char *serial, char *msg, char *resp_msg); +int send_usb_msg(char *serial, char *msg, char *resp_msg); char commands(char *cmd, char *resp, int num); char command(char cmd); char commandsBySerial(char *iSerial, char *cmd, char *resp, int num); diff --git a/src/ykush/ykush.cpp b/src/ykush/ykush.cpp index b78e2b6..e31a2d6 100644 --- a/src/ykush/ykush.cpp +++ b/src/ykush/ykush.cpp @@ -31,7 +31,10 @@ int ykush_cmd_parser(int argc, char** argv) char port; char status_response = 0; - + if((argv[1][0]=='-') && (argv[1][1]=='h')) { + ykush.print_help(argv[0]); + return 0; + } if((argv[1][0]=='-') && (argv[1][1]=='s')) { if(argc < 5) { ykush.print_help(argv[0]); @@ -109,7 +112,7 @@ int ykush_cmd_parser(int argc, char** argv) break; case YKUSH_LIST_BOARDS: - return ykush_list_attached(); + return ykush_list_attached(); break; case YKUSH_GET_STATUS: @@ -127,31 +130,30 @@ int ykush_cmd_parser(int argc, char** argv) } else { printf("\n\nDownstream port %d is OFF\n\n", status_response & 0x0F); } - } + } break; default: ykush.print_help(argv[0]); return -1; - break; } return 0; } int Ykush::port_up(char *serial, char port) -{ +{ switch(port) { case '1': hid_report_out[0] = 0x11; break; - case '2': + case '2': hid_report_out[0] = 0x12; break; - case '3': + case '3': hid_report_out[0] = 0x13; break; - case 'a': + case 'a': hid_report_out[0] = 0x1a; break; default: @@ -168,7 +170,7 @@ int Ykush::port_up(char *serial, char port) if ( res < 1 ) return res; - + if ( hid_report_in[0] == 0x01 ) return 0; return -1; @@ -182,13 +184,13 @@ int Ykush::port_down(char *serial, char port) case '1': hid_report_out[0] = 0x01; break; - case '2': + case '2': hid_report_out[0] = 0x02; break; - case '3': + case '3': hid_report_out[0] = 0x03; break; - case 'a': + case 'a': hid_report_out[0] = 0x0a; break; default: @@ -196,7 +198,7 @@ int Ykush::port_down(char *serial, char port) break; } - + int res; if(is_legacy) res = sendHidReport(serial, hid_report_out, hid_report_in, 6); @@ -205,7 +207,7 @@ int Ykush::port_down(char *serial, char port) if ( res < 1 ) return res; - + if ( hid_report_in[0] == 0x01 ) return 0; return -1; @@ -219,17 +221,17 @@ int Ykush::get_port_status(char *serial, char port) case '1': hid_report_out[0] = 0x21; break; - case '2': + case '2': hid_report_out[0] = 0x22; break; - case '3': + case '3': hid_report_out[0] = 0x23; break; default: return -1; break; } - + int res; if(is_legacy) res = sendHidReport(serial, hid_report_out, hid_report_in, 6); @@ -251,7 +253,7 @@ int ykush_list_attached() Ykush ykush( 0xF2F7 ); Ykush ykushLegacy( 0x0042 ); - printf("\nAttached YKUSH Boards:\n"); + printf("\nAttached YKUSH Boards:\n"); if( ykush.listConnected() == 0 ) { if( ykushLegacy.listConnected() == 0 ) { printf("\nNo YKUSH boards found."); diff --git a/src/ykush3/ykush3.cpp b/src/ykush3/ykush3.cpp index 06b11a4..a3706ad 100644 --- a/src/ykush3/ykush3.cpp +++ b/src/ykush3/ykush3.cpp @@ -381,38 +381,34 @@ ykush3_cmd_parser (int argc, char** argv) } - - int Ykush3::port_up(char *serial, char port) -{ +{ switch(port) { case '1': hid_report_out[0] = 0x11; break; - case '2': + case '2': hid_report_out[0] = 0x12; break; - - case '3': + + case '3': hid_report_out[0] = 0x13; break; - case 'a': + case 'a': hid_report_out[0] = 0x1a; break; - case '4': + case '4': hid_report_out[0] = 0x14; break; default: return -1; - break; - } - - + + //send HID report to board return sendHidReport(serial, hid_report_out, hid_report_in, 64); @@ -428,31 +424,29 @@ int Ykush3::port_down(char *serial, char port) hid_report_out[0] = 0x01; break; - case '2': + case '2': hid_report_out[0] = 0x02; break; - - case '3': + + case '3': hid_report_out[0] = 0x03; break; - case 'a': + case 'a': hid_report_out[0] = 0x0a; break; - + case '4': hid_report_out[0] = 0x04; break; default: return 0; - break; - } - + //send HID report to board return sendHidReport(serial, hid_report_out, hid_report_in, 64); - + } @@ -460,7 +454,7 @@ int Ykush3::port_down(char *serial, char port) int Ykush3::get_port_status(char *serial, char port) { - int status; + int status; switch(port) { @@ -468,25 +462,23 @@ int Ykush3::get_port_status(char *serial, char port) hid_report_out[0] = 0x21; break; - case '2': + case '2': hid_report_out[0] = 0x22; break; - - case '3': + + case '3': hid_report_out[0] = 0x23; break; - case '4': + case '4': hid_report_out[0] = 0x24; break; default: return 0; - break; - } - - //send HID report to board + + //send HID report to board sendHidReport(serial, hid_report_out, hid_report_in, 64); //handle board response HID report @@ -502,9 +494,9 @@ int Ykush3::write_io(char *serial, char port, char value) hid_report_out[0] = 0x31; if(value=='0'){ - hid_report_out[2] = 0; + hid_report_out[2] = 0; } else { - hid_report_out[2] = 1; + hid_report_out[2] = 1; } @@ -514,20 +506,20 @@ int Ykush3::write_io(char *serial, char port, char value) hid_report_out[1] = 0x01; break; - case '2': + case '2': hid_report_out[1] = 0x02; break; - - case '3': + + case '3': hid_report_out[1] = 0x03; break; - + default: return 0; break; } - + //send HID report to board return sendHidReport(serial, hid_report_out, hid_report_in, 64); @@ -537,7 +529,7 @@ int Ykush3::write_io(char *serial, char port, char value) int Ykush3::read_io(char *serial, char port) { - + hid_report_out[0] = 0x30; switch(port) @@ -546,53 +538,53 @@ int Ykush3::read_io(char *serial, char port) hid_report_out[1] = 0x01; break; - case '2': + case '2': hid_report_out[1] = 0x02; break; - - case '3': + + case '3': hid_report_out[1] = 0x03; break; - + default: return 0; break; } - - + + //send HID report to board return sendHidReport(serial, hid_report_out, hid_report_in, 64); - + //process response return hid_report_in[3]; } - + int Ykush3::config_port(char *serial, char port, char value) { hid_report_out[0] = 0x41; if ( value == '0' ) - hid_report_out[2] = 0; + hid_report_out[2] = 0; else if ( value == '1' ) - hid_report_out[2] = 1; + hid_report_out[2] = 1; else hid_report_out[2] = 2; //Persist mode - + switch ( port ) { case '1': hid_report_out[1] = 0x01; break; - case '2': + case '2': hid_report_out[1] = 0x02; break; - case '3': + case '3': hid_report_out[1] = 0x03; break; - case 'e': + case 'e': hid_report_out[1] = 0x04; break; default: @@ -608,11 +600,10 @@ int Ykush3::config_port(char *serial, char port, char value) int Ykush3::reset(char *serial) { - hid_report_out[0] = 0x55; - + hid_report_out[0] = 0x55; + //send HID report to board - sendHidReport(serial, hid_report_out, hid_report_in, 64); - return 0; + return sendHidReport(serial, hid_report_out, hid_report_in, 64); } @@ -654,15 +645,14 @@ Ykush3::enter_bootloader (char *serial) } - -int Ykush3::i2c_enable_disable_control(bool enable_flag) +int Ykush3::i2c_enable_disable_control(bool enable_flag) { hid_report_out[0] = 0x51; hid_report_out[1] = 0x01; - + if ( enable_flag ) hid_report_out[2] = 0x01; - else + else hid_report_out[2] = 0x00; sendHidReport(usb_serial, hid_report_out, hid_report_in, 64); @@ -670,7 +660,7 @@ int Ykush3::i2c_enable_disable_control(bool enable_flag) if ( (hid_report_in[0] == 0x01) && (hid_report_in[1] == 0x51) ) { //command executed with success return 0; - } + } return 1; } @@ -683,7 +673,7 @@ int Ykush3::i2c_enable_disable_gateway(bool enable_flag) if ( enable_flag ) hid_report_out[2] = 0x01; - else + else hid_report_out[2] = 0x00; sendHidReport(usb_serial, hid_report_out, hid_report_in, 64); @@ -691,7 +681,7 @@ int Ykush3::i2c_enable_disable_gateway(bool enable_flag) if ( (hid_report_in[0] == 0x01) && (hid_report_in[1] == 0x51) ) { //command executed with success return 0; - } + } return 1; } @@ -729,7 +719,7 @@ int Ykush3::i2c_write(char *i2c_address_ASCII, char *num_bytes_ASCII, char **dat if ( size <= 0 ) return 1; dec2bin(num_bytes_ASCII, &hid_report_out[3], size); - if ( hid_report_out[3] > 60 ) + if ( hid_report_out[3] > 60 ) return 2; //convert data_to_write_ASCII to binary @@ -772,7 +762,7 @@ int Ykush3::i2c_read(char *i2c_address_ASCII, char *num_bytes_ASCII, unsigned ch for (i = 0; (i < hid_report_in[2]) && (i < 60); i++) { data_buffer[i] = hid_report_in[i + 4]; } - *bytes_read = i; + *bytes_read = i; } else { return 1; } @@ -821,19 +811,18 @@ Ykush3::display_version_firmware (void) } - -int Ykush3::set_usb_serial(char *serial) +int Ykush3::set_usb_serial(char *serial) { usb_serial = serial; return 0; } - + int ykush3_list_attached() { Ykush3 ykush3; - printf("\n\nAttached YKUSH Boards:\n"); + printf("\n\nAttached YKUSH Boards:\n"); if( ykush3.listConnected() == 0 ) printf("\n\nNo YKUSH boards found."); printf("\n\n"); @@ -841,7 +830,7 @@ int ykush3_list_attached() } -void Ykush3::print_help(void) +void Ykush3::print_help(void) { Help help(app_exc_name); diff --git a/src/ykushxs/ykushxs.cpp b/src/ykushxs/ykushxs.cpp index 1b088d9..b559ed9 100644 --- a/src/ykushxs/ykushxs.cpp +++ b/src/ykushxs/ykushxs.cpp @@ -35,7 +35,7 @@ int ykushxs_cmd_parser(int argc, char** argv) char bySerialFlag = 0; enum ykushxsAction action = YKUSHXS_HELP; YkushXs ykushxs; - + if ( argc < 3 ) { ykushxs.ykushxs_help(argv[0]); return -1; @@ -84,7 +84,7 @@ int ykushxs_cmd_parser(int argc, char** argv) } break; case YKUSHXS_LIST_BOARDS: - return ykushxs_list_attached(); + return ykushxs_list_attached(); break; case YKUSHXS_GET_STATUS: if ( bySerialFlag ){ @@ -99,22 +99,20 @@ int ykushxs_cmd_parser(int argc, char** argv) } else { printf("\n\nDownstream port is OFF\n\n"); } - } + } break; default: - ykushxs.ykushxs_help(argv[0]); - return -1; + ykushxs.ykushxs_help(argv[0]); break; - } - + return -1; } int YkushXs::port_up(char *serial) { hid_report_out[0] = 0x11; //port up - + int res = sendHidReport(serial, hid_report_out, hid_report_in, 64); if ( res < 0 ) @@ -165,7 +163,7 @@ int ykushxs_list_attached() { YkushXs ykushxs; - printf("\n\nAttached YKUSH XS Boards:\n"); + printf("\n\nAttached YKUSH XS Boards:\n"); if ( ykushxs.listConnected() == 0 ) { printf("\nNo YKUSH XS boards found."); }