v_sditxss: si570drv.c File Reference

| v_sditxss Xilinx SDK Drivers API Documentation

- Overview
- Data Structures
- APIs
- File List
- Examples

Functions
si570drv.c File Reference

## Overview

This file contains low-level driver functions for controlling the SiliconLabs Si570 clock generator as mounted on the ZCU106 demo board.

The user should refer to the hardware device specification for more details of the device operation.

    MODIFICATION HISTORY:

    Ver   Who Date         Changes

    1.0   ssh 07/05/2018      Initial release.

## Functions
int | Si570_DoSettings (u32 IICBaseAddress, u8 IICAddress1, u8 *BufPtr, int NumRegs)
| Send a list of register settings to the Si570 clock generator. More...
int | Si570_SetClock (u32 IICBaseAddress, u8 IICAddress1, u32 RxRefClk)
| Set the output frequency of the Si570 clock generator. More...

## Function Documentation

int Si570_DoSettings | ( | u32 | IICBaseAddress,
|  | u8 | IICAddress1,
|  | u8 * | BufPtr,
|  | int | NumRegs
| ) |  |

Send a list of register settings to the Si570 clock generator.

Parameters

  IICBaseAddress | contains the base address of the IIC master device.
  IICAddress1 | contains the 7 bit IIC address of the Si570 device.
  BufPtr | is a pointer to an array with alternating register addresses and register values to program into the Si570. The array length must be at least 2*NumRegs.
  NumRegs | contains the number of registers to write.

Returns
  SI570_SUCCESS for success
  SI570_ERR_IIC for IIC access failure,
  SI570_ERR_FREQ when the requested frequency cannot be generated
  SI570_ERR_PARM when the ClkSrc or ClkDest parameters are invalid or the ClkInFreq or ClkOutFreq are out of range.

Note
  Private function. Does not modify the contents of the buffer pointed to by BufPtr.

References SI570_DEBUG, SI570_ERR_IIC, SI570_ERR_PARM, and SI570_SUCCESS.

Referenced by Si570_SetClock().

int Si570_SetClock | ( | u32 | IICBaseAddress,
|  | u8 | IICAddress1,
|  | u32 | RxRefClk
| ) |  |

Set the output frequency of the Si570 clock generator.

Parameters

  IICBaseAddress | contains the base address of the IIC master device.
  IICAddress1 | contains the 7 bit IIC address of the Si570 device.
  RxRefClk | contains the value to be written in Si570 register for that particular clock frequency.

Returns
  SI570_SUCCESS for success
  SI570_ERR_IIC for IIC access failure,
  SI570_ERR_FREQ when the requested frequency cannot be generated
  SI570_ERR_PARM when the ClkSrc or ClkDest parameters are invalid or the ClkInFreq or ClkOutFreq are out of range.

References SI570_DEBUG, and Si570_DoSettings().

Referenced by main(), and RxStreamUpCallback().