no-OS
Loading...
Searching...
No Matches
riscvrx_timer.h File Reference

Timer control module header for Lattice RISC-V RX. More...

#include <stdbool.h>
#include <stdint.h>
#include "no_os_timer.h"
#include "plic.h"
Include dependency graph for riscvrx_timer.h:

Classes

struct  latt_timer_desc
 Lattice specific timer descriptor. More...
 
struct  latt_timer_init_param
 Lattice specific timer initialization parameters. More...
 

Enumerations

enum  latt_timer_source { LATT_TIMER_CLINT = 0 }
 

Functions

int32_t lattice_timer_set_callback (struct no_os_timer_desc *desc, void(*handler)(void *), void *ctx)
 Register timer callback and context for Lattice timer backend.
 

Variables

const struct no_os_timer_platform_ops latt_timer_ops
 Lattice platform specific timer platform ops structure.
 

Detailed Description

Timer control module header for Lattice RISC-V RX.

Author
Vilmos-Csaba Jozsa (vilmo.nosp@m.scsa.nosp@m.ba.jo.nosp@m.zsa@.nosp@m.analo.nosp@m.g.co.nosp@m.m)

Copyright 2025-2026(c) Analog Devices, Inc.

SPDX-License-Identifier: BSD-3-Clause

Enumeration Type Documentation

◆ latt_timer_source

Enumerator
LATT_TIMER_CLINT 

Function Documentation

◆ lattice_timer_set_callback()

int32_t lattice_timer_set_callback ( struct no_os_timer_desc * desc,
void(* handler )(void *),
void * ctx )

Register timer callback and context for Lattice timer backend.

Parameters
desc- Pointer to no-OS timer descriptor.
handler- Timer callback handler.
ctx- Callback context passed to handler.
Returns
0 in case of success, negative error code otherwise.

Register timer callback and context for Lattice timer backend.

Parameters
desc- no-OS timer descriptor.
handler- User callback function.
ctx- User callback context.
Returns
0 in case of success, negative error code otherwise.

Variable Documentation

◆ latt_timer_ops

const struct no_os_timer_platform_ops latt_timer_ops
extern

Lattice platform specific timer platform ops structure.