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
31bool Tests_info(bl_interface_t * interface);
32
36bool Tests_areas(bl_interface_t * interface);
37
41bool Tests_timings(bl_interface_t * interface);
42
46bool Tests_test_scratchpad(const scratchpad_services_t * scrat_services);
47
48#endif /* _TEST_H_ */
Global interface entry point with a version id.
bool Tests_timings(bl_interface_t *interface)
Test flash read/write/erase timings.
bool Tests_info(bl_interface_t *interface)
Tests that prints informations about memory area and flash.
bool Tests_test_scratchpad(const scratchpad_services_t *scrat_services)
Tests scratchpad library.
bool Tests_areas(bl_interface_t *interface)
Test read/write/erase in memory areas.