You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.1 KiB
42 lines
1.1 KiB
#ifndef __VXB_FTSPI_H__
|
|
#define __VXB_FTSPI_H__
|
|
#include <vxWorks.h>
|
|
#include <config.h>
|
|
#include <sysLib.h>
|
|
#include <vxBusLib.h>
|
|
#include <string.h>
|
|
#include <memLib.h>
|
|
#include <stdlib.h>
|
|
#include <semLibCommon.h>
|
|
#include <hwif/vxbus/vxbSpiLib.h>
|
|
|
|
#define FT_SPI_NAME "ftSpi"
|
|
#define SPI_MAX_CS_NUM 4
|
|
|
|
#define FSPIM_DEFAULT_FRF 0
|
|
#define FSPIM_DEFAULT_CFS 0
|
|
/* structure holding the instance specific details */
|
|
typedef struct _ft_spi_drv_ctrl {
|
|
VXB_DEVICE_ID pDev;
|
|
void * regBase;
|
|
void * regHandle;
|
|
UINT32 clkFreq;
|
|
UINT32 speed;
|
|
int mode;
|
|
int dataWidth;
|
|
int cs;
|
|
UINT32 length;
|
|
UINT32 tx_fifo_len;
|
|
UINT32 rx_fifo_len;
|
|
UINT32 tx_count;
|
|
UINT32 rx_count;
|
|
const UINT8* tx_buff;
|
|
UINT8* rx_buff;
|
|
BOOL en_test;
|
|
UINT32 spiDevNum;
|
|
UINT32 initPhase;
|
|
SEM_ID muxSem;
|
|
VXB_SPI_BUS_CTRL vxbSpiCtrl;
|
|
} FT_SPI_CTRL;
|
|
|
|
#endif
|
|
|