Opencv 3.1 project on GR-PEACH board
Fork of gr-peach-opencv-project by
platform/mbed_stats.h@170:54ff26da7eb6, 2017-07-04 (annotated)
- Committer:
- thedo
- Date:
- Tue Jul 04 06:23:13 2017 +0000
- Revision:
- 170:54ff26da7eb6
- Parent:
- 167:1657b442184c
project opencv 3.1 on GR PEACH board, no use SD card.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
thedo | 167:1657b442184c | 1 | |
thedo | 167:1657b442184c | 2 | /** \addtogroup platform */ |
thedo | 167:1657b442184c | 3 | /** @{*/ |
thedo | 167:1657b442184c | 4 | /* mbed Microcontroller Library |
thedo | 167:1657b442184c | 5 | * Copyright (c) 2016-2016 ARM Limited |
thedo | 167:1657b442184c | 6 | * |
thedo | 167:1657b442184c | 7 | * Licensed under the Apache License, Version 2.0 (the "License"); |
thedo | 167:1657b442184c | 8 | * you may not use this file except in compliance with the License. |
thedo | 167:1657b442184c | 9 | * You may obtain a copy of the License at |
thedo | 167:1657b442184c | 10 | * |
thedo | 167:1657b442184c | 11 | * http://www.apache.org/licenses/LICENSE-2.0 |
thedo | 167:1657b442184c | 12 | * |
thedo | 167:1657b442184c | 13 | * Unless required by applicable law or agreed to in writing, software |
thedo | 167:1657b442184c | 14 | * distributed under the License is distributed on an "AS IS" BASIS, |
thedo | 167:1657b442184c | 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
thedo | 167:1657b442184c | 16 | * See the License for the specific language governing permissions and |
thedo | 167:1657b442184c | 17 | * limitations under the License. |
thedo | 167:1657b442184c | 18 | */ |
thedo | 167:1657b442184c | 19 | #ifndef MBED_STATS_H |
thedo | 167:1657b442184c | 20 | #define MBED_STATS_H |
thedo | 167:1657b442184c | 21 | #include <stdint.h> |
thedo | 167:1657b442184c | 22 | #include <stddef.h> |
thedo | 167:1657b442184c | 23 | |
thedo | 167:1657b442184c | 24 | #ifdef __cplusplus |
thedo | 167:1657b442184c | 25 | extern "C" { |
thedo | 167:1657b442184c | 26 | #endif |
thedo | 167:1657b442184c | 27 | |
thedo | 167:1657b442184c | 28 | typedef struct { |
thedo | 167:1657b442184c | 29 | uint32_t current_size; /**< Bytes allocated currently. */ |
thedo | 167:1657b442184c | 30 | uint32_t max_size; /**< Max bytes allocated at a given time. */ |
thedo | 167:1657b442184c | 31 | uint32_t total_size; /**< Cumulative sum of bytes ever allocated. */ |
thedo | 167:1657b442184c | 32 | uint32_t reserved_size; /**< Current number of bytes allocated for the heap. */ |
thedo | 167:1657b442184c | 33 | uint32_t alloc_cnt; /**< Current number of allocations. */ |
thedo | 167:1657b442184c | 34 | uint32_t alloc_fail_cnt; /**< Number of failed allocations. */ |
thedo | 167:1657b442184c | 35 | } mbed_stats_heap_t; |
thedo | 167:1657b442184c | 36 | |
thedo | 167:1657b442184c | 37 | /** |
thedo | 167:1657b442184c | 38 | * Fill the passed in heap stat structure with heap stats. |
thedo | 167:1657b442184c | 39 | * |
thedo | 167:1657b442184c | 40 | * @param stats A pointer to the mbed_stats_heap_t structure to fill |
thedo | 167:1657b442184c | 41 | */ |
thedo | 167:1657b442184c | 42 | void mbed_stats_heap_get(mbed_stats_heap_t *stats); |
thedo | 167:1657b442184c | 43 | |
thedo | 167:1657b442184c | 44 | typedef struct { |
thedo | 167:1657b442184c | 45 | uint32_t thread_id; /**< Identifier for thread that owns the stack. */ |
thedo | 167:1657b442184c | 46 | uint32_t max_size; /**< Sum of the maximum number of bytes used in each stack. */ |
thedo | 167:1657b442184c | 47 | uint32_t reserved_size; /**< Current number of bytes allocated for all stacks. */ |
thedo | 167:1657b442184c | 48 | uint32_t stack_cnt; /**< Number of stacks currently allocated. */ |
thedo | 167:1657b442184c | 49 | } mbed_stats_stack_t; |
thedo | 167:1657b442184c | 50 | |
thedo | 167:1657b442184c | 51 | /** |
thedo | 167:1657b442184c | 52 | * Fill the passed in structure with stack stats. |
thedo | 167:1657b442184c | 53 | * |
thedo | 167:1657b442184c | 54 | * @param stats A pointer to the mbed_stats_stack_t structure to fill |
thedo | 167:1657b442184c | 55 | */ |
thedo | 167:1657b442184c | 56 | void mbed_stats_stack_get(mbed_stats_stack_t *stats); |
thedo | 167:1657b442184c | 57 | |
thedo | 167:1657b442184c | 58 | /** |
thedo | 167:1657b442184c | 59 | * Fill the passed array of stat structures with the stack stats |
thedo | 167:1657b442184c | 60 | * for each available stack. |
thedo | 167:1657b442184c | 61 | * |
thedo | 167:1657b442184c | 62 | * @param stats A pointer to an array of mbed_stats_stack_t structures to fill |
thedo | 167:1657b442184c | 63 | * @param count The number of mbed_stats_stack_t structures in the provided array |
thedo | 167:1657b442184c | 64 | * @return The number of mbed_stats_stack_t structures that have been filled, |
thedo | 167:1657b442184c | 65 | * this is equal to the number of stacks on the system. |
thedo | 167:1657b442184c | 66 | */ |
thedo | 167:1657b442184c | 67 | size_t mbed_stats_stack_get_each(mbed_stats_stack_t *stats, size_t count); |
thedo | 167:1657b442184c | 68 | |
thedo | 167:1657b442184c | 69 | #ifdef __cplusplus |
thedo | 167:1657b442184c | 70 | } |
thedo | 167:1657b442184c | 71 | #endif |
thedo | 167:1657b442184c | 72 | |
thedo | 167:1657b442184c | 73 | #endif |
thedo | 167:1657b442184c | 74 | |
thedo | 167:1657b442184c | 75 | /** @}*/ |
thedo | 167:1657b442184c | 76 |