Nios® V Processor Software Developer Handbook

ID 743810
Date 10/12/2024
Public
Document Table of Contents

16.1.1.68. alt_sysclk_init()

Prototype

int alt_sysclk_init (alt_u32 nticks)

Commonly Called By

Device drivers

Thread-safe

No.

Available from ISR

No.

Include

<sys/alt_alarm.h>

Description

The alt_sysclk_init() function registers the presence of a system clock driver. The input argument is the number of ticks per second at which the system clock is run.

The expectation is that this function is only called from within alt_sys_init(), that is, while the system is running in single-threaded mode. Concurrent calls to this function might lead to unpredictable results.

Return

This function returns zero on success; otherwise it returns a negative value. The call can fail if a system clock driver is already registered, or if no system clock device is available.