- use build in data types
git-svn-id: http://moon:8086/svn/mips@35 a8ebac50-d88d-4704-bea3-6648445a41b3
This commit is contained in:
@@ -39,28 +39,28 @@ typedef void (*fp_t)(void*);
|
||||
// Receive buffer on EP
|
||||
typedef struct _scy_req_t
|
||||
{
|
||||
UINT16 next;
|
||||
UINT16 addr;
|
||||
UINT16 size;
|
||||
UINT16 callback;
|
||||
uint16_t next;
|
||||
uint16_t addr;
|
||||
uint16_t size;
|
||||
uint16_t callback;
|
||||
} cy_req_t;
|
||||
|
||||
typedef struct _sfifo_t
|
||||
{
|
||||
UINT32 size;
|
||||
UINT8 *pBuf;
|
||||
UINT8 * volatile pPtr_wr, * volatile pPtr_rd;
|
||||
uint32_t size;
|
||||
uint8_t *pBuf;
|
||||
uint8_t * volatile pPtr_wr, * volatile pPtr_rd;
|
||||
|
||||
} fifo_t;
|
||||
|
||||
typedef struct _susb_irp_t
|
||||
{
|
||||
UINT16 tsize;
|
||||
UINT32 is_in, is_out;
|
||||
UINT32 port, ept;
|
||||
UINT16 cy_irp_addr;
|
||||
uint16_t tsize;
|
||||
uint32_t is_in, is_out;
|
||||
uint32_t port, ept;
|
||||
uint16_t cy_irp_addr;
|
||||
fifo_t fifo;
|
||||
UINT32 tx_in_progress;
|
||||
uint32_t tx_in_progress;
|
||||
cy_req_t cy_req;
|
||||
} usb_irp_t;
|
||||
|
||||
@@ -339,46 +339,46 @@ typedef struct _susb_irp_t
|
||||
// HPI low-level routines
|
||||
void cy67k3_isr(void);
|
||||
void cy67k3_reset(void);
|
||||
UINT16 cy67k3_read_HPI_DATA(void);
|
||||
UINT16 cy67k3_read_HPI_MAILBOX(void);
|
||||
UINT16 cy67k3_read_HPI_ADDRESS(void);
|
||||
UINT16 cy67k3_read_HPI_STATUS(void);
|
||||
void cy67k3_write_HPI_DATA(UINT16 data);
|
||||
void cy67k3_write_HPI_MAILBOX(UINT16 data);
|
||||
void cy67k3_write_HPI_ADDRESS(UINT16 data);
|
||||
void cy67k3_write_HPI_STATUS(UINT16 data);
|
||||
uint16_t cy67k3_read_HPI_DATA(void);
|
||||
uint16_t cy67k3_read_HPI_MAILBOX(void);
|
||||
uint16_t cy67k3_read_HPI_ADDRESS(void);
|
||||
uint16_t cy67k3_read_HPI_STATUS(void);
|
||||
void cy67k3_write_HPI_DATA(uint16_t data);
|
||||
void cy67k3_write_HPI_MAILBOX(uint16_t data);
|
||||
void cy67k3_write_HPI_ADDRESS(uint16_t data);
|
||||
void cy67k3_write_HPI_STATUS(uint16_t data);
|
||||
|
||||
// HPI API
|
||||
UINT32 hpi_init(void);
|
||||
void hpi_mbx_write(UINT16 msgcode);
|
||||
UINT32 hpi_mbx_read(void);
|
||||
UINT32 hpi_read_reg(UINT16 addr);
|
||||
UINT32 hpi_write_reg(UINT16 addr, UINT16 data);
|
||||
UINT32 hpi_write_ram(UINT16 addr, UINT16 *pData, UINT32 num_words);
|
||||
UINT32 hpi_read_ram(UINT16 addr, UINT16 *pData, UINT32 num_words);
|
||||
UINT32 hpi_comm_reset(void);
|
||||
UINT32 hpi_comm_jump2code(UINT16 addr);
|
||||
UINT32 hpi_comm_callcode(UINT16 addr);
|
||||
UINT32 hpi_comm_write_ctrl_reg(UINT16 addr, UINT16 data, UINT16 logic);
|
||||
UINT32 hpi_comm_read_ctrl_reg(UINT16 addr);
|
||||
UINT32 hpi_comm_write_xmem(UINT16 addr, UINT8 *pData, UINT16 len);
|
||||
UINT32 hpi_comm_read_xmem(UINT16 addr, UINT8 *pData, UINT16 len);
|
||||
UINT32 hpi_comm_exec_int(UINT16 intnum, UINT32 nargs, ...);
|
||||
uint32_t hpi_init(void);
|
||||
void hpi_mbx_write(uint16_t msgcode);
|
||||
uint32_t hpi_mbx_read(void);
|
||||
uint32_t hpi_read_reg(uint16_t addr);
|
||||
uint32_t hpi_write_reg(uint16_t addr, uint16_t data);
|
||||
uint32_t hpi_write_ram(uint16_t addr, uint16_t *pData, uint32_t num_words);
|
||||
uint32_t hpi_read_ram(uint16_t addr, uint16_t *pData, uint32_t num_words);
|
||||
uint32_t hpi_comm_reset(void);
|
||||
uint32_t hpi_comm_jump2code(uint16_t addr);
|
||||
uint32_t hpi_comm_callcode(uint16_t addr);
|
||||
uint32_t hpi_comm_write_ctrl_reg(uint16_t addr, uint16_t data, uint16_t logic);
|
||||
uint32_t hpi_comm_read_ctrl_reg(uint16_t addr);
|
||||
uint32_t hpi_comm_write_xmem(uint16_t addr, uint8_t *pData, uint16_t len);
|
||||
uint32_t hpi_comm_read_xmem(uint16_t addr, uint8_t *pData, uint16_t len);
|
||||
uint32_t hpi_comm_exec_int(uint16_t intnum, uint32_t nargs, ...);
|
||||
|
||||
// USB API
|
||||
UINT32 usb_init(void);
|
||||
UINT32 usb_irp_register(usb_irp_t *pIRP, UINT32 port, UINT32 ept, UINT32 size, UINT32 is_out);
|
||||
UINT32 usb_irp_enqueue(usb_irp_t *pIRP);
|
||||
UINT32 usb_callback_register(UINT32 port, UINT32 type, fp_t pFunc, void *pArg);
|
||||
uint32_t usb_init(void);
|
||||
uint32_t usb_irp_register(usb_irp_t *pIRP, uint32_t port, uint32_t ept, uint32_t size, uint32_t is_out);
|
||||
uint32_t usb_irp_enqueue(usb_irp_t *pIRP);
|
||||
uint32_t usb_callback_register(uint32_t port, uint32_t type, fp_t pFunc, void *pArg);
|
||||
|
||||
#define FIFO_BLOCK 1
|
||||
#define FIFO_NONBLOCK 0
|
||||
UINT32 fifo_alloc(fifo_t *pObj, UINT32 size);
|
||||
UINT32 fifo_free(fifo_t *pObj);
|
||||
UINT32 fifo_flush(fifo_t *pObj);
|
||||
UINT32 fifo_is_full(fifo_t *pObj);
|
||||
UINT32 fifo_is_empty(fifo_t *pObj);
|
||||
UINT32 fifo_read(fifo_t *pObj, UINT8 *pData, UINT32 size, UINT32 timeout, UINT32 do_block);
|
||||
UINT32 fifo_write(fifo_t *pObj, UINT8 *pData, UINT32 size, UINT32 timeout, UINT32 do_block);
|
||||
uint32_t fifo_alloc(fifo_t *pObj, uint32_t size);
|
||||
uint32_t fifo_free(fifo_t *pObj);
|
||||
uint32_t fifo_flush(fifo_t *pObj);
|
||||
uint32_t fifo_is_full(fifo_t *pObj);
|
||||
uint32_t fifo_is_empty(fifo_t *pObj);
|
||||
uint32_t fifo_read(fifo_t *pObj, uint8_t *pData, uint32_t size, uint32_t timeout, uint32_t do_block);
|
||||
uint32_t fifo_write(fifo_t *pObj, uint8_t *pData, uint32_t size, uint32_t timeout, uint32_t do_block);
|
||||
|
||||
#endif // HPI_H
|
||||
|
||||
Reference in New Issue
Block a user