| mbox Vitis Drivers API Documentation

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

Functions
xmbox_example.c File Reference

## Overview

This file contains a design example for using the Mailbox hardware and driver XMbox.

The example assumes there are two processors availabile in the system that are expected to inter-communicate.

This example has been tested on ML505 Hardware Evaluation board.

Note

These code fragments will illustrate how the XMbox component can be used to:

- Initialize the Mailbox core
- Pass data between two processes

      MODIFICATION HISTORY:

      Ver   Who  Date     Changes

      1.00a va            First release
      1.00a ecm  06/09/07 Cleanup, new coding standard, check into XCS
      3.01a sdm  05/06/10 Cleanup for coding guidelines
      4.1   ms   01/23/17 Modified xil_printf statement in main function to
                          ensure that "Successfully ran" and "Failed" strings
                          are available in all examples. This is a fix for
                          CR-965028.
            ms   04/10/17 Modified filename tag to include the file in doxygen
                          examples.
      4.6   ht   07/07/23 Added support for system device-tree flow.
      4.9   ht   04/17/25 Update Canonical definition to be inline with xsct flow.
    *

## Functions
int | ProdCon ()
| This function performs the producer and consumer console functionality. More...
int | main (void)
| This function is the main function for the mailbox example. More...

## Function Documentation

int main | ( | void |  | ) |

This function is the main function for the mailbox example.

Parameters

  None. |

Returns
  XST_SUCCESS if successful, XST_FAILURE if unsuccessful.

Note
  None.

References ProdCon().

int ProdCon | ( |  | ) |

This function performs the producer and consumer console functionality.

At compile time the role, producer or consumer, is determined.

Parameters

  None. |

Returns
  XST_SUCCESS.

Note
  None.

References XMbox_Config::BaseAddress, XMbox_CfgInitialize(), XMbox_ReadBlocking(), and XMbox_WriteBlocking().

Referenced by main().