update nrf52840 examples

This commit is contained in:
hathach
2018-04-18 18:05:08 +07:00
parent a9ada8ea5e
commit 8c0a5f7d3b
5 changed files with 243 additions and 174 deletions

View File

@@ -91,13 +91,13 @@ uint8_t msc_device_ramdisk[DISK_BLOCK_NUM][DISK_BLOCK_SIZE] =
//--------------------------------------------------------------------+
// IMPLEMENTATION
//--------------------------------------------------------------------+
uint16_t tud_msc_read10_cb (uint8_t rhport, uint8_t lun, void** pp_buffer, uint32_t lba, uint16_t block_count)
uint16_t tud_msc_read10_cb (uint8_t rhport, uint8_t lun, uint32_t lba, uint16_t block_count, void** pp_buffer)
{
(*pp_buffer) = msc_device_ramdisk[lba];
return min16_of(block_count, DISK_BLOCK_NUM);
}
uint16_t tud_msc_write10_cb(uint8_t rhport, uint8_t lun, void** pp_buffer, uint32_t lba, uint16_t block_count)
uint16_t tud_msc_write10_cb(uint8_t rhport, uint8_t lun, uint32_t lba, uint16_t block_count, void** pp_buffer)
{
(*pp_buffer) = msc_device_ramdisk[lba];