SemiDrive SSDK Appication Program Interface PTG3.0
Data Structures | Functions
sdrv_xspi_slv.h File Reference
#include <debug.h>
#include <stdlib.h>
#include <types.h>
#include <sdrv_ckgen.h>
#include <sdrv_common.h>

Go to the source code of this file.

Data Structures

struct  sdrv_xspi_slv_sclk_idle_time_conf
 
struct  sdrv_xspi_slv_debounce_ctrl_conf
 
struct  sdrv_xspi_slv_dummy_cycle_conf
 
struct  sdrv_xspi_slv_timeout_mon_ctrl_conf
 
struct  sdrv_xspi_slv_aid_conf
 
struct  sdrv_xspi_slv_acache_conf
 
struct  sdrv_xspi_slv_aprot_conf
 
struct  sdrv_xspi_slv_region_map_conf
 
struct  sdrv_xspi_slv_mon_conf
 
struct  sdrv_xspi_slv_conf
 
struct  sdrv_xspi_slv
 

Functions

status_t sdrv_xspi_slv_init (struct sdrv_xspi_slv *slave, const struct sdrv_xspi_slv_conf *conf)
 
status_t sdrv_xspi_slv_set_attr (struct sdrv_xspi_slv *slave, enum sdrv_xspi_slv_ioctl_flag flag, const void *buf)
 
status_t sdrv_xspi_slv_get_attr (struct sdrv_xspi_slv *slave, enum sdrv_xspi_slv_ioctl_flag flag, void *buf)
 
status_t sdrv_xspi_slv_enable (struct sdrv_xspi_slv *slave)
 
status_t sdrv_xspi_slv_disable (struct sdrv_xspi_slv *slave)
 
status_t sdrv_xspi_slv_deinit (struct sdrv_xspi_slv *slave)
 
status_t sdrv_xspi_slv_clr_status (struct sdrv_xspi_slv *slave)
 

Detailed Description

Enumeration Type Documentation

◆ sdrv_xspi_master_error

xspi slaver status error code.

Enumerator
SSDRV_STATUS_GROUP_XSPI_MASTER_LOCKED_ERR 

xspi master lock error

SSDRV_STATUS_GROUP_XSPI_MASTER_CHECK_BIT_ERR 

xspi master check bit error

SSDRV_STATUS_GROUP_XSPI_MASTER_MODE_CTRL_BUSY_ERR 

xspi master ctrl mode busy

SSDRV_STATUS_GROUP_XSPI_MASTER_CTRL_BUSY_ERR 

xspi master ctrl busy

SSDRV_STATUS_GROUP_XSPI_MASTER_SET_FLAG_ATTR_ERR 

xspi master set flag error

SSDRV_STATUS_GROUP_XSPI_MASTER_GET_FLAG_ATTR_ERR 

xspi master get flag error

SSDRV_STATUS_GROUP_XSPI_SLAVER_SET_FLAG_ATTR_ERR 

xspi slaver set flag error

SSDRV_STATUS_GROUP_XSPI_SLAVER_GET_FLAG_ATTR_ERR 

xspi slaver get flag error

SSDRV_STATUS_GROUP_XSPI_SLAVER_GET_STATUS_ERR 

xspi slaver get status error

◆ sdrv_xspi_slv_bit_endian

Enumerator
XSPI_SLV_BIG_ENDIAN 

xspi bus transfer big endian

XSPI_SLV_LITTLE_ENDIAN 

xspi bus transfer little endian

◆ sdrv_xspi_slv_ioctl_flag

xspi slave set attr.

Enumerator
XSPI_SLV_FLAG_EN 

xspi slave mode control

XSPI_SLV_FLAG_CRC_EN 

CRC32 enable

XSPI_SLV_FLAG_BIT_ENDIAN 

xspi bus transfer big endian enable

XSPI_SLV_FLAG_PAD_RESET_MASK 

soft reset enable

XSPI_SLV_FLAG_WR_CHK_EN 

write check enable

XSPI_SLV_FLAG_TX_MODE 

tx mode configurations

XSPI_SLV_FLAG_AXI_WR_EN 

axi write operation enable

XSPI_SLV_FLAG_AXI_RD_EN 

axi read operation enable

XSPI_SLV_FLAG_MODE 

driect mode or indirect mode

XSPI_SLV_FLAG_SCLK_IDLE_TIME 

sclk idle time

XSPI_SLV_FLAG_RATE 

xspi slave rate

XSPI_SLV_FLAG_LINE 

xspi slave line

XSPI_SLV_FLAG_DEBOUNCE_CTRL 

xspi debounce time

XSPI_SLV_FLAG_TIMEOUT_CTRL 

xspi timeout monitor time

XSPI_SLV_FLAG_ST_ACCESS 

xspi slave status access permission by xspi master

XSPI_SLV_FLAG_ID0 

ID0 value

XSPI_SLV_FLAG_ID1 

ID1 value

XSPI_SLV_FLAG_PAD_INTB_MASK 

pad intb mask value base on xspi slave status

XSPI_SLV_FLAG_PAD_CRCB_MASK 

pad crcb mask value base on xspi slave status

XSPI_SLV_FLAG_INT_ST 

irq interrupt status

XSPI_SLV_FLAG_INT_MASK 

irq interrupt status mask

XSPI_SLV_FLAG_ST 

xspi slave status

