usb_cables: minor, rename function
This commit is contained in:
parent
0cb628deb2
commit
84d679c3ef
|
@ -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");
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue