From e4b06890a4370b5b6b1e59f2ed4263e880c734f5 Mon Sep 17 00:00:00 2001 From: Frank Voorburg Date: Fri, 23 Mar 2018 10:03:43 +0000 Subject: [PATCH] Refs #514. Fixed typo in BootCommander help text. git-svn-id: https://svn.code.sf.net/p/openblt/code/trunk@460 5dc33758-31d5-4daf-9ae8-b24bf3d40d73 --- Host/Source/BootCommander/main.c | 162 +++++++++++++++---------------- 1 file changed, 81 insertions(+), 81 deletions(-) diff --git a/Host/Source/BootCommander/main.c b/Host/Source/BootCommander/main.c index 9830e35a..474399a7 100644 --- a/Host/Source/BootCommander/main.c +++ b/Host/Source/BootCommander/main.c @@ -496,10 +496,10 @@ static void DisplayProgramUsage(void) printf(" Supported values: 1000000, 800000, 500000, 250000,\n"); printf(" 125000, 100000, 50000, 20000, 10000.\n"); printf(" -tid=[value] CAN identifier for transmitting XCP command messages\n"); - printf(" from the host to the target, as a 32-bit hexadecimal.\n"); + printf(" from the host to the target, as a 32-bit hexadecimal\n"); printf(" value (Default = 667h).\n"); printf(" -rid=[value] CAN identifier for receiving XCP response messages\n"); - printf(" from the target to the host, as a 32-bit hexadecimal.\n"); + printf(" from the target to the host, as a 32-bit hexadecimal\n"); printf(" value (Default = 7E1h).\n"); printf(" -xid=[value] Configures the 'tid' and 'rid' CAN identifier values\n"); printf(" as 29-bit CAN identifiers, if this 8-bit value is > 0\n"); @@ -1131,85 +1131,85 @@ static void * ExtractTransportSettingsFromCommandLine(int argc, * -rid=[value] -> Receive CAN identifier (32-bit hexadecimal). * -xid=[value] -> Flag for configuring extended CAN identifiers (8-bit). */ - /* Allocate memory for storing the settings and check the result. */ - result = malloc(sizeof(tBltTransportSettingsXcpV10Can)); - assert(result != NULL); - if (result != NULL) /*lint !e774 */ - { - /* Create typed pointer for easy reading. */ - tBltTransportSettingsXcpV10Can * canSettings = - (tBltTransportSettingsXcpV10Can *)result; - /* Set default values. */ - canSettings->deviceName = NULL; - canSettings->deviceChannel = 0; - canSettings->baudrate = 500000; - canSettings->transmitId = 0x667; - canSettings->receiveId = 0x7E1; - canSettings->useExtended = false; - /* Loop through all the command line parameters, just skip the 1st one because - * this is the name of the program, which we are not interested in. - */ - for (paramIdx = 1; paramIdx < argc; paramIdx++) - { - /* Is this the -d=[name] parameter? */ - if ( (strstr(argv[paramIdx], "-d=") != NULL) && - (strlen(argv[paramIdx]) > 3) ) - { - /* Store the pointer to the device name. */ - canSettings->deviceName = &argv[paramIdx][3]; - /* Continue with next loop iteration. */ - continue; - } - /* Is this the -c=[value] parameter? */ - if ( (strstr(argv[paramIdx], "-c=") != NULL) && - (strlen(argv[paramIdx]) > 3) ) - { - /* Extract the channel index value. */ - sscanf(&argv[paramIdx][3], "%u", &(canSettings->deviceChannel)); - /* Continue with next loop iteration. */ - continue; - } - /* Is this the -b=[value] parameter? */ - if ( (strstr(argv[paramIdx], "-b=") != NULL) && - (strlen(argv[paramIdx]) > 3) ) - { - /* Extract the baudrate value. */ - sscanf(&argv[paramIdx][3], "%u", &(canSettings->baudrate)); - /* Continue with next loop iteration. */ - continue; - } - /* Is this the -tid=[value] parameter? */ - if ( (strstr(argv[paramIdx], "-tid=") != NULL) && - (strlen(argv[paramIdx]) > 5) ) - { - /* Extract the hexadecimal transmit CAN identifier value. */ - sscanf(&argv[paramIdx][5], "%x", &(canSettings->transmitId)); - /* Continue with next loop iteration. */ - continue; - } - /* Is this the -rid=[value] parameter? */ - if ( (strstr(argv[paramIdx], "-rid=") != NULL) && - (strlen(argv[paramIdx]) > 5) ) - { - /* Extract the hexadecimal receive CAN identifier value. */ - sscanf(&argv[paramIdx][5], "%x", &(canSettings->receiveId)); - /* Continue with next loop iteration. */ - continue; - } - /* Is this the -xid=[value] parameter? */ - if ( (strstr(argv[paramIdx], "-xid=") != NULL) && - (strlen(argv[paramIdx]) > 5) ) - { - /* Extract the extended CAN identifier configuration value. */ - static uint8_t xidValue; - sscanf(&argv[paramIdx][5], "%hhu", &xidValue); - /* Convert to boolean. */ - canSettings->useExtended = ((xidValue > 0) ? true : false); - /* Continue with next loop iteration. */ - continue; - } - } - } + /* Allocate memory for storing the settings and check the result. */ + result = malloc(sizeof(tBltTransportSettingsXcpV10Can)); + assert(result != NULL); + if (result != NULL) /*lint !e774 */ + { + /* Create typed pointer for easy reading. */ + tBltTransportSettingsXcpV10Can * canSettings = + (tBltTransportSettingsXcpV10Can *)result; + /* Set default values. */ + canSettings->deviceName = NULL; + canSettings->deviceChannel = 0; + canSettings->baudrate = 500000; + canSettings->transmitId = 0x667; + canSettings->receiveId = 0x7E1; + canSettings->useExtended = false; + /* Loop through all the command line parameters, just skip the 1st one because + * this is the name of the program, which we are not interested in. + */ + for (paramIdx = 1; paramIdx < argc; paramIdx++) + { + /* Is this the -d=[name] parameter? */ + if ( (strstr(argv[paramIdx], "-d=") != NULL) && + (strlen(argv[paramIdx]) > 3) ) + { + /* Store the pointer to the device name. */ + canSettings->deviceName = &argv[paramIdx][3]; + /* Continue with next loop iteration. */ + continue; + } + /* Is this the -c=[value] parameter? */ + if ( (strstr(argv[paramIdx], "-c=") != NULL) && + (strlen(argv[paramIdx]) > 3) ) + { + /* Extract the channel index value. */ + sscanf(&argv[paramIdx][3], "%u", &(canSettings->deviceChannel)); + /* Continue with next loop iteration. */ + continue; + } + /* Is this the -b=[value] parameter? */ + if ( (strstr(argv[paramIdx], "-b=") != NULL) && + (strlen(argv[paramIdx]) > 3) ) + { + /* Extract the baudrate value. */ + sscanf(&argv[paramIdx][3], "%u", &(canSettings->baudrate)); + /* Continue with next loop iteration. */ + continue; + } + /* Is this the -tid=[value] parameter? */ + if ( (strstr(argv[paramIdx], "-tid=") != NULL) && + (strlen(argv[paramIdx]) > 5) ) + { + /* Extract the hexadecimal transmit CAN identifier value. */ + sscanf(&argv[paramIdx][5], "%x", &(canSettings->transmitId)); + /* Continue with next loop iteration. */ + continue; + } + /* Is this the -rid=[value] parameter? */ + if ( (strstr(argv[paramIdx], "-rid=") != NULL) && + (strlen(argv[paramIdx]) > 5) ) + { + /* Extract the hexadecimal receive CAN identifier value. */ + sscanf(&argv[paramIdx][5], "%x", &(canSettings->receiveId)); + /* Continue with next loop iteration. */ + continue; + } + /* Is this the -xid=[value] parameter? */ + if ( (strstr(argv[paramIdx], "-xid=") != NULL) && + (strlen(argv[paramIdx]) > 5) ) + { + /* Extract the extended CAN identifier configuration value. */ + static uint8_t xidValue; + sscanf(&argv[paramIdx][5], "%hhu", &xidValue); + /* Convert to boolean. */ + canSettings->useExtended = ((xidValue > 0) ? true : false); + /* Continue with next loop iteration. */ + continue; + } + } + } break; /* -------------------------- XCP on USB --------------------------------------- */ case BLT_TRANSPORT_XCP_V10_USB: