ADuCM302x Device Drivers API Reference Manual  Release 3.1.2.0
adi_crc_def.h
1 
49 #ifndef ADI_CRC_DEF_H
50 #define ADI_CRC_DEF_H
51 
52 /* CRC Driver includes */
53 #include <drivers/crc/adi_crc.h>
54 
57 typedef struct __ADI_CRC_DEVICE ADI_CRC_DEVICE;
58 typedef ADI_CRC_RESULT (*CRC_BUFFER_SUBMIT) (ADI_CRC_DEVICE *pDevice, void *pBuffer, uint32_t NumBytes, uint32_t NumBits);
59 
60 /* Enumeration of CRC operation status */
61 typedef enum
62 {
63  ADI_CRC_OP_IDLE = 0u, /* CRC idle */
64  ADI_CRC_OP_IN_PROGRESS = 0x01u, /* CRC operation in progress */
65 } ADI_CRC_OP_STATUS;
66 
67 #pragma pack(push)
68 #pragma pack()
69 
70 /* Structure to handle CRC Peripheral instance */
71 struct __ADI_CRC_DEVICE
72 {
73  volatile ADI_CRC_TypeDef *pReg;
74  CRC_BUFFER_SUBMIT pfSubmitBuffer; /* Function for submitting CRC data buffer for calculation */
75  ADI_CALLBACK pfCallback; /* Client supplied callback function */
76  void *pCBParam; /* Client supplied callback parameter */
77  void *pRemainingData; /* Pointer to the buffer containing remaining bytes */
78  uint32_t RemainingBytes; /* Remaining bytes */
79  uint32_t RemainingBits; /* Remaining bits */
80  ADI_CRC_OP_STATUS eCrcOpStatus; /* Current status of the CRC Operation */
81 };
82 
83 /* Structure to hold CRC device specific information */
84 typedef struct
85 {
86  volatile ADI_CRC_TypeDef *pReg; /* CRC peripheral Registers */
87  ADI_CRC_HANDLE hDevice; /* CRC device handle */
88 } ADI_CRC_INFO;
89 
90 #pragma pack(pop)
91 
93 #endif /* ADI_CRC_DEF_H */
struct __ADI_CRC_DEVICE * ADI_CRC_HANDLE
Definition: adi_crc.h:144
ADI_CRC_RESULT
Definition: adi_crc.h:149