v_sdirxss: main.c File Reference

| v_sdirxss Xilinx SDK Drivers API Documentation

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

Macros | Functions
main.c File Reference

## Overview

This file demonstrates the SDI Tx to SDI Tx loopback design for KCU116 board.

    MODIFICATION HISTORY:

    Ver   Who  Date       Changes

    1.0  jsr   03/07/2018 Initial version

## Macros
#define | I2C_MUX_ADDR 0x74
| I2C Mux Address. More...
#define | I2C_CLK_ADDR 0x69
| I2C Clk Address. More...
#define | I2C_CLK_ADDR_570 0x5D
| I2C Clk Address for Si570. More...

## Functions
int | Si570_SetClock (u32 IICBaseAddress, u8 IICAddress1, u32 RxRefClk)
| Set the output frequency of the Si570 clock generator. More...
void | slave_StringCopy (char *StrOut, spi_slave_sel slave_sel)
| This function copies string based on spi slave selection. More...
void | cls (void)
| This function clears the screen. More...
void | get_input2_val (void)
| This function takes the input from user. More...
void | ctrl_main_menu (unsigned char IsValid)
| This function display the user menu. More...
void | ctlr_spi_slv_select_menu (unsigned char IsValid)
| This function displays spi slave selection menu. More...
void | mode_menu (unsigned char IsMode)
| This function has Menu to generate modes. More...
void | sd_reso_menu (unsigned char IsSDReso)
| This function has Menu for resolutions. More...
void | hd_reso_menu (unsigned char IsHDReso)
| This function has Menu for HD resolutions. More...
void | threeg_reso_menu (unsigned char Is3GReso)
| This function has Menu for 3G resolutions. More...
void | higher_reso_menu (unsigned char IsHigerReso)
| This function has Menu for higher resolutions. More...
void | fps_1_menu (unsigned char IsFPS1)
| This function has Menu for fps. More...
void | fps_2_menu (unsigned char IsFPS2)
| This function has Menu for fps. More...
void | fps_3_menu (unsigned char IsFPS3)
| This function has Menu for fps. More...
void | fps_4_menu (unsigned char IsFPS4)
| This function has Menu for fps. More...
void | report_audio_status (void)
| This function reports audio status. More...
void | reset_audio_generator (void)
| This function resets the audio test pattern generator. More...
void | GT_Reset (void)
| This function resets the audio test pattern generator. More...
void | ctrl_app (unsigned char inchar)
| This function has Main control for Fidus FMC register configuration. More...
void | get_ctrl_app_input (void)
| This function Fetch input from UART then callback voip_contrl_app to process the selction. More...
int | main ()
| Main function to call example with SDI RX and SDI TX drivers for KCU116 board. More...

## Macro Definition Documentation

#define I2C_CLK_ADDR 0x69

I2C Clk Address.

#define I2C_CLK_ADDR_570 0x5D

I2C Clk Address for Si570.

Referenced by main().

#define I2C_MUX_ADDR 0x74

I2C Mux Address.

## Function Documentation

void cls | ( | void |  | ) |

This function clears the screen.

Returns
  None.

Note
  None

Referenced by main().

void ctlr_spi_slv_select_menu | ( | unsigned char | IsValid | ) |

This function displays spi slave selection menu.

Parameters

  IsValid | Returns from menu for a 0 value.

Returns
  None

Note
  None

Referenced by ctrl_app().

void ctrl_app | ( | unsigned char | inchar | ) |

This function has Main control for Fidus FMC register configuration.

Parameters

  inchar | Character input to show the main menu.

Returns
  None

Note
  None

References ctlr_spi_slv_select_menu(), ctrl_main_menu(), fps_1_menu(), fps_2_menu(), fps_3_menu(), fps_4_menu(), fzetta_fmc_init(), fzetta_fmc_register_read(), fzetta_fmc_register_write(), get_input2_val(), hd_reso_menu(), higher_reso_menu(), mode_menu(), report_audio_status(), reset_audio_generator(), sd_reso_menu(), slave_StringCopy(), and threeg_reso_menu().

Referenced by get_ctrl_app_input(), and main().

void ctrl_main_menu | ( | unsigned char | IsValid | ) |

This function display the user menu.

Parameters

  IsValid | Returns from menu for a 0 value.

Returns
  None.

Note
  None

