ADuCM4x50 Device Drivers API Reference Manual  Release 4.0.0.0
adi_crc_def.h
1 
16 #ifndef ADI_CRC_DEF_H
17 #define ADI_CRC_DEF_H
18 
19 /* CRC Driver includes */
20 #include <drivers/crc/adi_crc.h>
21 
24 typedef struct __ADI_CRC_DEVICE ADI_CRC_DEVICE;
25 typedef ADI_CRC_RESULT (*CRC_BUFFER_SUBMIT) (ADI_CRC_DEVICE *pDevice, void *pBuffer, uint32_t NumBytes, uint32_t NumBits);
26 
27 /* Enumeration of CRC operation status */
28 typedef enum
29 {
30  ADI_CRC_OP_IDLE = 0u, /* CRC idle */
31  ADI_CRC_OP_IN_PROGRESS = 0x01u, /* CRC operation in progress */
32 } ADI_CRC_OP_STATUS;
33 
34 #pragma pack(push)
35 #pragma pack()
36 
37 /* Structure to handle CRC Peripheral instance */
38 struct __ADI_CRC_DEVICE
39 {
40  volatile ADI_CRC_TypeDef *pReg;
41  CRC_BUFFER_SUBMIT pfSubmitBuffer; /* Function for submitting CRC data buffer for calculation */
42  ADI_CALLBACK pfCallback; /* Client supplied callback function */
43  void *pCBParam; /* Client supplied callback parameter */
44  void *pRemainingData; /* Pointer to the buffer containing remaining bytes */
45  uint32_t RemainingBytes; /* Remaining bytes */
46  uint32_t RemainingBits; /* Remaining bits */
47  ADI_CRC_OP_STATUS eCrcOpStatus; /* Current status of the CRC Operation */
48 };
49 
50 /* Structure to hold CRC device specific information */
51 typedef struct
52 {
53  volatile ADI_CRC_TypeDef *pReg; /* CRC peripheral Registers */
54  ADI_CRC_HANDLE hDevice; /* CRC device handle */
55 } ADI_CRC_INFO;
56 
57 #pragma pack(pop)
58 
60 #endif /* ADI_CRC_DEF_H */
struct __ADI_CRC_DEVICE * ADI_CRC_HANDLE
Definition: adi_crc.h:112
ADI_CRC_RESULT
Definition: adi_crc.h:117