• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2022, sakumisu
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 #ifndef USBD_MSC_H
7 #define USBD_MSC_H
8 
9 #include "usb_msc.h"
10 
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14 
15 /* Init msc interface driver */
16 struct usbd_interface *usbd_msc_init_intf(struct usbd_interface *intf,
17                                           const uint8_t out_ep,
18                                           const uint8_t in_ep);
19 
20 void usbd_msc_get_cap(uint8_t lun, uint32_t *block_num, uint16_t *block_size);
21 int usbd_msc_sector_read(uint32_t sector, uint8_t *buffer, uint32_t length);
22 int usbd_msc_sector_write(uint32_t sector, uint8_t *buffer, uint32_t length);
23 
24 void usbd_msc_set_readonly(bool readonly);
25 bool usbd_msc_set_popup(void);
26 
27 #ifdef __cplusplus
28 }
29 #endif
30 
31 #endif /* USBD_MSC_H */
32