1 /**************************************************************************//**
3 * @brief CMSIS OS Tick header file
5 * @date 24. November 2017
6 ******************************************************************************/
8 * Copyright (c) 2017-2017 ARM Limited. All rights reserved.
10 * SPDX-License-Identifier: Apache-2.0
12 * Licensed under the Apache License, Version 2.0 (the License); you may
13 * not use this file except in compliance with the License.
14 * You may obtain a copy of the License at
16 * www.apache.org/licenses/LICENSE-2.0
18 * Unless required by applicable law or agreed to in writing, software
19 * distributed under the License is distributed on an AS IS BASIS, WITHOUT
20 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21 * See the License for the specific language governing permissions and
22 * limitations under the License.
33 typedef void (*IRQHandler_t) (void);
37 /// \param[in] freq tick frequency in Hz
38 /// \param[in] handler tick IRQ handler
39 /// \return 0 on success, -1 on error.
40 int32_t OS_Tick_Setup (uint32_t freq, IRQHandler_t handler);
43 void OS_Tick_Enable (void);
46 void OS_Tick_Disable (void);
48 /// Acknowledge OS Tick IRQ.
49 void OS_Tick_AcknowledgeIRQ (void);
51 /// Get OS Tick IRQ number.
52 /// \return OS Tick IRQ number.
53 int32_t OS_Tick_GetIRQn (void);
55 /// Get OS Tick clock.
56 /// \return OS Tick clock in Hz.
57 uint32_t OS_Tick_GetClock (void);
59 /// Get OS Tick interval.
60 /// \return OS Tick interval.
61 uint32_t OS_Tick_GetInterval (void);
63 /// Get OS Tick count value.
64 /// \return OS Tick count value.
65 uint32_t OS_Tick_GetCount (void);
67 /// Get OS Tick overflow status.
68 /// \return OS Tick overflow status (1 - overflow, 0 - no overflow).
69 uint32_t OS_Tick_GetOverflow (void);
71 #endif /* OS_TICK_H */