| mipicsiss Vitis 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 | InitializeCsiRxSs (void)
| This function programs MIPI CSI SS with the required timing paramters. More...
void | EnableCSI (void)
void | InitDSI (void)
| This function programs MIPI DSI SS with the required timing paramters. More...
void | DisableCSI (void)
void | DisableDSI (void)
void | resetIp (void)
| This function resets IPs. More...
int | demosaic ()
| This function programs colour space converter with the given width and height. More...
void | resetVIP (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 | AdapterWriteData (u16 ByteCount)
| This function writes a buffer of data to the Adapter IIC. More...
int | RunVDMA (XAxiVdma *InstancePtr, int DeviceId, int hsize, int vsize, int buf_base_addr, int number_frame_count, int enable_frm_cnt_intr)
| RunVDMA API. More...
s32 | WaitForCompletion (s32 VdmaChannel, u32 *VdmaBaseAddr)
| This function wait until the DMA channel halts. More...
void | ResetVDMA ()
| This function ResetVDMA. More...

## Function Documentation

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.

int demosaic | ( |  | ) |

This function programs colour space converter with the given width and height.

Parameters

  width | is Hsize of a packet in pixels.
  height | is number of lines of a packet.

Returns
  None.

Note
  None.

Referenced by main().

void DisableCSI | ( | void |  | ) |

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

Referenced by resetIp().

void DisableDSI | ( | void |  | ) |

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

Referenced by resetIp().

void EnableCSI | ( | void |  | ) |

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

Referenced by main().

void InitDSI | ( | void |  | ) |

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

Returns
  None.

Note
  None.

Referenced by main().

u32 InitializeCsiRxSs | ( | void |  | ) |

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

Returns
  None.

Note
  None.

Referenced by main().

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().

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 resetIp | ( | void |  | ) |

This function resets IPs.

Returns
  None.

Note
  None.

References DisableCSI(), DisableDSI(), and resetVIP().

Referenced by main().

void ResetVDMA | ( |  | ) |

This function ResetVDMA.

Parameters

  None |

Returns
  None

Note
  None.

void resetVIP | ( | void |  | ) |

- * This function resets and releases IPs
  - *
    - *
      Returns
        None.
        - *
          - *
      Note
        None.
        - *

Referenced by resetIp().

int RunVDMA | ( | XAxiVdma * | InstancePtr,
|  | int | DeviceId,
|  | int | hsize,
|  | int | vsize,
|  | int | buf_base_addr,
|  | int | number_frame_count,
|  | int | enable_frm_cnt_intr
| ) |  |

RunVDMA API.

This API is the interface between application and other API. When application will call this API with right argument, This API will call rest of the API to configure the read and write path of VDMA,based on ID. After that it will start both the read and write path of VDMA

Parameters

  InstancePtr | is the handle to XAxiVdma data structure.
  DeviceId | is the device ID of current VDMA
  hsize | is the horizontal size of the frame. It will be in Pixels. The actual size of frame will be calculated by multiplying this with tdata width.
  vsize | is the Vertical size of the frame.
  buf_base_addr | is the buffer address where frames will be written and read by VDMA.
  number_frame_count | specifies after how many frames the interrupt should come.
  enable_frm_cnt_intr | is for enabling frame count interrupt when set to 1.

Returns
  - XST_SUCCESS if example finishes successfully
  - XST_FAILURE if example fails.

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 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().

s32 WaitForCompletion | ( | s32 | VdmaChannel,
|  | u32 * | VdmaBaseAddr
| ) |  |

This function wait until the DMA channel halts.

Parameters

  VdmaChannel | specifes VdmaChannel is MM2S or S2MM .
  VdmaBaseAddr | VDMA base address

Returns
  MM2S_HALT_SUCCESS, S2MM_HALT_SUCCESS in success MM2S_HALT_FAILURE, S2MM_HALT_FAILURE on failure

Note
  None.