RTEMS  5.0.0
Functions

Functions

ALT_CLK_t alt_clk_source_get (ALT_CLK_t clk)
 
ALT_STATUS_CODE alt_clk_source_set (ALT_CLK_t clk, ALT_CLK_t ref_clk)
 

Detailed Description

This API group provide access and control to the input reference clock source selection for a clock or PLL.

Function Documentation

◆ alt_clk_source_get()

ALT_CLK_t alt_clk_source_get ( ALT_CLK_t  clk)

Get the input reference clock source selection value for the specified clock or PLL.

NOTE: This function returns a clock value even though clk may specify a clock that does not have a selectable input reference clock source. In this case, the clock value returned is the static clock source for the specified clock. For example calling alt_clk_source_get() with clk set to ALT_CLK_MAIN_PLL will return ALT_CLK_OSC1.

Parameters
clkThe clock or PLL to retrieve the input reference clock source selection value for.
Returns
The clock's currently selected input reference clock source.

◆ alt_clk_source_set()

ALT_STATUS_CODE alt_clk_source_set ( ALT_CLK_t  clk,
ALT_CLK_t  ref_clk 
)

Set the specified clock's input reference clock source selection.

Parameters
clkThe clock or PLL to set the input reference clock source selection for.
ref_clkThe input reference clock source selection value.
Return values
ALT_E_SUCCESSThe operation was succesful.
ALT_E_ERRORThe operation failed.
ALT_E_BAD_ARGThe clk argument designates a clock that does not have a selectable input reference clock source.
ALT_E_INV_OPTIONThe ref_clk argument designates a clock that is an invalid reference clock source for the specified clock.