fix incorrect diskio get GET_BLOCK_SIZE
This commit is contained in:
1 parent
8aef6c96c8
commit
c76c4c7027
2 files changed
+3
-4
No files matched your search
@@ -189,8 +189,7 @@ bool tu_fifo_peek_at(tu_fifo_t* f, uint16_t pos, void * p_buffer)
|
||||
/******************************************************************************/
|
||||
bool tu_fifo_write (tu_fifo_t* f, const void * p_data)
|
||||
{
|
||||
// if ( tu_fifo_full(f) && !f->overwritable ) return false;
|
||||
TU_ASSERT( !(tu_fifo_full(f) && !f->overwritable) );
|
||||
if ( tu_fifo_full(f) && !f->overwritable ) return false;
|
||||
|
||||
mutex_lock_if_needed(f);
|
||||
|
||||
|
||||
@@ -99,7 +99,7 @@ DRESULT disk_ioctl (
|
||||
switch ( cmd )
|
||||
{
|
||||
case GET_SECTOR_COUNT:
|
||||
*((DWORD*) buff) = flash_qspi_size() / FF_MIN_SS;
|
||||
*((DWORD*) buff) = (flash_qspi_size() / FF_MIN_SS);
|
||||
break;
|
||||
|
||||
case GET_SECTOR_SIZE:
|
||||
@@ -107,7 +107,7 @@ DRESULT disk_ioctl (
|
||||
break;
|
||||
|
||||
case GET_BLOCK_SIZE:
|
||||
*((DWORD*) buff) = FLASH_QSPI_PAGE_SIZE;
|
||||
*((DWORD*) buff) = FLASH_QSPI_PAGE_SIZE / FF_MIN_SS;
|
||||
break;
|
||||
|
||||
case CTRL_SYNC:
|
||||
|
||||
Reference in new issue
Block a user