This is the final version of Mini Gateway for Automation and Security desgined for Renesas GR Peach Design Contest

Dependencies:   GR-PEACH_video GraphicsFramework HTTPServer R_BSP mbed-rpc mbed-rtos Socket lwip-eth lwip-sys lwip FATFileSystem

Fork of mbed-os-example-mbed5-blinky by mbed-os-examples

Committer:
vipinranka
Date:
Wed Jan 11 11:41:30 2017 +0000
Revision:
12:9a20164dcc47
This is the final version MGAS Project for Renesas GR Peach Design Contest

Who changed what in which revision?

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