EFR32 Mighty Gecko 1 Software Documentation  efr32mg1-doc-5.1.2
msdd.h
Go to the documentation of this file.
1 /***************************************************************************/
15 #ifndef __MSDD_H
16 #define __MSDD_H
17 
18 /***************************************************************************/
23 /***************************************************************************/
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
32 #define MEDIA_BUFSIZ 4096
34 /**************************************************************************/
37 typedef struct
38 {
39  bool valid;
40  uint8_t direction;
41  uint8_t *pData;
42  uint32_t lba;
43  uint32_t xferLen;
44  uint32_t maxBurst;
45  enum { XFER_MEMORYMAPPED = 0, XFER_INDIRECT } xferType;
48 
49 /*** MSDD Device Driver Function prototypes ***/
50 
51 bool MSDD_Handler(void);
52 void MSDD_Init(int activityLedPort, uint32_t activityLedPin);
53 int MSDD_SetupCmd(const USB_Setup_TypeDef *setup);
54 void MSDD_StateChangeEvent(USBD_State_TypeDef oldState,
55  USBD_State_TypeDef newState);
56 
57 #ifdef __cplusplus
58 }
59 #endif
60 
64 #endif /* __MSDD_H */
uint32_t maxBurst
Definition: msdd.h:44
Status info for one BOT CBW -> Data I/O -> CSW cycle.
Definition: msdd.h:37
uint8_t direction
Definition: msdd.h:40
void MSDD_StateChangeEvent(USBD_State_TypeDef oldState, USBD_State_TypeDef newState)
Called whenever the USB device has changed its device state.
Definition: msdd.c:410
uint32_t lba
Definition: msdd.h:42
uint32_t xferLen
Definition: msdd.h:43
int MSDD_SetupCmd(const USB_Setup_TypeDef *setup)
Called whenever a USB setup command is received. This function overrides standard CLEAR_FEATURE comma...
Definition: msdd.c:319
bool MSDD_Handler(void)
Serve the MSD state machine. This function should be called on a regular basis from your main loop...
Definition: msdd.c:246
uint8_t * pData
Definition: msdd.h:41
void MSDD_Init(int activityLedPort, uint32_t activityLedPin)
Initialize MSD device.
Definition: msdd.c:203