Home |
The ISO 9660 File System Structure The exFAT File System Structure RTFiles-32 in Embedded Applications The System Driver |
The System DriverRTFiles-32 needs a few system services to perform actions such as setting interrupt vectors, managing semaphores, etc. RTFiles-32 is portable and not tied to any specific system. Rather, a system driver must be supplied which maps RTFiles-32's system calls to the corresponding operating system's calls. The system driver merely consists of a set of functions declared in Include\Rtfsys.h. To use a specific system driver, the driver's library file must be linked to the application. Please note that there is no default driver. You must link exactly one of the drivers listed below. The following drivers are included with RTFiles-32: Rtfsrtt.libRTTarget-32 driver. This driver should be used with RTTarget-32 for single-threaded applications. The time and date enquiry function is implemented using Win32 API function GetLocalTime. Please ensure that SetSystemTime is called at program startup; otherwise, the returned times will be undefined. Time measurements and the delay function use function GetTickCount. The timer callback is implemented by installing an additional timer interrupt handler on IRQ 0. Mutexes and semaphores are implemented as byte counters. When the driver must wait (e.g., at a semaphore or during a delay), function RTWait is called. For interrupt handling, function RTInstallSharedIRQHandlerEx is used. For TLS, the Win32 API is used. Fatal errors are displayed through MessageBox and the program is aborted with ExitProcess. DMA buffers are allocated by searching for a section name specified by the calling device driver. The driver is supplied with complete source code in file Driver\Rtf32\Sysrtt32.c. Rtfsk32.libRTKernel-32 driver. This driver should be used in RTTarget-32/RTKernel-32 applications. The time and date enquiry function is implemented using Win32 API function GetLocalTime. Please ensure that SetSystemTime is called at program startup; otherwise, the returned times will be undefined. Time measurements use RTKGetTime. The delay function is implemented with RTKDelay for times larger than one timer tick. For shorter delays, a software loop timed with the high resolution timer is used instead. RTKDelay(0) is called in each loop iteration. The timer callback is implemented by a cyclic task running at priority 2. Mutexes and semaphores are implemented as RTKernel-32 mutexes and counting semaphores. For interrupt handling, functions RTInstallSharedIRQHandlerEx is used. For TLS, RTKernel-32's task user data is used. Fatal errors are displayed through RTKFatalError. DMA buffers are allocated by searching for a section name specified by the calling device driver. The driver is supplied with complete source code in file Driver\Rtf32\Sysrtk32.c.
|