no-OS
|
Source file for Linux timer platform driver. More...
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include "no_os_error.h"
#include "no_os_timer.h"
#include "no_os_alloc.h"
Classes | |
struct | linux_timer_desc |
Linux platform specific timer descriptor. More... | |
Functions | |
int | linux_timer_init (struct no_os_timer_desc **desc, const struct no_os_timer_init_param *param) |
Timer driver init function. More... | |
int | linux_timer_remove (struct no_os_timer_desc *desc) |
Timer driver remove function. More... | |
int | linux_timer_start (struct no_os_timer_desc *desc) |
Timer count start function. More... | |
int | linux_timer_stop (struct no_os_timer_desc *desc) |
Timer count stop function. More... | |
int | linux_timer_counter_get (struct no_os_timer_desc *desc, uint32_t *counter) |
Function to get the current timer counter value. More... | |
int | linux_timer_counter_set (struct no_os_timer_desc *desc, uint32_t new_val) |
Function to set the timer counter value. More... | |
int | linux_timer_count_clk_get (struct no_os_timer_desc *desc, uint32_t *freq_hz) |
Function to get the timer frequency. More... | |
int | linux_timer_count_clk_set (struct no_os_timer_desc *desc, uint32_t freq_hz) |
Function to set the timer frequency. More... | |
int | linux_timer_get_elapsed_time_nsec (struct no_os_timer_desc *desc, uint64_t *elapsed_time) |
Not implemented. More... | |
Variables | |
const struct no_os_timer_platform_ops | linux_timer_ops |
linux platform specific timer platform ops structure More... | |
Source file for Linux timer platform driver.
Copyright 2023(c) Analog Devices, Inc.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES, INC. “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANALOG DEVICES, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
int linux_timer_count_clk_get | ( | struct no_os_timer_desc * | desc, |
uint32_t * | freq_hz | ||
) |
Function to get the timer frequency.
desc | - timer descriptor |
freq_hz | - the timer frequency value |
int linux_timer_count_clk_set | ( | struct no_os_timer_desc * | desc, |
uint32_t | freq_hz | ||
) |
Function to set the timer frequency.
desc | - timer descriptor. |
freq_hz | - the timer frequency value to be set. |
int linux_timer_counter_get | ( | struct no_os_timer_desc * | desc, |
uint32_t * | counter | ||
) |
Function to get the current timer counter value.
desc | - timer descriptor |
counter | - the timer counter value |
int linux_timer_counter_set | ( | struct no_os_timer_desc * | desc, |
uint32_t | new_val | ||
) |
Function to set the timer counter value.
desc | - timer descriptor |
new_val | - timer counter value to be set |
int linux_timer_get_elapsed_time_nsec | ( | struct no_os_timer_desc * | desc, |
uint64_t * | elapsed_time | ||
) |
Not implemented.
desc | - timer descriptor |
elapsed_time | - time in nanoseconds |
int linux_timer_init | ( | struct no_os_timer_desc ** | desc, |
const struct no_os_timer_init_param * | param | ||
) |
Timer driver init function.
desc | - timer descriptor to be initialized |
param | - initialization parameter for the desc |
int linux_timer_remove | ( | struct no_os_timer_desc * | desc | ) |
Timer driver remove function.
desc | - timer descriptor |
int linux_timer_start | ( | struct no_os_timer_desc * | desc | ) |
Timer count start function.
desc | - timer descriptor |
int linux_timer_stop | ( | struct no_os_timer_desc * | desc | ) |
Timer count stop function.
desc | - timer descriptor |
const struct no_os_timer_platform_ops linux_timer_ops |
linux platform specific timer platform ops structure
Linux specific timer platform ops.