4 * @brief usb device memory management header file
8 * Copyright (C) 2023 Geehy Semiconductor
10 * You may not use this file except in compliance with the
11 * GEEHY COPYRIGHT NOTICE (GEEHY SOFTWARE PACKAGE LICENSE).
13 * The program is only for reference, which is distributed in the hope
14 * that it will be useful and instructional for customers to develop
15 * their software. Unless required by applicable law or agreed to in
16 * writing, the program is distributed on an "AS IS" BASIS, WITHOUT
17 * ANY WARRANTY OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the GEEHY SOFTWARE PACKAGE LICENSE for the governing permissions
19 * and limitations under the License.
22 /* Define to prevent recursive inclusion */
23 #ifndef _USBD_MEMORY_H_
24 #define _USBD_MEMORY_H_
30 /* Includes ***************************************************************/
33 /* Exported macro *********************************************************/
35 /* Exported typedef *******************************************************/
37 /* Exported function prototypes *******************************************/
38 uint8_t USBD_MSC_MemoryReadMaxLun(void);
39 USBD_STA_T
USBD_MSC_MemoryCheckWPR(uint8_t lun
);
40 USBD_STA_T
USBD_MSC_MemoryCheckReady(uint8_t lun
);
41 USBD_STA_T
USBD_MSC_MemoryInit(uint8_t lun
);
42 USBD_STA_T
USBD_MSC_MemoryReadCapacity(uint8_t lun
, uint32_t* blockNum
, \
44 USBD_STA_T
USBD_MSC_MemoryReadData(uint8_t lun
, uint8_t* buffer
, uint32_t blockAddr
, \
45 uint16_t blockLength
);
46 USBD_STA_T
USBD_MSC_MemoryWriteData(uint8_t lun
, uint8_t* buffer
, uint32_t blockAddr
, \
47 uint16_t blockLength
);