|
1 | | -// Copyright 2017 Espressif Systems (Shanghai) PTE LTD |
2 | | -// |
3 | | -// Licensed under the Apache License, Version 2.0 (the "License"); |
4 | | -// you may not use this file except in compliance with the License. |
5 | | -// You may obtain a copy of the License at |
6 | | -// |
7 | | -// http://www.apache.org/licenses/LICENSE-2.0 |
8 | | -// |
9 | | -// Unless required by applicable law or agreed to in writing, software |
10 | | -// distributed under the License is distributed on an "AS IS" BASIS, |
11 | | -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
12 | | -// See the License for the specific language governing permissions and |
13 | | -// limitations under the License. |
| 1 | +/* |
| 2 | + * SPDX-FileCopyrightText: 2017-2021 Espressif Systems (Shanghai) CO LTD |
| 3 | + * |
| 4 | + * SPDX-License-Identifier: Apache-2.0 |
| 5 | + */ |
14 | 6 |
|
15 | 7 | #pragma once |
16 | 8 |
|
@@ -83,11 +75,28 @@ typedef struct { |
83 | 75 | bool skip_unhandled_events; //!< Skip unhandled events for periodic timers |
84 | 76 | } esp_timer_create_args_t; |
85 | 77 |
|
| 78 | + |
| 79 | +/** |
| 80 | + * @brief Minimal initialization of esp_timer |
| 81 | + * |
| 82 | + * @note This function is called from startup code. Applications do not need |
| 83 | + * to call this function before using other esp_timer APIs. |
| 84 | + * |
| 85 | + * This function can be called very early in startup process, after this call |
| 86 | + * only esp_timer_get_time function can be used. |
| 87 | + * |
| 88 | + * @return |
| 89 | + * - ESP_OK on success |
| 90 | + */ |
| 91 | +esp_err_t esp_timer_early_init(void); |
| 92 | + |
86 | 93 | /** |
87 | 94 | * @brief Initialize esp_timer library |
88 | 95 | * |
89 | 96 | * @note This function is called from startup code. Applications do not need |
90 | 97 | * to call this function before using other esp_timer APIs. |
| 98 | + * Before calling this function, esp_timer_early_init must be called by the |
| 99 | + * startup code. |
91 | 100 | * |
92 | 101 | * @return |
93 | 102 | * - ESP_OK on success |
|
0 commit comments