From 84d679c3ef15b20bb8cc0e82093ac9650d0387c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?King=20K=C3=A9vin?= Date: Fri, 13 Dec 2019 15:32:38 +0100 Subject: [PATCH] usb_cables: minor, rename function --- application.c | 4 ++-- usb_cables.c | 2 +- usb_cables.h | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/application.c b/application.c index c4a3eb7..b04bec3 100644 --- a/application.c +++ b/application.c @@ -545,7 +545,7 @@ static void command_connections(void* argument) 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); + connections = (uint8_t (*)[2])usb_cables_test_connections(&connector, 1, true, false, &connections_nb); if (NULL == connections) { if (connections_nb) { printf("no memory available\n"); @@ -571,7 +571,7 @@ static void command_connections(void* argument) } else { printf("= testing all connections =\n"); } - connections = (uint8_t (*)[2])usb_cables_check_connections(usb_connectors, LENGTH(usb_connectors), !inter, false, &connections_nb); + connections = (uint8_t (*)[2])usb_cables_test_connections(usb_connectors, LENGTH(usb_connectors), !inter, false, &connections_nb); if (NULL == connections) { if (connections_nb) { printf("no memory available\n"); diff --git a/usb_cables.c b/usb_cables.c index f68ea4d..b144a4b 100644 --- a/usb_cables.c +++ b/usb_cables.c @@ -4938,7 +4938,7 @@ bool usb_cables_check_cable(const struct usb_cable_t* cable, uint8_t* defined, u return (0 == _undefined && cable->pin_pairs_nb == _defined); } -uint8_t** usb_cables_check_connections(const struct usb_connector_t** connectors, uint8_t connectors_nb, bool include_intra, bool ground_only, uint16_t* connections_nb) +uint8_t** usb_cables_test_connections(const struct usb_connector_t** connectors, uint8_t connectors_nb, bool include_intra, bool ground_only, uint16_t* connections_nb) { *connections_nb = 0; // number of connections between the connectors we found uint8_t (*connections)[2] = NULL; // connections between the connectors we found (pairs of pin index) diff --git a/usb_cables.h b/usb_cables.h index f507062..996303f 100644 --- a/usb_cables.h +++ b/usb_cables.h @@ -130,13 +130,13 @@ bool usb_cables_check_load(const struct usb_connector_t* connector); * @note each pair is checked in both directions */ bool usb_cables_check_cable(const struct usb_cable_t* cable, uint8_t* defined, uint8_t* undefined, bool print); -/** check connections between connectors +/** test connections between connectors * @param[in] connectors connectors to check * @param[in] connectors_nb numbers of connectors - * @param[in] include_intra if connections between pins within a connector should be checked - * @param[in] ground_only only check connections between ground pins + * @param[in] include_intra if connections between pins within a connector should be tested + * @param[in] ground_only only test connections between ground pins * @param[out] connections_nb number of connections found * @return list of pin pairs connections (NULL if 0 connections have been found or no connections have been found but no memory is available) * @the list of pin pairs connections is allocated memory which should be freed by the caller */ -uint8_t** usb_cables_check_connections(const struct usb_connector_t** connectors, uint8_t connectors_nb, bool include_intra, bool ground_only, uint16_t* connections_nb); +uint8_t** usb_cables_test_connections(const struct usb_connector_t** connectors, uint8_t connectors_nb, bool include_intra, bool ground_only, uint16_t* connections_nb);