forked from PAWPAW-Mirror/lib_xua
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
48533bed7b | ||
|
|
6e06ed66fc |
@@ -1,7 +1,7 @@
|
|||||||
lib_xua
|
lib_xua
|
||||||
#######
|
#######
|
||||||
|
|
||||||
:Version: 4.0.0
|
:Version: 4.1.0
|
||||||
:Vendor: XMOS
|
:Vendor: XMOS
|
||||||
|
|
||||||
:Scope: General Use
|
:Scope: General Use
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ inline unsigned queue_pop_word(queue_t &q, unsigned array[]) {
|
|||||||
if(queue_is_empty(q)){
|
if(queue_is_empty(q)){
|
||||||
xassert(0 && "Unexpected pop from MIDI queue when empty");
|
xassert(0 && "Unexpected pop from MIDI queue when empty");
|
||||||
// Return NULL messaqe if asserts not enabled
|
// Return NULL messaqe if asserts not enabled
|
||||||
return MIDI_OUT_NULL_MESSAGE;
|
return MIDI_OUT_NULL_MESSAGE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return array[q.rdptr++ & q.mask];
|
return array[q.rdptr++ & q.mask];
|
||||||
|
|||||||
@@ -191,7 +191,7 @@ void test_midi_sys_ex(void) {
|
|||||||
midi_ref[3] = random(&rndm) & DATA_MASK; // Manf ID 1
|
midi_ref[3] = random(&rndm) & DATA_MASK; // Manf ID 1
|
||||||
for(unsigned i = 4; i < msg_len - 1; i++){
|
for(unsigned i = 4; i < msg_len - 1; i++){
|
||||||
midi_ref[i] = random(&rndm) & DATA_MASK; // Some data
|
midi_ref[i] = random(&rndm) & DATA_MASK; // Some data
|
||||||
}
|
}
|
||||||
midi_ref[msg_len - 1] = SYSEX_EOM; // End of sys-ex
|
midi_ref[msg_len - 1] = SYSEX_EOM; // End of sys-ex
|
||||||
|
|
||||||
unsigned midi_dut[1 + MAX_SYS_EX_LENGTH + 1 + 2] = {0}; // Add SOM + EOM. Add 2 because msg_size % 3 may be up to 2.
|
unsigned midi_dut[1 + MAX_SYS_EX_LENGTH + 1 + 2] = {0}; // Add SOM + EOM. Add 2 because msg_size % 3 may be up to 2.
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ void test_midi_queue_init(void) {
|
|||||||
|
|
||||||
int empty = queue_is_empty_c_wrapper(&symbol_fifo);
|
int empty = queue_is_empty_c_wrapper(&symbol_fifo);
|
||||||
TEST_ASSERT_EQUAL_INT32(1, empty);
|
TEST_ASSERT_EQUAL_INT32(1, empty);
|
||||||
|
|
||||||
int full = queue_is_full_c_wrapper(&symbol_fifo);
|
int full = queue_is_full_c_wrapper(&symbol_fifo);
|
||||||
TEST_ASSERT_EQUAL_INT32(0, full);
|
TEST_ASSERT_EQUAL_INT32(0, full);
|
||||||
|
|
||||||
@@ -61,7 +61,7 @@ void test_midi_queue_full(void) {
|
|||||||
|
|
||||||
int empty = queue_is_empty_c_wrapper(&symbol_fifo);
|
int empty = queue_is_empty_c_wrapper(&symbol_fifo);
|
||||||
TEST_ASSERT_EQUAL_INT32(0, empty);
|
TEST_ASSERT_EQUAL_INT32(0, empty);
|
||||||
|
|
||||||
int full = queue_is_full_c_wrapper(&symbol_fifo);
|
int full = queue_is_full_c_wrapper(&symbol_fifo);
|
||||||
TEST_ASSERT_EQUAL_INT32(1, full);
|
TEST_ASSERT_EQUAL_INT32(1, full);
|
||||||
|
|
||||||
@@ -112,4 +112,4 @@ void test_midi_queue_push_pop(void) {
|
|||||||
|
|
||||||
counter++;
|
counter++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user