David Wang | bcb8b14 | 2022-02-17 17:31:40 +0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2021-2022, Arm Limited. All rights reserved. |
| 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | * |
| 6 | */ |
| 7 | #ifndef __PROF_HAL_H__ |
| 8 | #define __PROF_HAL_H__ |
| 9 | |
| 10 | #include <stdint.h> |
| 11 | |
| 12 | /* Platform must implement these functions */ |
| 13 | |
| 14 | #ifdef __cplusplus |
| 15 | extern "C" { |
| 16 | #endif |
| 17 | |
| 18 | /* Initialize the timer/cycle counter hardware for profiling */ |
| 19 | bool prof_hal_init(void); |
| 20 | |
| 21 | /* Interface for retrieving the timer/cycle count */ |
| 22 | uint32_t prof_hal_get_count(void); |
| 23 | |
| 24 | #ifdef __cplusplus |
| 25 | } |
| 26 | #endif |
| 27 | |
| 28 | #endif /* __PROF_HAL_H__ */ |