Skip to content

Commit b1cd5e9

Browse files
committed
dma: consolidate whDmaCopyOper in wh_dma.h
1 parent 472c3e6 commit b1cd5e9

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

wolfhsm/wh_dma.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,13 @@ typedef enum {
4545
WH_DMA_OPER_CLIENT_WRITE_POST = 3,
4646
} whDmaOper;
4747

48+
#ifdef WOLFHSM_CFG_DMA_CUSTOM_CLIENT_COPY
49+
typedef enum {
50+
WH_DMA_COPY_OPER_CLIENT_READ = 0,
51+
WH_DMA_COPY_OPER_CLIENT_WRITE = 1,
52+
} whDmaCopyOper;
53+
#endif /* WOLFHSM_CFG_DMA_CUSTOM_CLIENT_COPY */
54+
4855
/* Flags embedded in request/response structs provided by client */
4956
typedef struct {
5057
uint8_t cacheForceInvalidate : 1;

wolfhsm/wh_server.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -120,12 +120,8 @@ typedef whDmaOper whServerDmaOper;
120120
typedef whDmaFlags whServerDmaFlags;
121121
typedef whDmaAddr whServerDmaAddr;
122122
typedef whDmaAddrList whServerDmaAddrList;
123-
124123
#ifdef WOLFHSM_CFG_DMA_CUSTOM_CLIENT_COPY
125-
typedef enum {
126-
WH_DMA_COPY_OPER_CLIENT_READ = 0,
127-
WH_DMA_COPY_OPER_CLIENT_WRITE = 1,
128-
} whServerDmaCopyOper;
124+
typedef whDmaCopyOper whServerDmaCopyOper;
129125
#endif /* WOLFHSM_CFG_DMA_CUSTOM_CLIENT_COPY */
130126

131127
/* DMA callbacks invoked internally by wolfHSM before and after every client

0 commit comments

Comments
 (0)