1.11.1.1. Mailbox Client Driver API
Prototype: | mailbox_client_open(const char *name) | |
Include: | For
|
<altera_s10_mailbox_client.h> |
For Agilex™ 5 devices | <intel_mailbox_client.h> | |
Parameter: |
|
|
Return: | Return non-NULL if successful and otherwise return:
|
|
Description: | Retrieve a pointer to the Mailbox Client block instance. Search for the list of registered mailbox client instances for the one with the supplied name. |
Prototype: | mailbox_client_send_cmd (intel_mailbox_client* fd, alt_u8 id, alt_u32 cmd, alt_u32* arg, int arg_length, int cmd_length, alt_u32* input_data, alt_u32* resp_buf, alt_u32 resp_buf_len) 17 | |
Include: | For
|
<altera_s10_mailbox_client.h> |
For Agilex™ 5 devices | <intel_mailbox_client.h> | |
Parameter: |
|
|
Return: | Return 0 if successful and otherwise return:
|
|
Description: | Send commands and data to the mailbox client. Reads back the response when data valid interrupt occurs. |
Prototype: | mailbox_client_flash_open(intel_mailbox_client* fd) | |
Include: | For
|
<altera_s10_mailbox_client_flash.h> |
For Agilex™ 5 devices | <intel_mailbox_client_flash.h> | |
Parameter: |
|
|
Return: | Return 0 if successful and otherwise return:
|
|
Description: | Send command to the mailbox client for QSPI open and QSPI chip select. Provides exclusive access to the quad SPI interface. Determines the QSPI flash size. |
Prototype: | mailbox_client_flash_close(intel_mailbox_client* fd) | |
Include: | For
|
<altera_s10_mailbox_client_flash.h> |
For Agilex™ 5 devices | <intel_mailbox_client_flash.h> | |
Parameter: |
|
|
Return: | Return 0 if successful and otherwise return:
|
|
Description: | Send command to the mailbox client for QSPI close. Stops the exclusive access to the quad SPI interface. |
Prototype: | mailbox_client_flash_get_info(intel_mailbox_client* fd, flash_region** info, int* number_of_regions) | |
Include: | For
|
<altera_s10_mailbox_client_flash.h> |
For Agilex™ 5 devices | <intel_mailbox_client_flash.h> | |
Parameter: |
|
|
Return: | Return 0 if successful and otherwise return:
|
|
Description: | Provide information corresponding to nCSO[0]. Returns the flash memory offset, flash memory size, number of flash device, number of sector, and sector size values. |
Prototype: | mailbox_client_flash_read (intel_mailbox_client* fd, int offset, void* dest_addr, int length) | |
Include: | For
|
<altera_s10_mailbox_client_flash.h> |
For Agilex™ 5 devices | <intel_mailbox_client_flash.h> | |
Parameter: |
|
|
Return: | Return 0 if successful and otherwise return:
|
|
Description: | Read data from selected address specified by the length in byte size. Length is a non-zero value. |
Prototype: | mailbox_client_flash_erase_block (intel_mailbox_client* fd, int block_offset) | |
Include: | For
|
<altera_s10_mailbox_client_flash.h> |
For Agilex™ 5 devices | <intel_mailbox_client_flash.h> | |
Parameter: |
|
|
Return: | Return 0 if successful and otherwise return:
|
|
Description: | Erase a single flash sector. |
Prototype: | mailbox_client_flash_write_block (intel_mailbox_client* fd, int block_offset, int data_offset, const void* data, int length) | |
Include: | For
|
<altera_s10_mailbox_client_flash.h> |
For Agilex™ 5 devices | <intel_mailbox_client_flash.h> | |
Parameter: |
|
|
Return: | Return 0 if successful and otherwise return:
|
|
Description: | Write one block or sector of data into the flash. The write data length cannot split between adjacent sectors. The function assumes the address is empty. You must erase it prior its programming. |
Prototype: | mailbox_client_flash_write (intel_mailbox_client* fd, int offset, const void* src_addr, int length) | |
Include: | For
|
<altera_s10_mailbox_client_flash.h> |
For Agilex™ 5 devices | <intel_mailbox_client_flash.h> | |
Parameter: |
|
|
Return: |
Return 0 if successful and otherwise return:
|
|
Description: | Program the data into the flash at the selected address. Automatically erase the block as needed before programming. |
Prototype: | mailbox_client_flash_erase_block(intel_mailbox_client* fd, int block_offset, int block_size) | |
Include: | For
|
<altera_s10_mailbox_client_flash.h> |
For Agilex™ 5 devices | <intel_mailbox_client_flash.h> | |
Parameter: |
|
|
Return: |
Return 0 for success and otherwise return:
|
|
Description: | Erase a single flash sector depends on block size given. |
Prototype: | mailbox_client_flash_erase(intel_mailbox_client* fd, int offset, int length) | |
Include: | For
|
<altera_s10_mailbox_client_flash.h> |
For Agilex™ 5 devices | <intel_mailbox_client_flash.h> | |
Parameter: |
|
|
Return: |
Return 0 for success and otherwise return:
|
|
Description: | Erase the flash according to the length given |
17 Prior to Quartus® Prime Pro Edition software version 21.3, the response buffer length (resp_buf_len) was declared as a pointer rather than an integer.
18 Argument represents the parameters needed for mailbox client operation, not including input data.
19 The recommended error code recovery is the full system reconfiguration.
21 If the response buffer length is insufficient, the HAL API discards the collected data from Mailbox Client Intel® FPGA IP and return ENOBUFS.