Referenced by ctrl_app().

void fps_1_menu | ( | unsigned char | IsFPS1 | ) |

This function has Menu for fps.

Parameters

  IsFPS1 | Returns from menu for a 0 value.

Returns
  None

Note
  HD-720p,1080i, 3G-A, 12G

Referenced by ctrl_app().

void fps_2_menu | ( | unsigned char | IsFPS2 | ) |

This function has Menu for fps.

Parameters

  IsFPS2 | Returns from menu for a 0 value.

Returns
  None

Note
  HD-1080p

Referenced by ctrl_app().

void fps_3_menu | ( | unsigned char | IsFPS3 | ) |

This function has Menu for fps.

Parameters

  IsFPS3 | Returns from menu for a 0 value.

Returns
  None

Note
  3G-B, 6G

Referenced by ctrl_app().

void fps_4_menu | ( | unsigned char | IsFPS4 | ) |

This function has Menu for fps.

Parameters

  IsFPS4 | Returns from menu for a 0 value.

Returns
  None

Note
  HD-1080pSF

Referenced by ctrl_app().

void get_ctrl_app_input | ( | void |  | ) |

This function Fetch input from UART then callback voip_contrl_app to process the selction.

Returns
  None

Note
  None

References ctrl_app().

Referenced by main().

void get_input2_val | ( | void |  | ) |

This function takes the input from user.

Returns
  None.

Note
  None

Referenced by ctrl_app().

void GT_Reset | ( | void |  | ) |

This function resets the audio test pattern generator.

Parameters

  None |

Returns
  None

Note
  None

void hd_reso_menu | ( | unsigned char | IsHDReso | ) |

This function has Menu for HD resolutions.

Parameters

  IsHDReso | Returns from menu for a 0 value.

Returns
  None

Note
  None

Referenced by ctrl_app().

void higher_reso_menu | ( | unsigned char | IsHigerReso | ) |

This function has Menu for higher resolutions.

Parameters

  IsHigerReso | Returns from menu for a 0 value.

Returns
  None

Note
  None

Referenced by ctrl_app().

int main | ( | void |  | ) |

Main function to call example with SDI RX and SDI TX drivers for KCU116 board.

Returns
  - XST_SUCCESS if SDI example was successfully.
  - XST_FAILURE if SDI example failed.

Note
  None

References cls(), ctrl_app(), fzetta_fmc_init(), get_ctrl_app_input(), I2C_CLK_ADDR_570, and Si570_SetClock().

void mode_menu | ( | unsigned char | IsMode | ) |

This function has Menu to generate modes.

Parameters

  IsMode | Returns from menu for a 0 value.

Returns
  None

Note
  None

Referenced by ctrl_app().

void report_audio_status | ( | void |  | ) |

This function reports audio status.

Parameters

  None |

Returns
  None

Note
  None

Referenced by ctrl_app().

void reset_audio_generator | ( | void |  | ) |

This function resets the audio test pattern generator.

Parameters

  None |

Returns
  None

Note
  None

Referenced by ctrl_app().

void sd_reso_menu | ( | unsigned char | IsSDReso | ) |

This function has Menu for resolutions.

Parameters

  IsSDReso | Returns from menu for a 0 value.

Returns
  None

Note
  None

Referenced by ctrl_app().

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 Si5324 device.
  RxRefClk | is the input reference clock that can be either of FREQ_SI570_148_5_MHz, FREQ_SI570_148_35_MHz

Returns
  SI5324_SUCCESS for success, SI5324_ERR_IIC for IIC access failure, SI5324_ERR_FREQ when the requested frequency cannot be generated, SI5324_ERR_PARM when the ClkSrc or ClkDest parameters are invalid or the ClkInFreq or ClkOutFreq are out of range.

Referenced by main().

void slave_StringCopy | ( | char * | StrOut,
|  | spi_slave_sel | slave_sel
| ) |  |

This function copies string based on spi slave selection.

Parameters

  StrOut | Destination string.
  slave_sel | The string to be copied.

Returns
  None

Note
  None

Referenced by ctrl_app().

void threeg_reso_menu | ( | unsigned char | Is3GReso | ) |

This function has Menu for 3G resolutions.

Parameters

  Is3GReso | Returns from menu for a 0 value.

Returns
  None

Note
  None

Referenced by ctrl_app().