diff options
author | Kshitij Sisodia <kshitij.sisodia@arm.com> | 2021-05-19 10:30:06 +0100 |
---|---|---|
committer | Kshitij Sisodia <kshitij.sisodia@arm.com> | 2021-05-19 10:47:59 +0100 |
commit | 659fcd951ac18d1ee7737a6ddf6a3ec162c73ca5 (patch) | |
tree | 091232857b7ce8a52a7656424db4e4536b45cc7b /source/application/hal/platforms/bare-metal/bsp/bsp-packs/simple_platform/include/timer_simple_platform.h | |
parent | a3d87702b743e4e2d2ef08f0210445b01a86c87c (diff) | |
download | ml-embedded-evaluation-kit-659fcd951ac18d1ee7737a6ddf6a3ec162c73ca5.tar.gz |
MLECO-1933, MLECO-1914, MLECO-1885: Update to 21.05-rc2 components
Core driver and sofware dependencies updated to latest release
candidate revisions. Note: TensorFlow Lite Micro has not been
updated.
Also, gcc warnings for simple_platform target and ad use case have
been fixed.
Change-Id: I455b421f34375a719a941e6e220fe292a57613f5
Diffstat (limited to 'source/application/hal/platforms/bare-metal/bsp/bsp-packs/simple_platform/include/timer_simple_platform.h')
-rw-r--r-- | source/application/hal/platforms/bare-metal/bsp/bsp-packs/simple_platform/include/timer_simple_platform.h | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/source/application/hal/platforms/bare-metal/bsp/bsp-packs/simple_platform/include/timer_simple_platform.h b/source/application/hal/platforms/bare-metal/bsp/bsp-packs/simple_platform/include/timer_simple_platform.h new file mode 100644 index 0000000..320a57a --- /dev/null +++ b/source/application/hal/platforms/bare-metal/bsp/bsp-packs/simple_platform/include/timer_simple_platform.h @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2021 Arm Limited. All rights reserved. + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef TIMER_SIMPLE_PLATFORM_H +#define TIMER_SIMPLE_PLATFORM_H + +#include "stubs_simple_platform.h" + +/* Container for timestamp for simple platform. */ +typedef struct _generic_time_counter { + uint64_t counter_systick; +} generic_time_counter; + +/** + * @brief Resets the counters. + */ +void timer_reset(void); + +/** + * @brief Gets the current counter values. + * @returns counter struct. + **/ +generic_time_counter get_time_counter(void); + +/** + * @brief Gets the cycle counts elapsed between start and end. + * @return difference in counter values as 32 bit unsigned integer. + */ +uint64_t get_cycle_count_diff(generic_time_counter *start, generic_time_counter *end); + +/** + * @brief Enables or triggers cycle counting mechanism, if required + * by the platform. + */ +void start_cycle_counter(void); + +/** + * @brief Stops cycle counting mechanism, if required by the platform. + */ +void stop_cycle_counter(void); + +#endif /* TIMER_SIMPLE_PLATFORM_H */ |