diff options
Diffstat (limited to 'lib/chibios-contrib/testhal/STM32/STM32F4xx/FSMC_SDRAM/membench.h')
-rw-r--r-- | lib/chibios-contrib/testhal/STM32/STM32F4xx/FSMC_SDRAM/membench.h | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/lib/chibios-contrib/testhal/STM32/STM32F4xx/FSMC_SDRAM/membench.h b/lib/chibios-contrib/testhal/STM32/STM32F4xx/FSMC_SDRAM/membench.h new file mode 100644 index 000000000..1169145ee --- /dev/null +++ b/lib/chibios-contrib/testhal/STM32/STM32F4xx/FSMC_SDRAM/membench.h | |||
@@ -0,0 +1,49 @@ | |||
1 | /* | ||
2 | ChibiOS/RT - Copyright (C) 2013-2014 Uladzimir Pylinsky aka barthess | ||
3 | |||
4 | Licensed under the Apache License, Version 2.0 (the "License"); | ||
5 | you may not use this file except in compliance with the License. | ||
6 | You may obtain a copy of the License at | ||
7 | |||
8 | http://www.apache.org/licenses/LICENSE-2.0 | ||
9 | |||
10 | Unless required by applicable law or agreed to in writing, software | ||
11 | distributed under the License is distributed on an "AS IS" BASIS, | ||
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
13 | See the License for the specific language governing permissions and | ||
14 | limitations under the License. | ||
15 | */ | ||
16 | |||
17 | #ifndef MEMBENCH_H_ | ||
18 | #define MEMBENCH_H_ | ||
19 | |||
20 | /* | ||
21 | * | ||
22 | */ | ||
23 | typedef struct { | ||
24 | void *start; | ||
25 | size_t size; | ||
26 | } membench_t; | ||
27 | |||
28 | /* | ||
29 | * all values in B/s | ||
30 | */ | ||
31 | typedef struct { | ||
32 | uint32_t memset; | ||
33 | uint32_t memcpy; | ||
34 | uint32_t memcpy_dma; | ||
35 | uint32_t memcmp; | ||
36 | } membench_result_t; | ||
37 | |||
38 | /* | ||
39 | * | ||
40 | */ | ||
41 | #ifdef __cplusplus | ||
42 | extern "C" { | ||
43 | #endif | ||
44 | void membench_run(membench_t *dest, const membench_t *src, membench_result_t *ret); | ||
45 | #ifdef __cplusplus | ||
46 | } | ||
47 | #endif | ||
48 | |||
49 | #endif /* MEMBENCH_H_ */ | ||