![]() |
no-OS
|
Timer and GIC control module source. More...
#include <stdlib.h>#include <xparameters.h>#include "no_os_timer.h"#include "xilinx_timer.h"#include "no_os_error.h"#include "no_os_alloc.h"Functions | |
| int32_t | xilinx_timer_start (struct no_os_timer_desc *desc) |
| Start a timer. | |
| int32_t | xilinx_timer_stop (struct no_os_timer_desc *desc) |
| Stop a timer from counting. | |
| int32_t | xilinx_timer_counter_get (struct no_os_timer_desc *desc, uint32_t *counter) |
| Get the current counter value of the timer. | |
| int32_t | xilinx_timer_counter_set (struct no_os_timer_desc *desc, uint32_t new_val) |
| Set the current counter value of the timer. | |
| int32_t | xilinx_timer_count_clk_get (struct no_os_timer_desc *desc, uint32_t *freq_hz) |
| Get the timer clock frequency. | |
| int32_t | xilinx_timer_count_clk_set (struct no_os_timer_desc *desc, uint32_t freq_hz) |
| Set the timer clock frequency. | |
| int32_t | xilinx_timer_get_elapsed_time_nsec (struct no_os_timer_desc *desc, uint64_t *elapsed_time) |
| Get the elapsed time in nsec for the timer. | |
| int32_t | xilinx_timer_init (struct no_os_timer_desc **desc, const struct no_os_timer_init_param *param) |
| Initialize hardware timer and the handler structure associated with it. | |
| int32_t | xilinx_timer_remove (struct no_os_timer_desc *desc) |
| Free the memory allocated by timer_setup(). | |
Variables | |
| const struct no_os_timer_platform_ops | xil_timer_ops |
| Xilinx platform specific timer platform ops structure. | |
Timer and GIC control module source.
Copyright 2020(c) Analog Devices, Inc.
SPDX-License-Identifier: BSD-3-Clause
| int32_t xilinx_timer_count_clk_get | ( | struct no_os_timer_desc * | desc, |
| uint32_t * | freq_hz ) |
Get the timer clock frequency.
| [in] | desc | - Pointer to the device handler. |
| [out] | freq_hz | - Pointer to the returned frequency. |
| int32_t xilinx_timer_count_clk_set | ( | struct no_os_timer_desc * | desc, |
| uint32_t | freq_hz ) |
Set the timer clock frequency.
| [in] | desc | - Pointer to the device handler. |
| [in] | freq_hz | - New timer frequency in hertz. |
| int32_t xilinx_timer_counter_get | ( | struct no_os_timer_desc * | desc, |
| uint32_t * | counter ) |
Get the current counter value of the timer.
| [in] | desc | - Pointer to the device handler. |
| [out] | counter | - Pointer to the current counter value. |
| int32_t xilinx_timer_counter_set | ( | struct no_os_timer_desc * | desc, |
| uint32_t | new_val ) |
Set the current counter value of the timer.
| [in] | desc | - Pointer to the device handler. |
| [in] | new_val | - New value for the timer counter. |
| int32_t xilinx_timer_get_elapsed_time_nsec | ( | struct no_os_timer_desc * | desc, |
| uint64_t * | elapsed_time ) |
Get the elapsed time in nsec for the timer.
| [in] | desc | - Pointer to the device handler. |
| [in] | elapsed_time | - The elapsed time in nsec. |
| int32_t xilinx_timer_init | ( | struct no_os_timer_desc ** | desc, |
| const struct no_os_timer_init_param * | param ) |
Initialize hardware timer and the handler structure associated with it.
| [out] | desc | - Pointer to the reference of the device handler. |
| [in] | param | - Initialization structure. |
| int32_t xilinx_timer_remove | ( | struct no_os_timer_desc * | desc | ) |
Free the memory allocated by timer_setup().
| [in] | desc | - Pointer to the device handler. |
| int32_t xilinx_timer_start | ( | struct no_os_timer_desc * | desc | ) |
Start a timer.
| [in] | desc | - Pointer to the device handler. |
| int32_t xilinx_timer_stop | ( | struct no_os_timer_desc * | desc | ) |
Stop a timer from counting.
| [in] | desc | - Pointer to the device handler. |
| const struct no_os_timer_platform_ops xil_timer_ops |
Xilinx platform specific timer platform ops structure.