📄 doc2k-systffs.c
字号:
*/LOCAL void docVccOn ( FLSocket vol /* pointer identifying drive */ ) { }/********************************************************************************* docVccOff - turn off Vcc (3.3/5 Volts)** This routine turns off Vcc (3.3/5 Volts). ** RETURNS: N/A*/LOCAL void docVccOff ( FLSocket vol /* pointer identifying drive */ ) { }#ifdef SOCKET_12_VOLTS/********************************************************************************* docVppOn - turns on Vpp (12 Volts)** This routine turns on Vpp (12 Volts). Vpp must be known to be good on exit.** RETURNS: flOK always*/LOCAL FLStatus docVppOn ( FLSocket vol /* pointer identifying drive */ ) { return (flOK); }/********************************************************************************* docVppOff - turns off Vpp (12 Volts)** This routine turns off Vpp (12 Volts).** RETURNS: N/A*/LOCAL void docVppOff ( FLSocket vol /* pointer identifying drive */ ) { }#endif /* SOCKET_12_VOLTS *//********************************************************************************* docInitSocket - perform all necessary initializations of the socket** This routine performs all necessary initializations of the socket.** RETURNS: flOK always*/LOCAL FLStatus docInitSocket ( FLSocket vol /* pointer identifying drive */ ) { return (flOK); }/********************************************************************************* docSetWindow - set current window attributes, Base address, size, etc** This routine sets current window hardware attributes: Base address, size,* speed and bus width. The requested settings are given in the 'vol.window' * structure. If it is not possible to set the window size requested in* 'vol.window.size', the window size should be set to a larger value, * if possible. In any case, 'vol.window.size' should contain the * actual window size (in 4 KB units) on exit.** RETURNS: N/A*/LOCAL void docSetWindow ( FLSocket vol /* pointer identifying drive */ ) { }/********************************************************************************* docSetMappingContext - sets the window mapping register to a card address** This routine sets the window mapping register to a card address.* The window should be set to the value of 'vol.window.currentPage',* which is the card address divided by 4 KB. An address over 128MB,* (page over 32K) specifies an attribute-space address. On entry to this * routine vol.window.currentPage is the page already mapped into the window.* (In otherwords the page that was mapped by the last call to this routine.)** The page to map is guaranteed to be on a full window-size boundary.** RETURNS: N/A*/LOCAL void docSetMappingContext ( FLSocket vol, /* pointer identifying drive */ unsigned page /* page to be mapped */ ) { }/********************************************************************************* docGetAndClearCardChangeIndicator - return the hardware card-change indicator** This routine returns the hardware card-change indicator and clears it if set.** RETURNS: FALSE, or TRUE if the card has been changed*/LOCAL FLBoolean docGetAndClearCardChangeIndicator ( FLSocket vol /* pointer identifying drive */ ) { return (FALSE); }/********************************************************************************* docWriteProtected - return the write-protect state of the media** This routine returns the write-protect state of the media** RETURNS: FALSE, or TRUE if the card is write-protected*/LOCAL FLBoolean docWriteProtected ( FLSocket vol /* pointer identifying drive */ ) { return (FALSE); }#ifdef EXIT/********************************************************************************* docFreeSocket - free resources that were allocated for this socket.** This routine free resources that were allocated for this socket.* This function is called when FLite exits.** RETURNS: N/A*/LOCAL void docFreeSocket ( FLSocket vol /* pointer identifying drive */ ) { }#endif /* EXIT */#endif /* INCLUDE_SOCKET_DOC *//********************************************************************************* flFitInSocketWindow - check whether the flash array fits in the socket window** This routine checks whether the flash array fits in the socket window.** RETURNS: A chip size guaranteed to fit in the socket window.*/long int flFitInSocketWindow ( long int chipSize, /* size of single physical chip in bytes */ int interleaving, /* flash chip interleaving (1,2,4 etc) */ long int windowSize /* socket window size in bytes */ ) { /* x86 architectures use sliding windows for flash arrays */ /* so this check is irrelevant for them */ return (chipSize); }#if FALSE/********************************************************************************* sysTffsCpy - copy memory from one location to another** This routine copies <size> characters from the object pointed* to by <source> into the object pointed to by <destination>. If copying* takes place between objects that overlap, the behavior is undefined.** INCLUDE FILES: string.h** RETURNS: A pointer to <destination>.* * NOMANUAL*/void * sysTffsCpy ( void * destination, /* destination of copy */ const void * source, /* source of copy */ size_t size /* size of memory to copy */ ) { bcopy ((char *) source, (char *) destination, (size_t) size); return (destination); }/********************************************************************************* sysTffsSet - set a block of memory** This routine stores <c> converted to an `unsigned char' in each of the* elements of the array of `unsigned char' beginning at <m>, with size <size>.** INCLUDE FILES: string.h** RETURNS: A pointer to <m>.* * NOMANUAL*/void * sysTffsSet ( void * m, /* block of memory */ int c, /* character to store */ size_t size /* size of memory */ ) { bfill ((char *) m, (int) size, c); return (m); }#endif /* FALSE *//********************************************************************************* flDelayMsecs - wait for specified number of milliseconds** This routine waits for specified number of milliseconds.** RETURNS: N/A* * NOMANUAL*/void flDelayMsecs ( unsigned milliseconds /* milliseconds to wait */ ) { UINT32 ix; UINT32 iy = 1; UINT32 iz = 2; /* it doesn't count time consumed in interrupt level */ for (ix = 0; ix < milliseconds; ix++) for (ix = 0; ix < sysTffsMsecLoopCount; ix++) { tickGet (); /* dummy */ iy = KILL_TIME_FUNC; /* consume time */ } }/********************************************************************************* flDelayLoop - consume the specified time** This routine consumes the specified time.** RETURNS: N/A*/void flDelayLoop ( int cycles ) { }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -