📄 hal.h
字号:
// to the LCD controller.
//
// PARAMETERS:
// pMem - Pointer to receive the address of the first byte of display
// memory.
// pRegs - Pointer to receive the address of the first byte of register
// space.
//
// RETURNS:
// TRUE if the routine is able to locate an LCD controller.
// *pMem will be the address of the first byte of display memory.
// *pRegs will be the address of the first LCD controller control register.
// FALSE if an LCD controller is not located.
// If additional error information is required call
// halGetLastError().
//
// MODIFIES:
// This routine does not modify any register contents.
//---------------------------------------------------------------------------
//Boolean halAcquireController( UInt32 * pMem, UInt32 * pReg );
//---------------------------------------------------------------------------
// FUNCTION: halInitController()
//
// DESCRIPTION:
// This routine performs the initialization portion of the startup
// sequence. If the HAL has not been CFGed then initialization is
// bypassed and this function returns FALSE.
//
// Initialization consists of several steps:
// - Setting the contol registers the state defined by CFG
// - Setting the LUT to its default value
// - Clearing video memory
//
// Parameters passed in dwFlags can cause any or all of these steps to
// be bypassed. This allows for run-time operational changes.
// Specifying ANY fJUST_xxx flag will cause any specified fDONT_xxx
// flag to be ignored, as fJUST_xxx flags have the highest priority.
//
// PARAMETERS:
// Flags - contains initialization specific information.
//
// RETURNS:
// TRUE if the initialization was successful.
// FALSE if the HAL was unable to initialize the LCD controller or if the
// system has not been CFGed.
//
// If additional error information is required call halGetLastError()
//
// MODIFIES:
// Nearly every register and all display memory can or will be affected.
//---------------------------------------------------------------------------
//Boolean halInitController( UInt32 Flags );
//---------------------------------------------------------------------------
// FUNCTION: halSetISRCallback()
//
// DESCRIPTION:
// This function registers an ISR callback routine with the HAL. If the
// controller generates a non-masked interrupt, the hal will call the
// supplied callback routine to notify the application that an interrupt
// has occurred. Multiple applications can all register ISR callback
// routines, and if a non-masked interrupt occurs, ALL applications with
// registered callbacks will be called. Each application must determine
// which interrupt(s) it is servicing, and not conflict with any other
// application's interrupt sources. Therefore, each application should
// treat an ISR callback as an "interrupt notification message", not as
// manditory reuqirement to necessarily process the interrupt request.
//
// Note that for WIN32 platforms, the S1D13xxx.SYS driver will disable
// the "interrupt enable" bit for for any generated interrupt. It is the
// callback's responsibility to re-enable the interrupt, if required.
//
// PARAMETERS:
// pISRCallback Pointer to a callback function that will be called
// when a non-masked interrupt occurs. This argument
// may be NULL to effectively unregister the callback.
//
// RETURNS:
// TRUE if the ISR callback registration was successful.
// FALSE if the HAL was unable to register the ISR callback
//
// MODIFIES: Nothing.
//---------------------------------------------------------------------------
//Boolean halSetISRCallback( void(*pISRCallback)(void) );
//---------------------------------------------------------------------------
// FUNCTION: halGetVersionInfo()
//
// DESCRIPTION:
// This routine takes program specific information and merges that
// information with HAL specific information and a standardized
// copyright notice. The newly formulated string is returned to the
// calling program for display.
//
// The final formatted string will resemble:
//
// ?????PROGRAM - Internal test and diagnostic program - Build: 1234 [HAL: 1234]
// Copyright (c) 2002 Epson Research and Development, Inc.
// All Rights Reserved.
// Configuration CRC - 1234h
//
// PARAMETERS:
// szProgName- Pointer to an ASCIIZ string containing the name of
// the program.
// (eg. "PROGRAM")
// szDesc - Pointer to an ASCIIZ string containing a description
// of what this program is intended to do.
// (eg. "Internal test and diagnostic program")
// szVersion - Pointer to an ASCIIZ string containg the build number
// of the program.
// (eg. "$Revision: 20 $")
// szRetStr - Pointer to a buffer into which the product and version
// information will be formatted into.
// Length - Total number of bytes in the string pointed to by
// pszInfoString. This function will write nLength or
// fewer bytes to the buffer pointed to by pszInfoString.
//
// RETURNS: Nothing.
//
// MODIFIES: Nothing.
//---------------------------------------------------------------------------
void halGetVersionInfo( const char * szProgName, const char * szDesc, const char * szVersion, char * szRegStr, int Length );
//-----------------------------------------------------------------------------
// FUNCTION: halGetLastError();
//
// DESCRIPTION:
// This routine retrieves information about the last error detected by the
// HAL.
//
// PARAMETERS:
// ErrMsg - String pointer to receive the textual error message.
// If ErrMsg is NULL then only the error code will be returned.
// MaxSize Maximum number of bytes that can be copied into the string
// pointed to by ErrMsg.
//
// RETURNS:
// The return value consists of the numerical error value and character
// array refererenced by ErrMsg is filled with text describing the last
// error.
//
// MODIFIES:
//-----------------------------------------------------------------------------
int halGetLastError( );
//---------------------------------------------------------------------------
// FUNCTION: halInitLUT()
//
// DESCRIPTION:
// This function will set the LUT to a known state.
// The routine cracks the color depth and display type to determine
// the LUT values to use and then proceeds to write the LUT.
//
// PARAMETERS:
// fUseGradientPalette
// - If true, LUT1 will be programmed to a gradient palette
// only in 256-color non-bypassed mode, otherwise the
// standard "pretty' HAL palette will be used in this mode.
//
// RETURNS: Nothing
//
// MODIFIES: TODO
//---------------------------------------------------------------------------
//void halInitLUT( Boolean fUseGradientPalette );
//-----------------------------------------------------------------------------
// FUNCTION: halDebugRegisterWrites()
//
// DESCRIPTION:
// This function enables or disables the debugging of all registers written
// by the halWriteReg8/16/32() functions. This function only works when the
// HAL is built as a Debug Target. Debugging of register writes can also be
// enabled, by default, if the HalInfo flag, fDEBUG_REG_WRITES, is set.
//
// PARAMETERS:
// fDebug - TRUE to enable register writes debugging, else FALSE.
//
// RETURNS:
// The previous setting of the debug flag.
//
// MODIFIES:
// n/a
//-----------------------------------------------------------------------------
#ifdef __cplusplus
}
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -