joey shelton / LED_Demo

Dependencies:   MAX44000 PWM_Tone_Library nexpaq_mdk

Fork of LED_Demo by Maxim nexpaq

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers arm_hal_timer.h Source File

arm_hal_timer.h

00001 /*
00002  * Copyright (c) 2014-2015 ARM Limited. All rights reserved.
00003  * SPDX-License-Identifier: Apache-2.0
00004  * Licensed under the Apache License, Version 2.0 (the License); you may
00005  * not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  *
00008  * http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an AS IS BASIS, WITHOUT
00012  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 #ifndef ARM_HAL_TIMER_H_
00017 #define ARM_HAL_TIMER_H_
00018 #ifdef __cplusplus
00019 extern "C" {
00020 #endif
00021 /**
00022  * \brief This function perform timer init.
00023  */
00024 extern void platform_timer_enable(void);
00025 /**
00026  * \brief This function is API for set Timer interrupt handler for stack
00027  *
00028  * \param new_fp Function pointer for stack giving timer handler
00029  *
00030  */
00031 typedef void (*platform_timer_cb)(void);
00032 extern void platform_timer_set_cb(platform_timer_cb new_fp);
00033 /**
00034  * \brief This function is API for stack timer start
00035  *
00036  * \param slots define how many 50us slot time period will be started
00037  *
00038  */
00039 extern void platform_timer_start(uint16_t slots);
00040 /**
00041  * \brief This function is API for stack timer stop
00042  *
00043  */
00044 extern void platform_timer_disable(void);
00045 /**
00046  * \brief This function is API for stack timer to read active timer remaining slot count
00047  *
00048  * \return 50us time slot remaining
00049  */
00050 extern uint16_t platform_timer_get_remaining_slots(void);
00051 #ifdef __cplusplus
00052 }
00053 #endif
00054 
00055 #endif /* ARM_HAL_TIMER_H_ */