how to transfer files from stm32 board as mass storage class in device mode to pc.
hello,
I able to see the stm32 RAM as storage in pc. I want to transfer the files and buffer data to pc from stm32 RAM as storage.
int8_t STORAGE_Read_FS(uint8_t lun, uint8_t *buf, uint32_t blk_addr, uint16_t blk_len)
{
/* USER CODE BEGIN 6 */
memcpy(buf,&buffer1[blk_addr*STORAGE_BLK_SIZ],blk_len*STORAGE_BLK_SIZ);
return (USBD_OK);
/* USER CODE END 6 */
}
int8_t STORAGE_Write_FS(uint8_t lun, uint8_t *buf, uint32_t blk_addr, uint16_t blk_len)
{
/* USER CODE BEGIN 7 */
memcpy(&buffer1[blk_addr*STORAGE_BLK_SIZ],buf,blk_len*STORAGE_BLK_SIZ);
return (USBD_OK);
/* USER CODE END 7 */
}
