Chore/bacnet-sc-unrelated-cleanup (#620)
* Added required linux Ethernet library for ethernet build * Added .obj to gitignore * Fixed BACnet port for APPLE to use BSD in CMake * Changed format in CMake to enable cleaner SC merge * Added create-object and delete-object recipes in GCC Makefile * Added datalink timer to all example OS apps * Changed most microcontroller ports to use BACAPP_MINIMAL to specify which datatypes can be written. * Fixed zephyr OS for BACnet/IP warning * Fixed zephyr OS log to not require log_strdup * Added writefile API to file object example * Added API to device-client to make it more robust. * Added API in network-port object for getting the ASCII object-name * Added debug print with a timestamp option * Added debug print with hex dump print * Added API to network port object for activate and discard * Added default define for debug with timestamp * Added prototype in header for disabled debug printf. * Added fifo peek ahead function to peek at more than one byte. * Added get-mac value for network port that uses buffer rather than octetstring
This commit is contained in:
@@ -35,6 +35,7 @@ static void testFIFOBuffer(void)
|
||||
uint8_t test_data = 0;
|
||||
unsigned index = 0;
|
||||
unsigned count = 0;
|
||||
unsigned test_count = 0;
|
||||
bool status = 0;
|
||||
|
||||
FIFO_Init(&test_buffer, data_store, sizeof(data_store));
|
||||
@@ -133,6 +134,15 @@ static void testFIFOBuffer(void)
|
||||
zassert_false(FIFO_Empty(&test_buffer), NULL);
|
||||
FIFO_Flush(&test_buffer);
|
||||
zassert_true(FIFO_Empty(&test_buffer), NULL);
|
||||
/* check the peak ahead feature */
|
||||
status = FIFO_Add(&test_buffer, add_data, sizeof(add_data));
|
||||
zassert_true(status, NULL);
|
||||
count = FIFO_Count(&test_buffer);
|
||||
test_count = FIFO_Peek_Ahead(&test_buffer, &test_add_data[0], count-1);
|
||||
zassert_equal(count-1, test_count, NULL);
|
||||
for (index = 0; index < test_count; index++) {
|
||||
zassert_equal(test_add_data[index], add_data[index], NULL);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user