PDK API Guide for AM64x
MAILBOX Driver

Introduction

The Mailbox driver simplifies reading and writing to the Mailbox peripherals on the board with multiple modes of operation and performance. These include blocking, non-blocking, callback. Throughout this document the term local endpoint refers to the subsystem that instantiates the mailbox driver. The term remote endpoint refers to the subsystem that communicates to the local endpoint through the mailbox instance.
The application initializes the Mailbox driver by calling Mailbox_init() and it is then ready to open a Mailbox instance to a remote endpoint by calling Mailbox_open(). Once the mailbox instance is open, read and write operations can be performed.
The Mailbox header file should be included in an application as follows:

The mailbox/include/reg_mailbox.h has the register layer definitions for the Mailbox Module.

Initializing the driver

The Mailbox Driver needs to be initialized once per master. This is done using the Mailbox_init. None of the Mailbox APIs can be used before invoking this API.

Opening the driver

Once the Mailbox Driver has been initialized, the Mailbox Driver instance can be opened using the Mailbox_open.

Writing a message

Once the Mailbox Driver has been opened, the application can write a message to the remote endpoint using Mailbox_write.

Reading a message

Once the Mailbox Driver has been opened, the application can read a message from the remote endpoint using Mailbox_read followed by Mailbox_readFlush after the message is fully read.

Sub Modules

 Instance IDs
 
 MAILBOX Driver OSAL API
 
 MAILBOX_DRIVER_ERROR_CODE
 
 MAILBOX_DRIVER_EXTERNAL_DATA_STRUCTURE
 
 Mailbox Driver External Functions
 The section has a list of all the exported APIs which the application can invoke in order to use the driver.