hwitag_find_clkfreq()

Updated: April 19, 2023

Find the clock source for a device

Synopsis:

#include <drvr/hwinfo.h>

long hwitag_find_clkfreq( unsigned hwi_off,
                          unsigned *clk_idx);

Arguments:

hwi_off
The offset into the hwinfo section of the system page for the device, which you can get by calling hwi_find_device().
clk_idx
NULL, or a pointer to a location that holds the index of the clock frequency that you want to find; see below.

Library:

libdrvr

Use the -l drvr option to qcc to link against this library.

Description:

You can use hwitag_find_clkfreq() to find one or more clock sources associated with the device at hwi_off in the hwinfo section of the system page.

Some devices contain clock sources vectors. You can retrieve the base frequency for all of them by using the clk_idx parameter as follows:

Returns:

The clock source frequency in Hz, or -1 if the clock source wasn't found.

Classification:

QNX Neutrino

Safety:  
Cancellation point No
Interrupt handler No
Signal handler No
Thread Yes