Wirepas SDK
test.h
Go to the documentation of this file.
1 /* Copyright 2018 Wirepas Ltd. All Rights Reserved.
2  *
3  * See file LICENSE.txt for full license details.
4  *
5  */
6 
7 #include "../../bootloader_test/api/bl_interface.h"
8 
9 #ifndef _TEST_H_
10 #define _TEST_H_
11 
12 /* Number of maximum supported memory areas in tests
13  *
14  * The bootloader used to only support eight memory areas, but that was later
15  * increased to 16. Remember to increase this, if the bootloader supports more
16  * areas in the future.
17  */
18 #define MAX_TESTED_MEMORY_AREAS 16
19 
20 /* Macro to print test startup */
21 #define START_TEST(_name_, _desc_) Print_printf("\nTEST [%s]: %s\n", \
22  #_name_, #_desc_);
23 
24 /* Macro to print test result */
25 #define END_TEST(_name_, _res_) Print_printf("TEST [%s]: %s\n", \
26  #_name_, _res_ ? "OK" : "FAIL");
27 
31 bool Tests_info(bl_interface_t * interface);
32 
36 bool Tests_areas(bl_interface_t * interface);
37 
41 bool Tests_timings(bl_interface_t * interface);
42 
46 bool Tests_test_scratchpad(const scratchpad_services_t * scrat_services);
47 
48 #endif /* _TEST_H_ */
Tests_test_scratchpad
bool Tests_test_scratchpad(const scratchpad_services_t *scrat_services)
Tests scratchpad library.
Tests_areas
bool Tests_areas(bl_interface_t *interface)
Test read/write/erase in memory areas.
Tests_timings
bool Tests_timings(bl_interface_t *interface)
Test flash read/write/erase timings.
bl_interface_t
Global interface entry point with a version id.
Definition: bl_interface.h:571
scratchpad_services_t
Definition: bl_interface.h:551
Tests_info
bool Tests_info(bl_interface_t *interface)
Tests that prints informations about memory area and flash.