mirror of
https://github.com/eclipse-threadx/levelx.git
synced 2026-09-14 20:48:51 +08:00
Update on 23 Oct 2023. Expand to see details.
f203c27 Update headers and readme for 6.3.0 release. 40d3d10 Avoid clearing user extension in flash control block on opening flash 689dcc1 Added obsolete count and mapping bitmap cache for NOR flash. optimized block seraching logic. b183526 Enable weekly pipeline build to avoid CodeQL expiration 2eec506 Enable codeql in onebranch pipeline
This commit is contained in:
@@ -36,19 +36,19 @@ LX_NOR_FLASH nor_flash;
|
||||
the fx_media_open call.
|
||||
|
||||
fx_media_format(&ram_disk,
|
||||
_fx_nor_sim_driver, // Driver entry
|
||||
FX_NULL, // Unused
|
||||
media_memory, // Media buffer pointer
|
||||
sizeof(media_memory), // Media buffer size
|
||||
"MY_NOR_DISK", // Volume Name
|
||||
1, // Number of FATs
|
||||
32, // Directory Entries
|
||||
0, // Hidden sectors
|
||||
120, // Total sectors
|
||||
512, // Sector size
|
||||
1, // Sectors per cluster
|
||||
1, // Heads
|
||||
1); // Sectors per track
|
||||
_fx_nor_sim_driver, // Driver entry
|
||||
FX_NULL, // Unused
|
||||
media_memory, // Media buffer pointer
|
||||
sizeof(media_memory), // Media buffer size
|
||||
"MY_NOR_DISK", // Volume Name
|
||||
1, // Number of FATs
|
||||
32, // Directory Entries
|
||||
0, // Hidden sectors
|
||||
120, // Total sectors
|
||||
LX_NOR_SECTOR_SIZE * sizeof(ULONG), // Sector size
|
||||
1, // Sectors per cluster
|
||||
1, // Heads
|
||||
1); // Sectors per track
|
||||
|
||||
*/
|
||||
|
||||
@@ -231,7 +231,7 @@ UINT status;
|
||||
|
||||
/* Move to the next entries. */
|
||||
logical_sector++;
|
||||
destination_buffer = destination_buffer + 512;
|
||||
destination_buffer = destination_buffer + media_ptr -> fx_media_bytes_per_sector;
|
||||
}
|
||||
|
||||
/* Successful driver request. */
|
||||
@@ -265,7 +265,7 @@ UINT status;
|
||||
|
||||
/* Move to the next entries. */
|
||||
logical_sector++;
|
||||
source_buffer = source_buffer + 512;
|
||||
source_buffer = source_buffer + media_ptr -> fx_media_bytes_per_sector;
|
||||
}
|
||||
|
||||
/* Successful driver request. */
|
||||
@@ -428,6 +428,15 @@ UINT status;
|
||||
case FX_DRIVER_BOOT_WRITE:
|
||||
{
|
||||
|
||||
/* Make sure the media bytes per sector equals to the LevelX logical sector size. */
|
||||
if (media_ptr -> fx_media_bytes_per_sector != (LX_NOR_SECTOR_SIZE) * sizeof(ULONG))
|
||||
{
|
||||
|
||||
/* Sector size mismatch, return error. */
|
||||
media_ptr -> fx_media_driver_status = FX_IO_ERROR;
|
||||
break;
|
||||
}
|
||||
|
||||
/* Write the boot record and return to the caller. */
|
||||
|
||||
/* Setup the source buffer. */
|
||||
|
||||
Reference in New Issue
Block a user