This API group provide access and control to the input reference clock source selection for a clock or PLL.
◆ alt_clk_source_get()
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
-
clk | The 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()
Set the specified clock's input reference clock source selection.
- Parameters
-
clk | The clock or PLL to set the input reference clock source selection for. |
ref_clk | The input reference clock source selection value. |
- Return values
-
ALT_E_SUCCESS | The operation was succesful. |
ALT_E_ERROR | The operation failed. |
ALT_E_BAD_ARG | The clk argument designates a clock that does not have a selectable input reference clock source. |
ALT_E_INV_OPTION | The ref_clk argument designates a clock that is an invalid reference clock source for the specified clock. |