forked from PAWPAW-Mirror/lib_xua
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3d9266a080 | ||
|
|
4ac07b2df4 | ||
|
|
afcf576d43 | ||
|
|
bb73f2140e | ||
|
|
c260039d0b | ||
|
|
a89371c143 | ||
|
|
f3ab9a8532 | ||
|
|
fff1568c6f |
@@ -1,6 +1,11 @@
|
||||
lib_xua Change Log
|
||||
==================
|
||||
|
||||
1.0.1
|
||||
-----
|
||||
|
||||
* FIXED: Wrong size of vendor and product strings
|
||||
|
||||
1.0.0
|
||||
-----
|
||||
|
||||
|
||||
4
Jenkinsfile
vendored
4
Jenkinsfile
vendored
@@ -1,4 +1,4 @@
|
||||
@Library('xmos_jenkins_shared_library@develop') _
|
||||
@Library('xmos_jenkins_shared_library@v0.12.1') _
|
||||
|
||||
getApproval()
|
||||
|
||||
@@ -6,7 +6,7 @@ pipeline {
|
||||
agent none
|
||||
environment {
|
||||
REPO = 'lib_xua'
|
||||
VIEW = "${env.JOB_NAME.contains('PR-') ? REPO+'_'+env.CHANGE_TARGET : REPO+'_'+env.BRANCH_NAME}"
|
||||
VIEW = getViewName(REPO)
|
||||
}
|
||||
options {
|
||||
skipDefaultCheckout()
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
VERSION = 1.0.0
|
||||
VERSION = 1.0.1
|
||||
|
||||
DEPENDENT_MODULES = lib_logging(>=3.0.0) \
|
||||
lib_xassert(>=4.0.0) \
|
||||
lib_xud(>=0.2.0) \
|
||||
lib_xud(>=1.0.0) \
|
||||
lib_spdif(>=4.0.0) \
|
||||
lib_mic_array(>=4.0.0)
|
||||
|
||||
|
||||
@@ -234,6 +234,8 @@ void XUA_Endpoint0_setVendorId(unsigned short vid) {
|
||||
}
|
||||
|
||||
void concatenateAndCopyStrings(char* string1, char* string2, char* string_buffer) {
|
||||
debug_printf("concatenateAndCopyStrings() for \"%s\" and \"%s\"\n", string1, string2);
|
||||
|
||||
memset(string_buffer, '\0', strlen(string_buffer));
|
||||
|
||||
uint32_t remaining_buffer_size = MIN(strlen(string1), XUA_MAX_STR_LEN-1);
|
||||
@@ -242,9 +244,11 @@ void concatenateAndCopyStrings(char* string1, char* string2, char* string_buffer
|
||||
if (total_string_size==XUA_MAX_STR_LEN-1) {
|
||||
remaining_buffer_size = XUA_MAX_STR_LEN-1-strlen(string1);
|
||||
} else {
|
||||
remaining_buffer_size = strlen(string1);
|
||||
remaining_buffer_size = strlen(string2);
|
||||
}
|
||||
|
||||
strncat(string_buffer, string2, remaining_buffer_size);
|
||||
debug_printf("concatenateAndCopyStrings() creates \"%s\"\n", string_buffer);
|
||||
}
|
||||
|
||||
void XUA_Endpoint0_setStrTable() {
|
||||
@@ -288,12 +292,12 @@ void XUA_Endpoint0_setStrTable() {
|
||||
}
|
||||
|
||||
void XUA_Endpoint0_setVendorStr(char* vendor_str) {
|
||||
debug_printf("XUA_Endpoint0_setVendorStr() with string %s", vendor_str);
|
||||
debug_printf("XUA_Endpoint0_setVendorStr() with string %s\n", vendor_str);
|
||||
concatenateAndCopyStrings(vendor_str, "", g_vendor_str);
|
||||
}
|
||||
|
||||
void XUA_Endpoint0_setProductStr(char* product_str) {
|
||||
debug_printf("XUA_Endpoint0_setProductStr() with string %s", product_str);
|
||||
debug_printf("XUA_Endpoint0_setProductStr() with string %s\n", product_str);
|
||||
concatenateAndCopyStrings(product_str, "", g_product_str);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user