Merge pull request #134 from xmos/release/v1.0.1

Release v1.0.1
This commit is contained in:
Michael Banther
2020-05-01 15:54:39 +01:00
committed by GitHub
4 changed files with 16 additions and 7 deletions

View File

@@ -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
View File

@@ -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()

View File

@@ -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)

View File

@@ -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);
}