mirror of
https://github.com/eclipse-threadx/filex.git
synced 2026-09-14 04:05:59 +08:00
Updated copyright headers and removed revision history
* Updated version number constants * Updated copyright headers and removed revision history
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
#include "fx_system.h"
|
||||
#include "fx_fault_tolerant.h"
|
||||
#include <stdio.h>
|
||||
#include "fx_ram_driver_test.h"
|
||||
#include "fx_ram_driver_test.h"
|
||||
extern void test_control_return(UINT status);
|
||||
void filex_fault_tolerant_file_delete_test_application_define(void *first_unused_memory);
|
||||
|
||||
@@ -33,7 +33,7 @@ void filex_fault_tolerant_file_delete_test_application_define(void *first_unuse
|
||||
static TX_THREAD ftest_0;
|
||||
static TX_THREAD ftest_1;
|
||||
#else
|
||||
static pthread_t ptid1;
|
||||
static pthread_t ptid1;
|
||||
#endif
|
||||
static FX_MEDIA ram_disk;
|
||||
static FX_FILE my_file;
|
||||
@@ -48,7 +48,7 @@ static UCHAR *thread_buffer;
|
||||
#else
|
||||
static UCHAR cache_buffer[CACHE_SIZE];
|
||||
static UCHAR fault_tolerant_buffer[FAULT_TOLERANT_SIZE];
|
||||
#endif
|
||||
#endif
|
||||
static UINT fat_write_interrupt = FX_FALSE;
|
||||
static CHAR read_buffer[1024];
|
||||
static UINT read_buffer_size = 1024;
|
||||
@@ -61,7 +61,7 @@ static void ftest_0_entry(ULONG thread_input);
|
||||
#ifndef FX_STANDALONE_ENABLE
|
||||
static void ftest_1_entry(ULONG thread_input);
|
||||
#else
|
||||
static void * ftest_1_entry(void * thread_input);
|
||||
static void * ftest_1_entry(void * thread_input);
|
||||
#endif
|
||||
extern void _fx_ram_driver(FX_MEDIA *media_ptr);
|
||||
extern void test_control_return(UINT status);
|
||||
@@ -147,52 +147,52 @@ static void ftest_0_entry(ULONG thread_input)
|
||||
_fx_ram_driver, // Driver entry
|
||||
ram_disk_memory_large, // RAM disk memory pointer
|
||||
cache_buffer, // Media buffer pointer
|
||||
CACHE_SIZE, // Media buffer size
|
||||
CACHE_SIZE, // Media buffer size
|
||||
"MY_RAM_DISK", // Volume Name
|
||||
1, // Number of FATs
|
||||
32, // Directory Entries
|
||||
0, // Hidden sectors
|
||||
256, // Total sectors
|
||||
256, // Sector size
|
||||
256, // Total sectors
|
||||
256, // Sector size
|
||||
8, // Sectors per cluster
|
||||
1, // Heads
|
||||
1); // Sectors per track
|
||||
1); // Sectors per track
|
||||
}
|
||||
else if (i == 1)
|
||||
{
|
||||
/* Format the media with FAT16. This needs to be done before opening it! */
|
||||
status = fx_media_format(&ram_disk,
|
||||
_fx_ram_driver, // Driver entry
|
||||
_fx_ram_driver, // Driver entry
|
||||
ram_disk_memory_large, // RAM disk memory pointer
|
||||
cache_buffer, // Media buffer pointer
|
||||
CACHE_SIZE, // Media buffer size
|
||||
CACHE_SIZE, // Media buffer size
|
||||
"MY_RAM_DISK", // Volume Name
|
||||
1, // Number of FATs
|
||||
32, // Directory Entries
|
||||
0, // Hidden sectors
|
||||
4200 * 8, // Total sectors
|
||||
256, // Sector size
|
||||
4200 * 8, // Total sectors
|
||||
256, // Sector size
|
||||
8, // Sectors per cluster
|
||||
1, // Heads
|
||||
1); // Sectors per track
|
||||
1); // Sectors per track
|
||||
}
|
||||
else if (i == 2)
|
||||
{
|
||||
/* Format the media with FAT32. This needs to be done before opening it! */
|
||||
status = fx_media_format(&ram_disk,
|
||||
_fx_ram_driver, // Driver entry
|
||||
_fx_ram_driver, // Driver entry
|
||||
ram_disk_memory_large, // RAM disk memory pointer
|
||||
cache_buffer, // Media buffer pointer
|
||||
CACHE_SIZE, // Media buffer size
|
||||
CACHE_SIZE, // Media buffer size
|
||||
"MY_RAM_DISK", // Volume Name
|
||||
1, // Number of FATs
|
||||
32, // Directory Entries
|
||||
0, // Hidden sectors
|
||||
70000 * 8, // Total sectors
|
||||
256, // Sector size
|
||||
70000 * 8, // Total sectors
|
||||
256, // Sector size
|
||||
8, // Sectors per cluster
|
||||
1, // Heads
|
||||
1); // Sectors per track
|
||||
1); // Sectors per track
|
||||
}
|
||||
|
||||
/* Determine if the format had an error. */
|
||||
@@ -297,7 +297,7 @@ static void ftest_0_entry(ULONG thread_input)
|
||||
/* Create the main thread. */
|
||||
tx_thread_create(&ftest_1, "thread 1", ftest_1_entry, 0,
|
||||
thread_buffer, DEMO_STACK_SIZE,
|
||||
4, 4, TX_NO_TIME_SLICE, TX_AUTO_START);
|
||||
4, 4, TX_NO_TIME_SLICE, TX_AUTO_START);
|
||||
#endif
|
||||
/* directory_write_interrupt */
|
||||
fat_write_interrupt = FX_FALSE;
|
||||
@@ -308,7 +308,7 @@ static void ftest_0_entry(ULONG thread_input)
|
||||
#else
|
||||
pthread_create(&ptid1, NULL, &ftest_1_entry, NULL);
|
||||
usleep(10);
|
||||
pthread_join(ptid1,NULL);
|
||||
pthread_join(ptid1,NULL);
|
||||
#endif
|
||||
/* Delete the thread. */
|
||||
#ifndef FX_STANDALONE_ENABLE
|
||||
@@ -336,7 +336,7 @@ static void ftest_1_entry(ULONG thread_input)
|
||||
|
||||
#ifdef FX_STANDALONE_ENABLE
|
||||
UINT oldtype;
|
||||
pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
|
||||
pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
|
||||
pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, &oldtype);
|
||||
#endif
|
||||
UINT status;
|
||||
@@ -378,7 +378,7 @@ static UINT my_driver_write(FX_MEDIA *media_ptr, UINT sector_type, UCHAR *block_
|
||||
|
||||
/* Delete the media protection structure if FX_SINGLE_THREAD is not
|
||||
defined. */
|
||||
#ifndef FX_SINGLE_THREAD
|
||||
#ifndef FX_SINGLE_THREAD
|
||||
#ifndef FX_DONT_CREATE_MUTEX
|
||||
|
||||
/* Note that the protection is never released. The mutex delete
|
||||
@@ -407,7 +407,7 @@ static UINT my_driver_write(FX_MEDIA *media_ptr, UINT sector_type, UCHAR *block_
|
||||
/* Return. */
|
||||
return FX_SUCCESS;
|
||||
}
|
||||
#else
|
||||
#else
|
||||
|
||||
#ifdef CTEST
|
||||
void test_application_define(void *first_unused_memory)
|
||||
|
||||
Reference in New Issue
Block a user