mirror of
https://github.com/ErnyTech/Open-USB-Extreme
synced 2025-01-15 21:17:33 +01:00
toD: oue_num_headers
This commit is contained in:
parent
0c6d84e192
commit
879a99d66a
@ -48,3 +48,14 @@ extern(C) UsbExtremeVersion get_version(uint8_t usbExtremeVersion) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern(C) int oue_num_headers(int *num_headers, immutable(void) *headers, size_t headerslen) {
|
||||||
|
auto headers_nlen = cast(int) (headerslen / USBEXTREME_HEADER_SIZE);
|
||||||
|
|
||||||
|
if (!is_oue(headers, headerslen)) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
*num_headers = headers_nlen;
|
||||||
|
return headers_nlen;
|
||||||
|
}
|
||||||
|
@ -12,17 +12,6 @@ int oue_point_headers(usb_extreme_base **headers, void *raw_headers, size_t head
|
|||||||
return headers_nlen;
|
return headers_nlen;
|
||||||
}
|
}
|
||||||
|
|
||||||
int oue_num_headers(int *num_headers, const void *headers, size_t headerslen) {
|
|
||||||
int headers_nlen = (int) (headerslen / USBEXTREME_HEADER_SIZE);
|
|
||||||
|
|
||||||
if (!is_oue(headers, headerslen)) {
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
*num_headers = headers_nlen;
|
|
||||||
return headers_nlen;
|
|
||||||
}
|
|
||||||
|
|
||||||
int oue_version(usb_extreme_versions *version, const void *headers, size_t headerslen) {
|
int oue_version(usb_extreme_versions *version, const void *headers, size_t headerslen) {
|
||||||
const usb_extreme_v1 *headers_oeu = headers;
|
const usb_extreme_v1 *headers_oeu = headers;
|
||||||
int headers_nlen = (int) (headerslen / USBEXTREME_HEADER_SIZE);
|
int headers_nlen = (int) (headerslen / USBEXTREME_HEADER_SIZE);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user