Skip to content

Commit ecccf8f

Browse files
authored
Merge pull request #19 from eclipse-threadx/bo-ms/remove_exfat_from_chapter_4_5
Removed exfat references for chapter4 and chapter5.
2 parents 0f5c73c + 2470321 commit ecccf8f

File tree

2 files changed

+10
-153
lines changed

2 files changed

+10
-153
lines changed

rtos-docs/filex/chapter4.md

Lines changed: 8 additions & 140 deletions
Original file line numberDiff line numberDiff line change
@@ -1714,7 +1714,6 @@ fx_fault_tolerant_enable(media_ptr, fault_tolerant_memory, sizeof(fault_tolerant
17141714
- fx_media_check
17151715
- fx_media_close
17161716
- fx_media_close_notify_set
1717-
- fx_media_exFAT_format
17181717
- fx_media_extended_space_available
17191718
- fx_media_flush
17201719
- fx_media_format
@@ -1937,7 +1936,7 @@ This service sets the file's attributes to those specified by the caller.
19371936
- **FX_FAT_READ_ERROR** (0x03) Unable to read FAT entry.
19381937
- **FX_FILE_CORRUPT** (0x08) File is corrupted.
19391938
- **FX_MEDIA_NOT_OPEN** (0x11) Specified media is not open.
1940-
- **FX_NO_MORE_ENTRIES** (0x0F) No more entries in the FAT table or exFAT cluster map.
1939+
- **FX_NO_MORE_ENTRIES** (0x0F) No more entries in the FAT table.
19411940
- **FX_NO_MORE_SPACE** (0x0A) No more space to complete the operation.
19421941
- **FX_NOT_FOUND** (0x04) Specified file was not found in the media.
19431942
- **FX_NOT_A_FILE** (0x05) Specified file is a directory.
@@ -2457,7 +2456,7 @@ UINT fx_file_extended_allocate(
24572456

24582457
This service allocates and links one or more contiguous clusters to the end of the specified file. FileX determines the number of clusters required by dividing the requested size by the number of bytes per cluster. The result is then rounded up to the next whole cluster.
24592458

2460-
This service is designed for exFAT. The *size* parameter takes a 64-bit integer value, which allows the caller to pre-allocate space beyond 4GB range.
2459+
The *size* parameter takes a 64-bit integer value, which allows the caller to pre-allocate space beyond 4GB range.
24612460

24622461
### Input Parameters
24632462

@@ -2544,7 +2543,7 @@ UINT fx_file_extended best_effort_allocate(
25442543

25452544
This service allocates and links one or more contiguous clusters to the end of the specified file. FileX determines the number of clusters required by dividing the requested size by the number of bytes per cluster. The result is then rounded up to the next whole cluster. If there are not enough consecutive clusters available in the media, this service links the largest available block of consecutive clusters to the file. The amount of space actually allocated to the file is returned to the caller.
25462545

2547-
This service is designed for exFAT. The *size* parameter takes a 64-bit integer value, which allows the caller to pre-allocate space beyond 4GB range.
2546+
The *size* parameter takes a 64-bit integer value, which allows the caller to pre-allocate space beyond 4GB range.
25482547

25492548
### Input Parameters
25502549

@@ -2633,7 +2632,7 @@ UINT fx_file_extended_relative_seek(
26332632

26342633
This service positions the internal file read/write pointer to the specified relative byte offset. Any subsequent file read or write request will begin at this location in the file.
26352634

2636-
This service is designed for exFAT. The *byte_offset* parameter takes a 64bit integer value, which allows the caller to reposition the read/write pointer beyond 4GB range.
2635+
The *byte_offset* parameter takes a 64bit integer value, which allows the caller to reposition the read/write pointer beyond 4GB range.
26372636

26382637
If **FX_SEEK_BEGIN** is specified for the *seek_from parameter*, the seek operation is performed from the beginning of the file. If **FX_SEEK_END** is specified the seek operation is performed backward from the end of the file. If **FX_SEEK_FORWARD** is specified, the seek operation is performed forward from the current file position. If **FX_SEEK_BACK** is specified, the seek operation is performed backward from the current file position.
26392638

@@ -2725,7 +2724,7 @@ UINT fx_file_extended_seek(
27252724

27262725
This service positions the internal file read/write pointer to the specified byte offset. Any subsequent file read or write request will begin at this location in the file.
27272726

2728-
This service is designed for exFAT. The *byte_offset* parameter takes a 64bit integer value, which allows the caller to reposition the read/write pointer beyond 4GB range.
2727+
The *byte_offset* parameter takes a 64bit integer value, which allows the caller to reposition the read/write pointer beyond 4GB range.
27292728

27302729
### Input Parameters
27312730

@@ -2806,7 +2805,7 @@ This service truncates the size of the file to the specified size. If the suppli
28062805

28072806
> **Warning:** *Use caution truncating files that may also be simultaneously open for reading. Truncating a file also opened for reading can result in reading invalid data.*
28082807

2809-
This service is designed for exFAT. The *size* parameter takes a 64-bit integer value, which allows the caller to operate beyond 4GB range.
2808+
The *size* parameter takes a 64-bit integer value, which allows the caller to operate beyond 4GB range.
28102809

28112810
### Input Parameters
28122811

@@ -2890,7 +2889,7 @@ This service truncates the size of the file to the specified size. If the suppli
28902889

28912890
> **Warning:** *Use caution truncating files that may also be simultaneously open for reading. Truncating a file also opened for reading can result in reading invalid data.*
28922891

2893-
This service is designed for exFAT. The *size* parameter takes a 64-bit integer value, which allows the caller to operate beyond 4GB range.
2892+
The *size* parameter takes a 64-bit integer value, which allows the caller to operate beyond 4GB range.
28942893

28952894
### Input Parameters
28962895

@@ -3777,7 +3776,6 @@ status = fx_media_abort(&my_media);
37773776
- fx_media_check
37783777
- fx_media_close
37793778
- fx_media_close_notify_set
3780-
- fx_media_exFAT_format
37813779
- fx_media_extended_space_available
37823780
- fx_media_flush
37833781
- fx_media_format
@@ -3840,7 +3838,6 @@ status = fx_media_cache_invalidate(&my_media);
38403838
- fx_media_check
38413839
- fx_media_close
38423840
- fx_media_close_notify_set
3843-
- fx_media_exFAT_format
38443841
- fx_media_extended_space_available
38453842
- fx_media_flush
38463843
- fx_media_format
@@ -3937,7 +3934,6 @@ status = fx_media_check(&my_media, sratch_memory, 4096,
39373934
- fx_media_cache_invalidate
39383935
- fx_media_close
39393936
- fx_media_close_notify_set
3940-
- fx_media_exFAT_format
39413937
- fx_media_extended_space_available
39423938
- fx_media_flush
39433939
- fx_media_format
@@ -4000,7 +3996,6 @@ status = fx_media_close(&my_media);
40003996
- fx_media_cache_invalidate
40013997
- fx_media_check
40023998
- fx_media_close_notify_set
4003-
- fx_media_exFAT_format
40043999
- fx_media_extended_space_available
40054000
- fx_media_flush
40064001
- fx_media_format
@@ -4058,112 +4053,6 @@ fx_media_close_notify_set(media_ptr, my_media_close_callback);
40584053
- fx_media_cache_invalidate
40594054
- fx_media_check
40604055
- fx_media_close
4061-
- fx_media_exFAT_format
4062-
- fx_media_extended_space_available
4063-
- fx_media_flush
4064-
- fx_media_format
4065-
- fx_media_open
4066-
- fx_media_open_notify_set
4067-
- fx_media_read
4068-
- fx_media_space_available
4069-
- fx_media_volume_get
4070-
- fx_media_volume_set
4071-
- fx_media_write
4072-
- fx_system_initialize
4073-
4074-
## fx_media_exFAT_format
4075-
4076-
Formats the specified media as an exFAT file system.
4077-
4078-
### Prototype
4079-
4080-
```c
4081-
UINT fx_media_exFAT_format(
4082-
FX_MEDIA *media_ptr,
4083-
VOID (*driver)(FX_MEDIA *media),
4084-
VOID *driver_info_ptr,
4085-
UCHAR *memory_ptr,
4086-
UINT memory_size,
4087-
CHAR *volume_name,
4088-
UINT number_of_fats,
4089-
ULONG64 hidden_sectors,
4090-
ULONG64 total_sectors,
4091-
UINT bytes_per_sector,
4092-
UINT sectors_per_cluster,
4093-
UINT volume_serial_number,
4094-
UINT boundary_unit);
4095-
```
4096-
4097-
### Description
4098-
4099-
This service formats the supplied media in an exFAT compatible manner based on the supplied parameters. This service must be called prior to opening the media.
4100-
4101-
> **Warning:** *Formatting an already formatted media effectively erases all files and directories on the media.*
4102-
4103-
> **Important:** *The exFAT volume size should match the size of the partition (if there is an MBR or GPT layout), or the size of the whole device if there is no partition layout (no MBR or GPT). There is a limitation on Windows that exFAT Disk will not be recognized if formatted with some values of total sectors that are less than available sectors*
4104-
4105-
> **Important:** *With reference to the specification, the bytes per sector may take on only the following values: 512, 1024, 2048 or 4096.*
4106-
4107-
### Input Parameters
4108-
4109-
- *media_ptr*: Pointer to the media control block. This is used only to provide some basic information necessary for the driver to operate.
4110-
- *driver*: Pointer to the I/O driver for this media. This will typically be the same driver supplied to the subsequent fx_media_open call.
4111-
- *driver_info_ptr*: Pointer to the optional information that the I/O driver may utilize.
4112-
- *memory_ptr*: Pointer to the working memory for the media. memory_size Specifies the size of the working media memory. The size must be at least as large as the media's sector size.
4113-
- *volume_name*: Pointer to the volume name string, which is a maximum of 11 characters.
4114-
- *number_of_fats*: Number of FATs on the media. Current implementation supports one FAT on the media.
4115-
- *hidden_sectors*: Number of sectors hidden before this media's boot sector. This is typical when multiple partitions are present.
4116-
- *total_sectors*: Total number of sectors in the media.
4117-
- *bytes_per_sector*: Number of bytes per sector, which is typically 512. FileX requires this to be a multiple of 32.
4118-
- *sectors_per_cluster*: Number of sectors in each cluster. The cluster is the minimum allocation unit in a FAT file system.
4119-
- *volume_serial_number*: Serial number to be used for this volume.
4120-
- *boundary_unit*: Physical data area alignment size, in number of sectors.
4121-
4122-
### Return Values
4123-
4124-
- **FX_SUCCESS** (0x00) Successful media format.
4125-
- **FX_IO_ERROR** (0x90) Driver I/O error.
4126-
- **FX_PTR_ERROR** (0x18) Invalid media, driver, or memory pointer.
4127-
- **FX_CALLER_ERROR** (0x20) Caller is not a thread.
4128-
4129-
### Allowed From
4130-
4131-
Threads
4132-
4133-
### Example
4134-
4135-
```c
4136-
FX_MEDIA sd_card;
4137-
UCHAR media_memory[512];
4138-
4139-
/* Format a 64GB SD card with exFAT file system. The media has
4140-
been properly partitioned, with the partition starts from sector 32768.
4141-
For 64GB, there are total of 120913920 sectors, each sector 512 bytes. */
4142-
4143-
status = fx_media_exFAT_format(&sd_card, _fx_sd_driver,
4144-
driver_information, media_memory,
4145-
sizeof(media_memory),
4146-
"exFAT_DISK" /* Volume Name */,
4147-
1 /* Number of FATs */,
4148-
32768 /* Hidden sectors */,
4149-
120913920 /* Total sectors */,
4150-
512 /* Sector size */,
4151-
256 /* Sectors per cluster */,
4152-
12345 /* Volume ID */,
4153-
8192 /* Boundary unit */);
4154-
4155-
/* If status is FX_SUCCESS, the media was successfully formatted. */
4156-
4157-
```
4158-
4159-
### See Also
4160-
4161-
- fx_fault_tolerant_enable
4162-
- fx_media_abort
4163-
- fx_media_cache_invalidate
4164-
- fx_media_check
4165-
- fx_media_close
4166-
- fx_media_close_notify_set
41674056
- fx_media_extended_space_available
41684057
- fx_media_flush
41694058
- fx_media_format
@@ -4192,7 +4081,7 @@ UINT fx_media_extended_space_available(
41924081

41934082
This service returns the number of bytes available in the media.
41944083

4195-
This service is designed for exFAT. The pointer to *available_bytes* parameter takes a 64-bit integer value, which allows the caller to work with media beyond 4GB range.
4084+
The pointer to *available_bytes* parameter takes a 64-bit integer value, which allows the caller to work with media beyond 4GB range.
41964085

41974086
### Input Parameters
41984087

@@ -4232,7 +4121,6 @@ status = fx_media_extended_space_available(&my_media, &available_bytes);
42324121
- fx_media_check
42334122
- fx_media_close
42344123
- fx_media_close_notify_set
4235-
- fx_media_exFAT_format
42364124
- fx_media_flush
42374125
- fx_media_format
42384126
- fx_media_open
@@ -4301,7 +4189,6 @@ status = fx_media_flush(&my_media);
43014189
- fx_media_check
43024190
- fx_media_close
43034191
- fx_media_close_notify_set
4304-
- fx_media_exFAT_format
43054192
- fx_media_extended_space_available
43064193
- fx_media_format
43074194
- fx_media_open
@@ -4421,7 +4308,6 @@ status = fx_media_format(&ram_disk, _fx_ram_driver,
44214308
- fx_media_check
44224309
- fx_media_close
44234310
- fx_media_close_notify_set
4424-
- fx_media_exFAT_format
44254311
- fx_media_extended_space_available
44264312
- fx_media_flush
44274313
- fx_media_open
@@ -4501,7 +4387,6 @@ status = fx_media_open(&ram_disk, "RAM DISK", fx_ram_driver, 0, &buffer[0], size
45014387
- fx_media_check
45024388
- fx_media_close
45034389
- fx_media_close_notify_set
4504-
- fx_media_exFAT_format
45054390
- fx_media_extended_space_available
45064391
- fx_media_flush
45074392
- fx_media_format
@@ -4560,7 +4445,6 @@ fx_media_open_notify_set(media_ptr, my_media_open_callback);
45604445
- fx_media_check
45614446
- fx_media_close
45624447
- fx_media_close_notify_set
4563-
- fx_media_exFAT_format
45644448
- fx_media_extended_space_available
45654449
- fx_media_flush
45664450
- fx_media_format
@@ -4628,7 +4512,6 @@ status = fx_media_read(&my_media, 22, my_buffer);
46284512
- fx_media_check
46294513
- fx_media_close
46304514
- fx_media_close_notify_set
4631-
- fx_media_exFAT_format
46324515
- fx_media_extended_space_available
46334516
- fx_media_flush
46344517
- fx_media_format
@@ -4696,7 +4579,6 @@ status = fx_media_space_available(&my_media, &available_bytes);
46964579
- fx_media_check
46974580
- fx_media_close
46984581
- fx_media_close_notify_set
4699-
- fx_media_exFAT_format
47004582
- fx_media_extended_space_available
47014583
- fx_media_flush
47024584
- fx_media_format
@@ -4768,7 +4650,6 @@ status = fx_media_volume_get_extended(&ram_disk, volume_name,
47684650
- fx_media_check
47694651
- fx_media_close
47704652
- fx_media_close_notify_set
4771-
- fx_media_exFAT_format
47724653
- fx_media_extended_space_available
47734654
- fx_media_flush
47744655
- fx_media_format
@@ -4845,7 +4726,6 @@ status = fx_media_volume_get_extended(&ram_disk, volume_name,
48454726
- fx_media_check
48464727
- fx_media_close
48474728
- fx_media_close_notify_set
4848-
- fx_media_exFAT_format
48494729
- fx_media_extended_space_available
48504730
- fx_media_flush
48514731
- fx_media_format
@@ -4913,7 +4793,6 @@ status = fx_media_volume_set(&ram_disk, "MY_VOLUME");
49134793
- fx_media_check
49144794
- fx_media_close
49154795
- fx_media_close_notify_set
4916-
- fx_media_exFAT_format
49174796
- fx_media_extended_space_available
49184797
- fx_media_flush
49194798
- fx_media_format
@@ -4986,7 +4865,6 @@ status = fx_media_write(&my_media, 22, my_buffer);
49864865
- fx_media_check
49874866
- fx_media_close
49884867
- fx_media_close_notify_set
4989-
- fx_media_exFAT_format
49904868
- fx_media_extended_space_available
49914869
- fx_media_flush
49924870
- fx_media_format
@@ -5295,8 +5173,6 @@ This service creates a Unicode-named subdirectory in the current default directo
52955173

52965174
> **Warning:** *All operations on the Unicode subdirectory (making it the default path, deleting, etc.) should be done by supplying the returned short name (8.3 format) to the standard FileX directory services.*
52975175

5298-
> **Important:** *This service is not supported on exFAT media.*
5299-
53005176
### Input Parameters
53015177

53025178
- *media_ptr*: Pointer to media control block.
@@ -5310,7 +5186,6 @@ This service creates a Unicode-named subdirectory in the current default directo
53105186
- **FX_MEDIA_NOT_OPEN** (0x11) Specified media is not open.
53115187
- **FX_ALREADY_CREATED** (0x0B) Specified directory already exists.
53125188
- **FX_NO_MORE_SPACE** (0x0A) No more clusters available in the media for the new directory entry.
5313-
- **FX_NOT_IMPLEMENTED** (0x22) Service not implemented for exFAT file system.
53145189
- **FX_WRITE_PROTECT** (0x23) Specified media is write protected.
53155190
- **FX_PTR_ERROR** (0x18) Invalid media or name pointers.
53165191
- **FX_CALLER_ERROR** (0x20) Caller is not a thread.
@@ -5382,8 +5257,6 @@ UINT fx_unicode_directory_rename(
53825257

53835258
This service changes a Unicode-named subdirectory to specified new Unicode name in current working directory. The Unicode name parameters must not have path information.
53845259

5385-
> **Important:** *This service is not supported on exFAT media.*
5386-
53875260
### Input Parameters
53885261

53895262
- *media_ptr*: Pointer to media control block.
@@ -5481,7 +5354,6 @@ This service creates a Unicode-named file in the current default directory—no
54815354
- **FX_MEDIA_NOT_OPEN** (0x11) Specified media is not open.
54825355
- **FX_ALREADY_CREATED** (0x0B) Specified file already exists.
54835356
- **FX_NO_MORE_SPACE** (0x0A) No more clusters available in the media for the new file entry.
5484-
- **FX_NOT_IMPLEMENTED** (0x22) Service not implemented for exFAT file system.
54855357
- **FX_IO_ERROR** (0x90) Driver I/O error.
54865358
- **FX_WRITE_PROTECT** (0x23) Specified media is write protected.
54875359
- **FX_PTR_ERROR** (0x18) Invalid media or name pointers.
@@ -5559,8 +5431,6 @@ UINT fx_unicode_file_rename(
55595431

55605432
This service changes a Unicode-named file name to specified new Unicode name in current default directory. The Unicode name parameters must not have path information.
55615433

5562-
> **Important:** *This service is not supported on exFAT media.*
5563-
55645434
### Input Parameters
55655435

55665436
- *media_ptr*: Pointer to media control block.
@@ -5997,7 +5867,6 @@ This service retrieves the short name (8.3 format) associated with the Unicode-n
59975867
- **FX_IO_ERROR** (0x90) Driver I/O error.
59985868
- **FX_MEDIA_NOT_OPEN** (0x11) Specified media is not open.
59995869
- **FX_NOT_FOUND** (0x04) Unicode name was not found.
6000-
- **FX_NOT_IMPLEMENTED** (0x22) Service not implemented for exFAT file system.
60015870
- **FX_SECTOR_INVALID** (0x89) Invalid sector.
60025871
- **FX_PTR_ERROR** (0x18) Invalid media or name pointers.
60035872
- **FX_CALLER_ERROR** (0x20) Caller is not a thread.
@@ -6092,7 +5961,6 @@ This service retrieves the short name (8.3 format) associated with the Unicode-n
60925961
- **FX_IO_ERROR** (0x90) Driver I/O error.
60935962
- **FX_MEDIA_NOT_OPEN** (0x11) Specified media is not open.
60945963
- **FX_NOT_FOUND** (0x04) Unicode name was not found.
6095-
- **FX_NOT_IMPLEMENTED** (0x22) Service not implemented for exFAT file system.
60965964
- **FX_SECTOR_INVALID** (0x89) Invalid sector.
60975965
- **FX_PTR_ERROR** (0x18) Invalid media or name pointers.
60985966
- **FX_CALLER_ERROR** (0x20) Caller is not a thread.

0 commit comments

Comments
 (0)