XSPI_SLV_FLAG_ST_UPDATE 

xspi slave status update

XSPI_SLV_FLAG_CMD_WR_TRG 

write trigger command (only valid in indirect mode)

XSPI_SLV_FLAG_CMD_RD_TRG 

read trigger command (only valid in indirect mode)

XSPI_SLV_FLAG_CMD_WR_PACKET0 

write packet0 command (only valid in indirect mode)

XSPI_SLV_FLAG_CMD_WR_PACKET1 

write packet1 command (only valid in indirect mode)

XSPI_SLV_FLAG_CMD_WR_PAYLOAD 

write payload command (only valid in indirect mode)

XSPI_SLV_FLAG_CMD_WR_WDATA 

write wdata command (only valid in indirect mode)

XSPI_SLV_FLAG_CMD_WR_ST 

write status command (only valid in indirect mode)

XSPI_SLV_FLAG_CMD_RD_ID 

read id command (only valid in indirect mode)

XSPI_SLV_FLAG_CMD_RD_ST 

read status command (only valid in indirect mode)

XSPI_SLV_FLAG_CMD_RD_RDATA 

read rdata command (only valid in indirect mode)

XSPI_SLV_FLAG_CMD_RD_RDATA_CRC 

read rdata with CRC command (only valid in indirect mode)

XSPI_SLV_FLAG_ARID_OVERRIDE 

arid override value

XSPI_SLV_FLAG_ARCACHE_OVERRIDE 

arcache override value

XSPI_SLV_FLAG_ARPROT_OVERRIDE 

arprot override value

XSPI_SLV_FLAG_AWID_OVERRIDE 

awid override value

XSPI_SLV_FLAG_AWCACHE_OVERRIDE 

awcache override value

XSPI_SLV_FLAG_AWPROT_OVERRIDE 

awprot override value

XSPI_SLV_FLAG_REGION_MAP 

region map control

XSPI_SLV_FLAG_RD_MON 

read monitor permission control

XSPI_SLV_FLAG_WR_MON 

write monitor permission control

XSPI_SLV_FLAG_WR_DUMMY_CYCLE 

set xspi slv dummy cycle

XSPI_SLV_FLAG_MAX 

end

◆ sdrv_xspi_slv_line

Enumerator
XSPI_SLV_1_LINE 

xspi slave line 00: 1-line

XSPI_SLV_4_LINE 

xspi slave line 01: 4-line

XSPI_SLV_8_LINE 

xspi slave line 10: 8-line

XSPI_SLV_16_LINE 

xspi slave line 11: 16-line

◆ sdrv_xspi_slv_mode

Enumerator
XSPI_SLV_INDIRECT_MODE 

xspi slave indirect mode

XSPI_SLV_DIRECT_MODE 

xspi slave direct mode

◆ sdrv_xspi_slv_tx_mode

Enumerator
XSPI_SLV_DQS_DIV2_ACLK 

QDS is DIV2 based on aclk

XSPI_SLV_DQS_SCLK 

QDS is based on sclk

Function Documentation

◆ sdrv_xspi_slv_clr_status()

status_t sdrv_xspi_slv_clr_status ( struct sdrv_xspi_slv slave)

xspi slave status.

Parameters
[in]xspiget slaver status
Returns
int
Return values
0success
otherfail

◆ sdrv_xspi_slv_deinit()

status_t sdrv_xspi_slv_deinit ( struct sdrv_xspi_slv slave)

xspi slave deinit.

Parameters
[in]xspislave dev
Returns
int
Return values
0success
otherfail

◆ sdrv_xspi_slv_disable()

status_t sdrv_xspi_slv_disable ( struct sdrv_xspi_slv slave)

xspi slave disable.

This function used for xspi disable receive data.

Parameters
[in]xspislave dev
Returns
int
Return values
0success
otherfail

◆ sdrv_xspi_slv_enable()

status_t sdrv_xspi_slv_enable ( struct sdrv_xspi_slv slave)

xspi slave enable.

This function used for xspi enable receive data.

Parameters
[in]xspislave dev
Returns
int
Return values
0success
otherfail

◆ sdrv_xspi_slv_get_attr()

status_t sdrv_xspi_slv_get_attr ( struct sdrv_xspi_slv slave,
enum sdrv_xspi_slv_ioctl_flag  flag,
void *  buf 
)

xspi slave get attr.

This function used for xspi slave get attribute, and detailed flag reference structure definitions.

Parameters
[in]xspislave dev
[in]xspislave ioctl flag
[out]xspislave buf
Returns
int
Return values
0success
otherfail

◆ sdrv_xspi_slv_init()

status_t sdrv_xspi_slv_init ( struct sdrv_xspi_slv slave,
const struct sdrv_xspi_slv_conf conf 
)

xspi slave slave init.

Parameters
[in]xspislave dev
[in]xspislave config
Returns
int
Return values
0success
otherfail

◆ sdrv_xspi_slv_set_attr()

status_t sdrv_xspi_slv_set_attr ( struct sdrv_xspi_slv slave,
enum sdrv_xspi_slv_ioctl_flag  flag,
const void *  buf 
)

xspi slave set attr.

This function used for xspi slave set attribute, and detailed flag reference structure definitions.

Parameters
[in]xspislave dev
[in]xspislave ioctl flag
[in]xspislave buf
Returns
int
Return values
0success
-1fail