RTEMS  5.0.0
Macros | Functions
#include <string.h>
#include <stdio.h>
#include <inttypes.h>
#include <bsp/hwlib.h>
#include <bsp/alt_clock_manager.h>
#include "alt_qspi.h"
#include <bsp/alt_qspi_private.h>
#include <bsp/socal/alt_qspi.h>
#include <bsp/socal/alt_rstmgr.h>
#include <bsp/socal/alt_sysmgr.h>
#include <bsp/socal/hps.h>
#include <bsp/socal/socal.h>

Macros

#define dprintf(...)
 
#define MIN(a, b)   ((a) > (b) ? (b) : (a))
 
#define ALT_QSPI_CLK_FREQ_MIN   ((alt_freq_t)0)
 
#define ALT_QSPI_CLK_FREQ_MAX   ((alt_freq_t)432000000)
 
#define ALT_QSPI_INT_STATUS_ALL
 

Functions

ALT_STATUS_CODE alt_qspi_init (void)
 
ALT_STATUS_CODE alt_qspi_uninit (void)
 
ALT_STATUS_CODE alt_qspi_disable (void)
 
ALT_STATUS_CODE alt_qspi_enable (void)
 
uint32_t alt_qspi_int_status_get (void)
 
ALT_STATUS_CODE alt_qspi_int_clear (const uint32_t mask)
 
ALT_STATUS_CODE alt_qspi_int_disable (const uint32_t mask)
 
ALT_STATUS_CODE alt_qspi_int_enable (const uint32_t mask)
 
bool alt_qspi_is_idle (void)
 
ALT_STATUS_CODE alt_qspi_read (void *dst, uint32_t src, size_t size)
 
ALT_STATUS_CODE alt_qspi_write (uint32_t dst, const void *src, size_t size)
 
ALT_STATUS_CODE alt_qspi_replace (uint32_t dst, const void *src, size_t size)
 
ALT_QSPI_BAUD_DIV_t alt_qspi_baud_rate_div_get (void)
 
ALT_STATUS_CODE alt_qspi_baud_rate_div_set (const ALT_QSPI_BAUD_DIV_t baud_rate_div)
 
ALT_STATUS_CODE alt_qspi_chip_select_config_get (uint32_t *cs, ALT_QSPI_CS_MODE_t *cs_mode)
 
ALT_STATUS_CODE alt_qspi_chip_select_config_set (const uint32_t cs, const ALT_QSPI_CS_MODE_t cs_mode)
 
ALT_STATUS_CODE alt_qspi_mode_bit_disable (void)
 
ALT_STATUS_CODE alt_qspi_mode_bit_enable (void)
 
uint32_t alt_qspi_mode_bit_config_get (void)
 
ALT_STATUS_CODE alt_qspi_mode_bit_config_set (const uint32_t mode_bits)
 
ALT_STATUS_CODE alt_qspi_device_size_config_get (ALT_QSPI_DEV_SIZE_CONFIG_t *cfg)
 
ALT_STATUS_CODE alt_qspi_device_size_config_set (const ALT_QSPI_DEV_SIZE_CONFIG_t *cfg)
 
ALT_STATUS_CODE alt_qspi_device_read_config_get (ALT_QSPI_DEV_INST_CONFIG_t *cfg)
 
ALT_STATUS_CODE alt_qspi_device_read_config_set (const ALT_QSPI_DEV_INST_CONFIG_t *cfg)
 
ALT_STATUS_CODE alt_qspi_device_write_config_get (ALT_QSPI_DEV_INST_CONFIG_t *cfg)
 
ALT_STATUS_CODE alt_qspi_device_write_config_set (const ALT_QSPI_DEV_INST_CONFIG_t *cfg)
 
ALT_STATUS_CODE alt_qspi_timing_config_get (ALT_QSPI_TIMING_CONFIG_t *cfg)
 
ALT_STATUS_CODE alt_qspi_timing_config_set (const ALT_QSPI_TIMING_CONFIG_t *cfg)
 
ALT_STATUS_CODE alt_qspi_direct_disable (void)
 
ALT_STATUS_CODE alt_qspi_direct_enable (void)
 
uint32_t alt_qspi_ahb_remap_address_get (void)
 
ALT_STATUS_CODE alt_qspi_ahb_remap_address_set (const uint32_t ahb_remap_addr)
 
ALT_STATUS_CODE alt_qspi_ahb_address_remap_disable (void)
 
ALT_STATUS_CODE alt_qspi_ahb_address_remap_enable (void)
 
