mipicsiss: function_prototype.c File Reference

| mipicsiss Xilinx SDK Drivers API Documentation

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

Functions
function_prototype.c File Reference

## Overview

    MODIFICATION HISTORY:

    Ver   Who    Date     Changes

    X.XX  XX     YY/MM/DD
    1.00  RHe    19/09/20 Initial release.

## Functions
u32 | SetupDSI (void)
| This function programs MIPI DSI SS with the required timing paramters. More...
u32 | InitializeDemosaic (void)
| This function programs Demosaic with the required timing paramters. More...
u32 | InitializeCsiRxSs (void)
| This function programs MIPI CSI SS with the required timing paramters. More...
void | EnableCSI (void)
void | DisableCSI (void)
void | DisableDSI (void)
int | InitIIC ()
| This function writes, reads, and verifies the data to the IIC EEPROM. More...
void | SendHandler (XIic *InstancePtr)
| This Send handler is called asynchronously from an interrupt context and indicates that data in the specified buffer has been sent. More...
void | ReceiveHandler (XIic *InstancePtr)
| This Receive handler is called asynchronously from an interrupt context and indicates that data in the specified buffer has been Received. More...
void | StatusHandler (XIic *InstancePtr, int Event)
| This Status handler is called asynchronously from an interrupt context and indicates the events that have occurred. More...
int | MuxInit (void)
| This function initializes the IIC MUX to select EEPROM. More...
int | FmcWriteData (u16 ByteCount)
| This function writes a buffer of data to the FMC IIC. More...
int | FmcReadData (u8 *BufferPtr, u16 ByteCount)
| This function reads data from the FMC IIC into a specified buffer. More...
int | AdapterWriteData (u16 ByteCount)
| This function writes a buffer of data to the Adapter IIC. More...
int | AdapterReadData (u8 *BufferPtr, u16 ByteCount)
| This function reads data from the Adapter IIC into a specified buffer. More...
void | ResetVDMA ()
| This function ResetVDMA. More...
void | ConfigureChannel (u32 VdmaChannel)
| This function to setup Horizontal size and stride. More...
void | SetupVdmaCR (s32 VdmaChannel, s32 FrameCount)
| This function to setup the VDMA Control Register. More...
void | StartChannel (s32 VdmaChannel, s32 VerticalSize)
| This function to start mm2s or s2mm VdmaChannel - write the vertical size. More...

## Function Documentation

int AdapterReadData | ( | u8 * | BufferPtr,
|  | u16 | ByteCount
| ) |  |

This function reads data from the Adapter IIC into a specified buffer.

Parameters

  BufferPtr | contains the address of the data buffer to be filled.
  ByteCount | contains the number of bytes in the buffer to be read.

Returns
  XST_SUCCESS if successful else XST_FAILURE.

Note
  None.

References AdapterWriteData().

int AdapterWriteData | ( | u16 | ByteCount | ) |

This function writes a buffer of data to the Adapter IIC.

Parameters

  ByteCount | contains the number of bytes in the buffer to be written.

Returns
  XST_SUCCESS if successful else XST_FAILURE.

Note
  The Byte count should not exceed the page size of the EEPROM as noted by the constant PAGE_SIZE.

Referenced by AdapterReadData().

void ConfigureChannel | ( | u32 | VdmaChannel | ) |

This function to setup Horizontal size and stride.

Parameters

  VdmaChannel | specifes VdmaChannel is MM2S or S2MM

Returns
  None

Note
  None.

void DisableCSI | ( | void |  | ) |

- This function disables MIPI CSI IP
  - - Returns
        None.
      Note
        None.

void DisableDSI | ( | void |  | ) |

- This function disables MIPI DSI SS.
  - - Returns
        None.
      Note
        None.

void EnableCSI | ( | void |  | ) |

- This function enables MIPI CSI IP
  - - Returns
        None.
      Note
        None.

Referenced by main().

int FmcReadData | ( | u8 * | BufferPtr,
|  | u16 | ByteCount
| ) |  |

This function reads data from the FMC IIC into a specified buffer.

Parameters

  BufferPtr | contains the address of the data buffer to be filled.
  ByteCount | contains the number of bytes in the buffer to be read.

Returns
  XST_SUCCESS if successful else XST_FAILURE.

Note
  None.

References FmcWriteData().

int FmcWriteData | ( | u16 | ByteCount | ) |

This function writes a buffer of data to the FMC IIC.

Parameters

  ByteCount | contains the number of bytes in the buffer to be written.

Returns
  XST_SUCCESS if successful else XST_FAILURE.

Note
  The Byte count should not exceed the page size of the EEPROM as noted by the constant PAGE_SIZE.

Referenced by FmcReadData(), and MuxInit().

u32 InitializeCsiRxSs | ( | void |  | ) |

This function programs MIPI CSI SS with the required timing paramters.

Returns
  None.

Note
  None.

Referenced by main().

u32 InitializeDemosaic | ( | void |  | ) |

This function programs Demosaic with the required timing paramters.

Returns
  None.

Note
  None.

References XCsiSs_Config::BaseAddr.

int InitIIC | ( |  | ) |

This function writes, reads, and verifies the data to the IIC EEPROM.

It does the write as a single page write, performs a buffered read.

Parameters

  None. |

Returns
  XST_SUCCESS if successful else XST_FAILURE.

Note
  None.

Referenced by main().

int MuxInit | ( | void |  | ) |

This function initializes the IIC MUX to select EEPROM.

Parameters

  None. |

Returns
  XST_SUCCESS if pass, otherwise XST_FAILURE.

Note
  None.

References FmcWriteData().

void ReceiveHandler | ( | XIic * | InstancePtr | ) |

This Receive handler is called asynchronously from an interrupt context and indicates that data in the specified buffer has been Received.

Parameters

  InstancePtr | is not used, but contains a pointer to the IIC device driver instance which the handler is being called for.

Returns
  None.

Note
  None.

Referenced by SetupIICIntrHandlers().

void ResetVDMA | ( |  | ) |

This function ResetVDMA.

Parameters

  None |

Returns
  None

Note
  None.

void SendHandler | ( | XIic * | InstancePtr | ) |

This Send handler is called asynchronously from an interrupt context and indicates that data in the specified buffer has been sent.

Parameters

  InstancePtr | is not used, but contains a pointer to the IIC device driver instance which the handler is being called for.

Returns
  None.

Note
  None.

Referenced by SetupIICIntrHandlers().

u32 SetupDSI | ( | void |  | ) |

This function programs MIPI DSI SS with the required timing paramters.

Returns
  None.

Note
  None.

Referenced by main().

void SetupVdmaCR | ( | s32 | VdmaChannel,
|  | s32 | FrameCount
| ) |  |

This function to setup the VDMA Control Register.

Parameters

  VdmaChannel | specifes VdmaChannel is MM2S or S2MM
  FrameCount | specifies number of frames to transfer

Returns
  None

Note
  None.

void StartChannel | ( | s32 | VdmaChannel,
|  | s32 | VerticalSize
| ) |  |

This function to start mm2s or s2mm VdmaChannel - write the vertical size.

Parameters

  VdmaChannel | specifes VdmaChannel is MM2S or S2MM
  VerticalSize | specifes No of lines

Returns
  None

Note
  None.

void StatusHandler | ( | XIic * | InstancePtr,
|  | int | Event
| ) |  |

This Status handler is called asynchronously from an interrupt context and indicates the events that have occurred.

Parameters

  InstancePtr | is a pointer to the IIC driver instance for which the handler is being called for.
  Event | indicates the condition that has occurred.

Returns
  None.

Note
  None.

Referenced by SetupIICIntrHandlers().