application: minor, fix doc

This commit is contained in:
King Kévin 2019-12-13 15:30:31 +01:00
parent 30b7e9c4ba
commit 0cb628deb2
1 changed files with 7 additions and 8 deletions

View File

@ -520,14 +520,14 @@ end:
}
}
/** run self test to test board connection to connectors
* @param[in] argument no argument required
/** test connection between pins
* @param[in] argument NULL to test all connections, "intra" to test only connection internal connections, "inter" to test only inter-connector connections
*/
static void command_connections(void* argument)
{
char* str = (char*)argument; // we won't use the argument
bool intra = false; // check only connection internal connections
bool inter = false; // check only inter-connector connections
bool intra = false; // test only connection internal connections
bool inter = false; // test only inter-connector connections
if (str) {
if (0 == strcmp(str, "intra")) {
intra = true;
@ -539,11 +539,10 @@ static void command_connections(void* argument)
}
}
uint16_t connections_nb = 0;
uint8_t (*connections)[2] = NULL;
if (intra) {
printf("= checking internal connections =\n");
printf("= testing internal connections =\n");
for (uint8_t i = 0; i < LENGTH(usb_connectors); i++) {
const struct usb_connector_t* connector = usb_connectors[i];
connections = (uint8_t (*)[2])usb_cables_check_connections(&connector, 1, true, false, &connections_nb);
@ -568,9 +567,9 @@ static void command_connections(void* argument)
}
} else {
if (inter) {
printf("= checking connections between connectors =\n");
printf("= testing connections between connectors =\n");
} else {
printf("= checking all connections =\n");
printf("= testing all connections =\n");
}
connections = (uint8_t (*)[2])usb_cables_check_connections(usb_connectors, LENGTH(usb_connectors), !inter, false, &connections_nb);
if (NULL == connections) {