Mistake on this page?
Report an issue in GitHub or email us
fslittle_test.h
Go to the documentation of this file.
1 /** @file fslittle_test.h
2  *
3  * mbed Microcontroller Library
4  * Copyright (c) 2006-2016 ARM Limited
5  * SPDX-License-Identifier: Apache-2.0
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  * Header file for test support data structures and function API.
20  */
21 #ifndef __FSLITTLE_TEST_H
22 #define __FSLITTLE_TEST_H
23 
24 #include <stdint.h>
25 #include <stdlib.h>
26 #include <stdbool.h>
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
32 /* Defines */
33 //#define FSLITTLE_INIT_1_TABLE_HEAD { "a", ""}
34 #define FSLITTLE_INIT_1_TABLE_MID_NODE { "/sd/01234567.txt", "abcdefghijklmnopqrstuvwxyz"}
35 //#define FSLITTLE_INIT_1_TABLE_TAIL { "/sd/fopentst/hello/world/animal/wobbly/dog/foot/backrght.txt", "present"}
36 #define FSLITTLE_TEST_RW_TABLE_SENTINEL 0xffffffff
37 #define FSLITTLE_TEST_BYTE_DATA_TABLE_SIZE 256
38 #define FSLITTLE_UTEST_MSG_BUF_SIZE 256
39 #define FSLITTLE_UTEST_DEFAULT_TIMEOUT_MS 10000
40 #define FSLITTLE_MBED_HOSTTEST_TIMEOUT 60
41 #define FSLITTLE_MAX_FILE_BASENAME 8
42 #define FSLITTLE_MAX_FILE_EXTNAME 3
43 #define FSLITTLE_BUF_MAX_LENGTH 64
44 #define FSLITTLE_FILENAME_MAX_LENGTH 255
45 
46 
47 /* support macro for make string for utest _MESSAGE macros, which dont support formatted output */
48 #define FSLITTLE_TEST_UTEST_MESSAGE(_buf, _max_len, _fmt, ...) \
49  do \
50  { \
51  snprintf((_buf), (_max_len), (_fmt), __VA_ARGS__); \
52  }while(0);
53 
54 
55 /*
56  * Structures
57  */
58 
59 /* kv data for test */
60 typedef struct fslittle_kv_data_t {
61  const char *filename;
62  const char *value;
64 
65 
66 extern const uint8_t fslittle_test_byte_data_table[FSLITTLE_TEST_BYTE_DATA_TABLE_SIZE];
67 
68 int32_t fslittle_test_create(const char *filename, const char *data, size_t len);
69 int32_t fslittle_test_delete(const char *key_name);
70 int32_t fslittle_test_filename_gen(char *name, const size_t len);
71 #ifdef __cplusplus
72 }
73 #endif
74 
75 #endif /* __FSLITTLE_TEST_H */
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.