Skip to content

Commit

Permalink
Rename get_ccid_usb_device_address() in get_ccid_usb_port_number()
Browse files Browse the repository at this point in the history
What we get is the USB port number so use a correct name for the
function.
  • Loading branch information
LudovicRousseau committed Apr 15, 2020
1 parent 810b550 commit 5f3c37f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/ccid_usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1105,7 +1105,7 @@ EXTERNAL uint8_t get_ccid_usb_bus_number(int reader_index) {
return usbDevice[reader_index].bus_number;
}

EXTERNAL uint8_t get_ccid_usb_device_address(int reader_index) {
EXTERNAL uint8_t get_ccid_usb_port_number(int reader_index) {
return usbDevice[reader_index].port_number;
}

Expand Down
2 changes: 1 addition & 1 deletion src/ccid_usb.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ status_t CloseUSB(unsigned int reader_index);
const unsigned char *get_ccid_device_descriptor(const struct libusb_interface *usb_interface);

uint8_t get_ccid_usb_bus_number(int reader_index);
uint8_t get_ccid_usb_device_address(int reader_index);
uint8_t get_ccid_usb_port_number(int reader_index);

int ControlUSB(int reader_index, int requesttype, int request, int value,
unsigned char *bytes, unsigned int size);
Expand Down
2 changes: 1 addition & 1 deletion src/ifdhandler.c
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ EXTERNAL RESPONSECODE IFDHGetCapabilities(DWORD Lun, DWORD Tag,
*Length = sizeof(uint32_t);
if (Value) {
uint32_t bus = get_ccid_usb_bus_number(reader_index);
uint32_t addr = get_ccid_usb_device_address(reader_index);
uint32_t addr = get_ccid_usb_port_number(reader_index);
*(uint32_t *)Value = ((uint32_t)0x0020 << 16) | bus << 8 | addr;
}
}
Expand Down

0 comments on commit 5f3c37f

Please sign in to comment.