ALT_STATUS_CODE alt_qspi_indirect_read_start (const uint32_t flash_addr, const size_t num_bytes)
 
ALT_STATUS_CODE alt_qspi_indirect_read_finish (void)
 
ALT_STATUS_CODE alt_qspi_indirect_read_cancel (void)
 
uint32_t alt_qspi_indirect_read_fill_level (void)
 
uint32_t alt_qspi_indirect_read_watermark_get (void)
 
ALT_STATUS_CODE alt_qspi_indirect_read_watermark_set (const uint32_t watermark)
 
bool alt_qspi_indirect_read_is_complete (void)
 
ALT_STATUS_CODE alt_qspi_indirect_write_start (const uint32_t flash_addr, const size_t num_bytes)
 
ALT_STATUS_CODE alt_qspi_indirect_write_finish (void)
 
ALT_STATUS_CODE alt_qspi_indirect_write_cancel (void)
 
uint32_t alt_qspi_indirect_write_fill_level (void)
 
uint32_t alt_qspi_indirect_write_watermark_get (void)
 
ALT_STATUS_CODE alt_qspi_indirect_write_watermark_set (const uint32_t watermark)
 
bool alt_qspi_indirect_write_is_complete (void)
 
uint32_t alt_qspi_sram_partition_get (void)
 
ALT_STATUS_CODE alt_qspi_sram_partition_set (const uint32_t read_part_size)
 
ALT_STATUS_CODE alt_qspi_erase_subsector (const uint32_t addr)
 
ALT_STATUS_CODE alt_qspi_erase_sector (const uint32_t addr)
 
ALT_STATUS_CODE alt_qspi_erase_chip (void)
 
ALT_STATUS_CODE alt_qspi_dma_disable (void)
 
ALT_STATUS_CODE alt_qspi_dma_enable (void)
 
ALT_STATUS_CODE alt_qspi_dma_config_get (uint32_t *single_type_sz, uint32_t *burst_type_sz)
 
ALT_STATUS_CODE alt_qspi_dma_config_set (const uint32_t single_type_sz, const uint32_t burst_type_sz)
 
ALT_STATUS_CODE alt_qspi_stig_cmd (uint32_t opcode, uint32_t dummy, uint32_t timeout)
 
ALT_STATUS_CODE alt_qspi_stig_rd_cmd (uint8_t opcode, uint32_t dummy, uint32_t num_bytes, uint32_t *output, uint32_t timeout)
 
ALT_STATUS_CODE alt_qspi_stig_wr_cmd (uint8_t opcode, uint32_t dummy, uint32_t num_bytes, const uint32_t *input, uint32_t timeout)
 
ALT_STATUS_CODE alt_qspi_stig_addr_cmd (uint8_t opcode, uint32_t dummy, uint32_t address, uint32_t timeout)
 
ALT_STATUS_CODE alt_qspi_device_wren (void)
 
ALT_STATUS_CODE alt_qspi_device_wrdis (void)
 
ALT_STATUS_CODE alt_qspi_device_rdid (uint32_t *rdid)
 
ALT_STATUS_CODE alt_qspi_discovery_parameter (uint32_t *param)
 
ALT_STATUS_CODE alt_qspi_device_bank_select (uint32_t bank)
 
ALT_STATUS_CODE alt_qspi_ecc_start (void *block, size_t size)
 

Macro Definition Documentation

◆ ALT_QSPI_INT_STATUS_ALL

#define ALT_QSPI_INT_STATUS_ALL
Value:
( \
ALT_QSPI_INT_STATUS_MODE_FAIL | \
ALT_QSPI_INT_STATUS_UFL | \
ALT_QSPI_INT_STATUS_IDAC_OP_COMPLETE | \
ALT_QSPI_INT_STATUS_IDAC_OP_REJECT | \
ALT_QSPI_INT_STATUS_WR_PROT_VIOL | \
ALT_QSPI_INT_STATUS_ILL_AHB_ACCESS | \
ALT_QSPI_INT_STATUS_IDAC_WTRMK_TRIG | \
ALT_QSPI_INT_STATUS_RX_OVF | \
ALT_QSPI_INT_STATUS_TX_FIFO_NOT_FULL | \
ALT_QSPI_INT_STATUS_TX_FIFO_FULL | \
ALT_QSPI_INT_STATUS_RX_FIFO_NOT_EMPTY | \
ALT_QSPI_INT_STATUS_RX_FIFO_FULL | \
ALT_QSPI_INT_STATUS_IDAC_RD_FULL \
)