469d8dd500d93f22f35274d736544cc507d951d0
2 #ifndef IOPHY_LOC_H
3 #define IOPHY_LOC_H
5 #include <stdint.h>
6 #include "ioBuff.h"
7 #include "mcasp_drv.h"
9 #define IOPHY_NUM_XFER_RECORD 8
11 #define IOPHY_XFER_PACKET_INTER 0
12 #define IOPHY_XFER_PACKET_FINAL 1
15 typedef struct ioPhyXferRec_s {
16 void *base;
17 uint_least32_t size;
18 uint_fast16_t packet_status;
19 } ioPhyXferRec_t;
21 typedef struct ioPhyInst_s {
22 ioPhyXferRec_t xfer_rec[IOPHY_NUM_XFER_RECORD];
23 MCASP_Packet xfered_packets[IOPHY_NUM_XFER_RECORD];
24 ioBuffHandle_t io_buff_handle;
25 uint_least32_t xfer_frame_size;
26 Mcasp_IOcmd_e mcasp_cmd;
28 int_fast16_t sync_cntr;
29 uint_fast16_t submit_ind;
30 uint_fast16_t complete_ind;
32 void *mcasp_chan_handle;
34 ioPhyBuffOp_t ioBuffOp; // READ or WRITE
35 int (*ioBuffMarkComplete)(ioBuffHandle_t handle, void *start, size_t size);
36 int (*ioBuffGetPtrs)(ioBuffHandle_t handle, size_t mem_size,
37 void **rdptr1, size_t *size1,
38 void **rdptr2, size_t *size2);
40 } ioPhyInst_t;
43 #endif