本文整理汇总了C++中OALMSG函数的典型用法代码示例。如果您正苦于以下问题:C++ OALMSG函数的具体用法?C++ OALMSG怎么用?C++ OALMSG使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了OALMSG函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: CheckUSBinUse
static BOOL CheckUSBinUse(void)
{
// Check USB Device in Use
if (*g_pOTGLinkReg & (0x3<<18))
{
if (g_bDVSEN == TRUE)
{
g_bDVSEN = FALSE; // Disable DVS
if (g_CurrentLevel != SYS_L0)
{
ChangeDVSLevel(SYS_L0);
}
OALMSG(OAL_POWER && OAL_FUNC, (L"[DVS] DVS disabled by USB\r\n"));
}
return TRUE; // Do not apply DVS, when USB is in Use
}
else
{
if (g_bDVSEN == FALSE)
{
// Enable DVS after USB operation finished
g_bDVSEN = TRUE;
OALMSG(OAL_POWER && OAL_FUNC, (L"[DVS] DVS enabled\r\n"));
}
}
return FALSE;
}
开发者ID:HITEG,项目名称:TenByTen6410_SLC,代码行数:27,代码来源:dvs.c
示例2: OEMSWReset
void OEMSWReset(void)
{
//
// If the board design supports software-controllable hardware reset logic, it should be
// used. Because this routine is specific to the S3C6410 CPU, it only uses the watchdog
// timer to assert reset. One downside to this approach is that nRSTOUT isn't asserted
// so any board-level logic isn't reset via this method. This routine can be overidden in
// the specific platform code to control board-level reset logic, should it exist.
//
volatile S3C6410_SYSCON_REG *pSysConReg = (S3C6410_SYSCON_REG *)OALPAtoVA(S3C6410_BASE_REG_PA_SYSCON, FALSE);
OALMSG(TRUE, (L"[OEM] ++OEMSWReset()\r\n"));
// HCLK_IROM, HCLK_MEM1, HCLK_MEM0, HCLK_MFC Should be Always On for power Mode (Something coupled with BUS operation)
pSysConReg->HCLK_GATE |= ((1<<25)|(1<<22)|(1<<21)|(1<<0));
OALMSG(TRUE, (L"[OEM] + OEMSWReset() using watchdog timer\r\n"));
// Generate Software Reset using watchdog timer
_OEMSWReset();
// Wait for Reset
//
while(1);
// Should Never Get Here
//
OALMSG(TRUE, (L"[OEM] --OEMSWReset() : Do Not See Me !!!!!! \r\n"));
}
开发者ID:sriemann,项目名称:S3C6410_SEC_V1,代码行数:31,代码来源:reset.c
示例3: OALIoCtlHalReboot
//------------------------------------------------------------------------------
//
// Function: OALIoCtlHalReboot
//
//
BOOL OALIoCtlHalReboot(UINT32 code, VOID *pInpBuffer,
UINT32 inpSize, VOID *pOutBuffer,
UINT32 outSize, UINT32 *pOutSize)
{
//
// If the board design supports software-controllable hardware reset logic, it should be
// used. Because this routine is specific to the S3C2450 CPU, it only uses the watchdog
// timer to assert reset. One downside to this approach is that nRSTOUT isn't asserted
// so any board-level logic isn't reset via this method. This routine can be overidden in
// the specific platform code to control board-level reset logic, should it exist.
//
volatile S3C2450_CLKPWR_REG *pCLKPWR = (S3C2450_CLKPWR_REG *)OALPAtoVA(S3C2450_BASE_REG_PA_CLOCK_POWER, FALSE);
//[david.modify] 2008-11-14 10:21
// lcpµØͼ¸´Î»
DPSTR_R1("reboot");
return ;
OALMSG(OAL_IOCTL&&OAL_FUNC, (L"+OALIoCtlHalReboot\r\n"));
// Into reset
pCLKPWR->SWRST = 0x533C2450;
// Wait for watchdog reset...
//
while(TRUE);
// Should never get to this point...
//
OALMSG(OAL_IOCTL&&OAL_FUNC, (L"-OALIoCtlHalReboot\r\n"));
return(TRUE);
}
开发者ID:blackfa1con,项目名称:openembed,代码行数:39,代码来源:reboot.c
示例4: OALIoCtlHalGetWakeSource
//------------------------------------------------------------------------------
//
// Function: OALIoCtlGetWakeSource
//
BOOL OALIoCtlHalGetWakeSource(
UINT32 code, VOID* pInpBuffer, UINT32 inpSize, VOID* pOutBuffer,
UINT32 outSize, UINT32 *pOutSize
) {
BOOL rc = FALSE;
OALMSG(OAL_POWER&&OAL_FUNC, (L"+OALIoCtlHalGetWakeSource\r\n"));
if (pOutSize) {
*pOutSize = sizeof(UINT32);
}
if (pOutBuffer == NULL && outSize > 0) {
NKSetLastError(ERROR_INVALID_PARAMETER);
goto cleanUp;
}
if (pOutBuffer == NULL || outSize < sizeof(UINT32)) {
NKSetLastError(ERROR_INSUFFICIENT_BUFFER);
goto cleanUp;
}
*(UINT32*)pOutBuffer = g_oalWakeSource;
rc = TRUE;
cleanUp:
OALMSG(OAL_POWER&&OAL_FUNC, (
L"+OALIoCtlHalGetWakeSource(rc = %d, sysIntr = %d)\r\n",
rc, *(UINT32*)pOutBuffer
));
return rc;
}
开发者ID:zizilala,项目名称:projects_etest,代码行数:37,代码来源:ioctl.c
示例5: OEMStartEraseFlash
//------------------------------------------------------------------------------
//
// Function: OEMStartEraseFlash
//
// This function is called by the bootloader to initiate the flash memory
// erasing process.
//
BOOL OEMStartEraseFlash(ULONG address, ULONG size)
{
BOOL rc = FALSE;
OALMSG(OAL_FUNC, (
L"+OEMStartEraseFlash(0x%08x, 0x%08x)\r\n", address, size
));
if (
address < (UINT32)OALPAtoCA(IMAGE_FLASH_PA_START) ||
size > IMAGE_FLASH_SIZE
) {
OALMSG(OAL_WARN, (
L"OEMStartEraseFlash: Invalid region (start 0x%08x size 0x%08x)\r\n",
address, size
));
goto cleanUp;
}
// Save address and size for later
g_flashAddress = address;
g_flashSize = size;
rc = TRUE;
cleanUp:
OALMSG(OAL_FUNC, (L"-OEMStartEraseFlash(rc = %d)\r\n", rc));
return rc;
}
开发者ID:laoyouji,项目名称:wince6.0-1b,代码行数:36,代码来源:flash.c
示例6: OEMFinishEraseFlash
//------------------------------------------------------------------------------
//
// Function: OEMFinishEraseFlash
//
// This function is called by the bootloader to finish flash erase before
// it will call OEMWriteFlash.
//
BOOL OEMFinishEraseFlash(void)
{
BOOL rc = FALSE;
OALMSG(OAL_FUNC, (L"+OEMFinishEraseFlash\r\n"));
OALMSG(OAL_WARN, (
L"Erase flash memory at 0x%08x size 0x%08x...",
g_flashAddress, g_flashSize
));
if (!OALFlashErase(
OALPAtoUA(IMAGE_FLASH_PA_START), OALPAtoUA((VOID*)g_flashAddress), g_flashSize
)) {
OALMSG(OAL_ERROR, (
L"\r\nERROR: Flash erase for address 0x%08x failed\r\n",
g_flashAddress
));
goto cleanUp;
}
OALMSG(OAL_WARN, (L" Done\r\n"));
rc = TRUE;
cleanUp:
OALMSG(OAL_FUNC, (L"-OEMFinishEraseFlash(rc = %d)\r\n", rc));
return rc;
}
开发者ID:laoyouji,项目名称:wince6.0-1b,代码行数:36,代码来源:flash.c
示例7: PDD_SendRndisMessage
void PDD_SendRndisMessage(PDATA_WRAPPER pDataWrapper)
{
OALMSG(OAL_ETHER&&OAL_FUNC, (L"+RNDIS_USBFN_PDD_SendRndisMessage\r\n"));
//
// We don't do the actual sending here but queue it up...
// We then trigger Interrupt endpoint to send interrupt to host which will in turn
// use EP0 to GET_ENCAPSULATED_RESPONSE
InsertTailList((&g_RndisKitlDev.listTxRndisMessageQueue), &(pDataWrapper->Link));
OALMSG(OAL_ETHER&&OAL_FUNC, (
L"+RNDIS_USBFN_PDD_SendRndisMessage: message queued.\r\n"
));
// Interrupt (via interrupt endpoint) the host to GET_ENCAPSULATED_RESPONSE
// g_EP3Transfer.dwCallerPermissions;
g_EP3Transfer.dwFlags = USB_REQUEST_DEVICE_TO_HOST;
g_EP3Transfer.pvBuffer = &g_InterruptData;
// g_EP3Transfer.dwBufferPhysicalAddress; // not used
g_EP3Transfer.cbBuffer = sizeof(g_InterruptData);
g_EP3Transfer.cbTransferred = 0;
g_EP3Transfer.dwUsbError = UFN_NOT_COMPLETE_ERROR; // Possible values are in usbfntypes.h
g_EP3Transfer.pvPddData = NULL;
g_EP3Transfer.pvPddTransferInfo = NULL;
OALMSG(OAL_ETHER&&OAL_FUNC, (
L"+RNDIS_USBFN_PDD_SendRndisMessage: issuing interrupt...\r\n"
));
g_pddInterface.pfnIssueTransfer( g_pddInterface.pvPddContext, 3, &g_EP3Transfer );
OALMSG(OAL_ETHER&&OAL_FUNC, (L"-RNDIS_USBFN_PDD_SendRndisMessage\r\n"));
}
开发者ID:zizilala,项目名称:projects_wince_new,代码行数:33,代码来源:pdd_rndis.c
示例8: PDD_SendRndisPacket
////////////////////////////////////////////////////////////////////////////////
// PDD_SendRndisPacket()
//
// Routine Description:
//
// This routine is called by MDD to send data to host via IN pipe.
// PDD is guaranteed to have only one outstanding packet to send until
// the packet is retured to MDD via MddSendRndisPacketComplete()
//
// Arguments:
//
// pDataWrapper :: structure holding data we need to send.
//
// Return Value:
//
// None.
//
void PDD_SendRndisPacket(PDATA_WRAPPER pDataWrapper)
{
OALMSG(OAL_ETHER&&OAL_FUNC, (L"+RNDIS_USBFN_PDD_SendRndisPacket\r\n"));
OALMSG(OAL_ETHER&&OAL_FUNC, (
L"Got SendPacket Request [%d bytes]\r\n", pDataWrapper->dwDataSize
));
if (g_RndisKitlDev.pTxDataWrapper != NULL) {
//
// BAD!
// This should never happen!!
// Return the packet immediately..
//
OALMSG(OAL_ERROR, (L"****Multiple pending send rndis packet!!\r\n"));
MddSendRndisPacketComplete(pDataWrapper);
}
// save the data wrapper pointer so we can return later it in TxComplete call
g_RndisKitlDev.pTxDataWrapper = pDataWrapper;
// g_EP2Transfer.dwCallerPermissions;
g_EP2Transfer.dwFlags = USB_REQUEST_DEVICE_TO_HOST;
g_EP2Transfer.pvBuffer = pDataWrapper->pucData;
// g_EP2Transfer.dwBufferPhysicalAddress; // not used
g_EP2Transfer.cbBuffer = pDataWrapper->dwDataSize;
g_EP2Transfer.cbTransferred = 0;
g_EP2Transfer.dwUsbError = UFN_NOT_COMPLETE_ERROR; // Possible values are in usbfntypes.h
g_EP2Transfer.pvPddData = NULL;
g_EP2Transfer.pvPddTransferInfo = NULL;
g_EP2TransferState = TS_SENDING_PACKET;
g_pddInterface.pfnIssueTransfer( g_pddInterface.pvPddContext, 2, &g_EP2Transfer );
OALMSG(OAL_ETHER&&OAL_FUNC, (L"-RNDIS_USBFN_PDD_SendRndisPacket\r\n"));
}
开发者ID:zizilala,项目名称:projects_wince_new,代码行数:52,代码来源:pdd_rndis.c
示例9: SetupEP1Transfer
// sets up a packet receive transfer on EP1 (BULK OUT)
VOID SetupEP1Transfer()
{
// allocate data transfer for EP1
if (!g_pEP1DataWrapper) {
g_pEP1DataWrapper = MDDAllocDataWrapper();
if (!g_pEP1DataWrapper) {
OALMSG(OAL_ERROR, (L"No mem for RX DataWrapper\r\n"));
return;
}
g_pEP1DataWrapper->pucData = MDDAllocMem();
if (!g_pEP1DataWrapper->pucData) {
OALMSG(OAL_ERROR, (L"No mem for RX data\r\n"));
MDDFreeDataWrapper(g_pEP1DataWrapper);
return;
}
g_pEP1DataWrapper->dwDataSize = MAX_INCOMING_BUFFER;
}
// g_EP1Transfer.dwCallerPermissions;
g_EP1Transfer.pvBuffer = g_pEP1DataWrapper->pucData;
// g_EP1Transfer.dwBufferPhysicalAddress; // not used
g_EP1Transfer.cbBuffer = g_pEP1DataWrapper->dwDataSize;
g_EP1Transfer.cbTransferred = 0;
g_EP1Transfer.dwUsbError = UFN_NOT_COMPLETE_ERROR; // Possible values are in usbfntypes.h
g_EP1Transfer.pvPddData = NULL;
g_EP1Transfer.pvPddTransferInfo = NULL;
g_EP1Transfer.dwFlags = 0;
g_pddInterface.pfnIssueTransfer( g_pddInterface.pvPddContext, 1, &g_EP1Transfer );
}
开发者ID:zizilala,项目名称:projects_wince_new,代码行数:31,代码来源:pdd_rndis.c
示例10: InitSystemControl
//------------------------------------------------------------------------------
BOOL InitSystemControl()
{
#if 0
OALMSG(OAL_ETHER&&OAL_FUNC, (L"+USBFN:: Initialize System Control\r\n"));
{
DWORD temp, mode;
OMAP2420_SYSC1_REGS *pSysConRegs = OALPAtoUA(OMAP2420_SYSC1_REGS_PA);
temp = INREG32(&pSysConRegs->ulCONTROL_DEVCONF);
mode = USBX_TRX_MODE;
// Clear USBT0WRIMODEI. This places the USB Controls in Unidirectional Mode
temp &= 0xFF3FFFFF;
// Set the Transceiver Interface Mode for USB Port 0
if ((mode == 0x01) || (mode == 0x02))
{
// Change the mode to Bidirectional.
temp |= 0x00800000;
}
// Make sure the USB Enable signal is being used as an Active-High signal
temp &= 0xFFFEFFFF;
// Make sure the USB module standby signal is not asserted
temp &= 0xFFFF7FFF;
OUTREG32(&pSysConRegs->ulCONTROL_DEVCONF, temp);
}
OALMSG(OAL_ETHER&&OAL_FUNC, (L"-USBFN:: Initialize System Control\r\n"));
#endif
return TRUE;
}
开发者ID:zizilala,项目名称:projects_wince_new,代码行数:36,代码来源:hwinit.c
示例11: InitClockController
BOOL InitClockController()
{
OALMSG(OAL_ETHER&&OAL_FUNC, (L"+USBFN:: Initialize USB Clock Mgr\r\n"));
{
OMAP2420_PRCM_REGS * pPRCMRegs = OALPAtoUA(OMAP2420_PRCM_REGS_PA);
#if 0
// Disable the USB Interface clock
CLRREG32(&pPRCMRegs->ulCM_ICLKEN2_CORE, 0x00000001); // Clear EN_USB
#endif
// Configure the USB Interface Clock Speed
CLRREG32(&pPRCMRegs->ulCM_CLKSEL1_CORE, 0x0E000000); // Clear clk = L3_CLK/1 (boot mode only)
SETREG32(&pPRCMRegs->ulCM_CLKSEL1_CORE, 0x08000000); // Set clk = L3_CLK/3
#if 0
// Ensure that the USB Interface clock remains active when the MPU enters Idle Mode.
CLRREG32(&pPRCMRegs->ulCM_AUTOIDLE2_CORE, 0x00000001); // Clear AUTO_USB
// Enable the USB Interface clock
SETREG32(&pPRCMRegs->ulCM_ICLKEN2_CORE, 0x00000001); // Set EN_USB
// Enable the USB Functional clock
SETREG32(&pPRCMRegs->ulCM_FCLKEN2_CORE, 0x00000001); // Set EN_USB
// Enable USB Wake-Up
SETREG32(&pPRCMRegs->ulPM_WKEN2_CORE, 0x00000001); // Set EN_USB
#endif
}
OALMSG(OAL_ETHER&&OAL_FUNC, (L"-USBFN:: Initialize USB Clock Mgr\r\n"));
return TRUE;
}
开发者ID:zizilala,项目名称:projects_wince_new,代码行数:31,代码来源:hwinit.c
示例12: OALIoCtlHalInitRTC
//------------------------------------------------------------------------------
//
// Function: OALIoCtlHalInitRTC
//
// This function is called by WinCE OS to initialize the time after boot.
// Input buffer contains SYSTEMTIME structure with default time value.
// If hardware has persistent real time clock it will ignore this value
// (or all call).
//
BOOL OALIoCtlHalInitRTC(
UINT32 code, VOID *pInpBuffer, UINT32 inpSize, VOID *pOutBuffer,
UINT32 outSize, UINT32 *pOutSize
) {
BOOL rc = FALSE;
SYSTEMTIME *pTime = (SYSTEMTIME*)pInpBuffer;
OALMSG(OAL_IOCTL&&OAL_FUNC, (L"+OALIoCtlHalInitRTC(...)\r\n"));
// Validate inputs
if (pInpBuffer == NULL || inpSize < sizeof(SYSTEMTIME)) {
NKSetLastError(ERROR_INVALID_PARAMETER);
OALMSG(OAL_ERROR, (
L"ERROR: OALIoCtlHalInitRTC: Invalid parameter\r\n"
));
goto cleanUp;
}
// Add static mapping for RTC alarm
OALIntrStaticTranslate(SYSINTR_RTC_ALARM, IRQ_RTC);
// Set time
rc = OEMSetRealTime(pTime);
cleanUp:
OALMSG(OAL_IOCTL&&OAL_FUNC, (L"-OALIoCtlHalInitRTC(rc = %d)\r\n", rc));
return rc;
}
开发者ID:Phong005,项目名称:aeroboot,代码行数:37,代码来源:alarm.c
示例13: OEMInterruptEnable
//------------------------------------------------------------------------------
//
// Function: OEMInterruptEnable
//
// This function enables the IRQ given its corresponding SysIntr value.
// Function returns true if SysIntr is valid, else false.
//
BOOL OEMInterruptEnable(DWORD sysIntr, LPVOID pvData, DWORD cbData)
{
BOOL rc = FALSE;
const UINT32 *pIrqs;
UINT32 count;
UNREFERENCED_PARAMETER(pvData);
UNREFERENCED_PARAMETER(cbData);
OALMSG(OAL_INTR&&OAL_VERBOSE,(L"+OEMInterruptEnable(%d, 0x%x, %d)\r\n", sysIntr, pvData, cbData));
// SYSINTR_VMINI & SYSINTR_TIMING are special cases
if (sysIntr == SYSINTR_VMINI || sysIntr == SYSINTR_TIMING) {
rc = TRUE;
goto cleanUp;
}
// Obtain the SYSINTR's underlying IRQ number
if (!OALIntrTranslateSysIntr(sysIntr, &count, &pIrqs)) {
// Indicate invalid SysIntr
OALMSG(OAL_ERROR, (
L"ERROR: OEMInterruptEnable: IRQs are undefined for SysIntr %d\r\n",
sysIntr ));
goto cleanUp;
}
// Enable the interrupt
rc = OALIntrEnableIrqs(count, pIrqs);
cleanUp:
OALMSG(OAL_INTR&&OAL_VERBOSE, (L"-OEMInterruptEnable(rc = 1)\r\n"));
return rc;
}
开发者ID:zizilala,项目名称:projects_etest,代码行数:40,代码来源:oem.c
示例14: OEMIsFlashAddr
//------------------------------------------------------------------------------
//
// Function: OEMIsFlashAddr
//
// This function determines whether the address provided lies in a platform's
// flash or RAM address range.
//
// EBOOT decision depends on download type. Download type is
// set in OMEMultiBinNotify.
//
BOOL
OEMIsFlashAddr(
ULONG address
)
{
BOOL rc;
UNREFERENCED_PARAMETER(address);
OALMSG(OAL_FUNC, (L"+OEMIsFlashAddr(0x%08x)\r\n", address));
// Depending on download type
switch (g_eboot.type)
{
case DOWNLOAD_TYPE_XLDR:
case DOWNLOAD_TYPE_EBOOT:
case DOWNLOAD_TYPE_LOGO:
case DOWNLOAD_TYPE_FLASHNAND:
case DOWNLOAD_TYPE_FLASHNOR:
rc = TRUE;
break;
default:
rc = FALSE;
break;
}
OALMSG(OAL_FUNC, (L"-OEMIsFlashAddr(rc = %d)\r\n", rc));
return rc;
}
开发者ID:blueskycoco,项目名称:dm3730-spi,代码行数:39,代码来源:main.c
示例15: OEMProfileTimerDisable
VOID OEMProfileTimerDisable()
{
BOOL enabled;
UINT32 irq;
OALMSG(TRUE, (L"+OEMProfileTimerDisable()\r\n"));
// No disable without enable
if (!g_profiler.enabled) goto cleanUp;
// Following code should not be interrupted
enabled = INTERRUPTS_ENABLE(FALSE);
// Disable the profile timer interrupt
irq = IRQ_TIMER2;
OALIntrDisableIrqs(1, &irq);
// Deconfigure profiling ISR callback function.
g_pProfilerISR = NULL;
// Reset flag
g_profiler.enabled = FALSE;
// Enable interrupts
INTERRUPTS_ENABLE(enabled);
cleanUp:
OALMSG(TRUE, (L"-OEMProfileTimerDisable\r\n"));
}
开发者ID:blackfa1con,项目名称:openembed,代码行数:29,代码来源:profiler.c
示例16: OEMKitlStartup
BOOL OEMKitlStartup(void)
{
OAL_KITL_ARGS KITLArgs;
OAL_KITL_ARGS *pKITLArgs;
BOOL bRet = FALSE;
UCHAR *szDeviceId,buffer[OAL_KITL_ID_SIZE]="\0";
OALMSG(OAL_KITL&&OAL_FUNC, (L"[KITL] ++OEMKitlStartup()\r\n"));
// Look for bootargs left by the bootloader or left over from an earlier boot.
//
pKITLArgs = (OAL_KITL_ARGS *)OALArgsQuery(OAL_ARGS_QUERY_KITL);
szDeviceId = (UCHAR*)OALArgsQuery(OAL_ARGS_QUERY_DEVID);
// If no KITL arguments were found (typically provided by the bootloader), then select
// some default settings.
//
if (pKITLArgs == NULL)
{
memset(&KITLArgs, 0, sizeof(OAL_KITL_ARGS));
// By default, enable KITL and use USB Serial
KITLArgs.flags |= OAL_KITL_FLAGS_ENABLED;
KITLArgs.devLoc.IfcType = Internal;
KITLArgs.devLoc.BusNumber = 0;
KITLArgs.devLoc.PhysicalLoc = (PVOID)S3C6410_BASE_REG_PA_USBOTG_LINK;
KITLArgs.devLoc.LogicalLoc = (DWORD)KITLArgs.devLoc.PhysicalLoc;
pKITLArgs = &KITLArgs;
}
if (pKITLArgs->devLoc.LogicalLoc == BSP_BASE_REG_PA_DM9000A_IOBASE)
{
// Ethernet specific initialization
//configure chipselect for DM9000A
InitSROMC_DM9000A();
//setting EINT7 as IRQ_LAN
if (!(pKITLArgs->flags & OAL_KITL_FLAGS_POLL))
{
g_pGPIOReg = (S3C6410_GPIO_REG *)OALPAtoVA(S3C6410_BASE_REG_PA_GPIO, FALSE);
}
// Setup pointers to the power on and power off functions to enable KITL
// functionality across suspend/resume
// Modify the g_kitlEthCS8900A structure defined in kitl_cfg.h
g_kitlEthDM9000A.pfnPowerOff = (OAL_KITLETH_POWER_OFF)BSPKitlEthPowerOff;
g_kitlEthDM9000A.pfnPowerOn = (OAL_KITLETH_POWER_ON)BSPKitlEthPowerOn;
}
bRet = OALKitlInit ((LPCSTR)szDeviceId, pKITLArgs, g_kitlDevices);
OALMSG(OAL_KITL&&OAL_FUNC, (L"[KITL] --OEMKitlStartup() = %d\r\n", bRet));
return bRet;
}
开发者ID:HITEG,项目名称:TenByTen6410_SLC,代码行数:59,代码来源:kitl.c
示例17: OALIoCtlHalInitRTC
//------------------------------------------------------------------------------
//
// Function: OALIoCtlHalInitRTC
//
// This function is called by WinCE OS to initialize the time after boot.
// Input buffer contains SYSTEMTIME structure with default time value.
// If hardware has persistent real time clock it will ignore this value
// (or all call).
//
BOOL OALIoCtlHalInitRTC(
UINT32 code, VOID *pInpBuffer, UINT32 inpSize,
VOID *pOutBuffer, UINT32 outSize, UINT32 *pOutSize)
{
BOOL rc = FALSE;
BOOL bResetRTC = FALSE;
SYSTEMTIME SysTime;
OALMSG(OAL_IOCTL&&OAL_FUNC, (L"+OALIoCtlHalInitRTC(...)\r\n"));
// Validate inputs
if (pInpBuffer == NULL || inpSize < sizeof(SYSTEMTIME)) {
NKSetLastError(ERROR_INVALID_PARAMETER);
OALMSG(OAL_ERROR, (
L"ERROR: OALIoCtlHalInitRTC: Invalid parameter\r\n"
));
goto cleanUp;
}
// Initialize critical section for RTC functions.
InitializeCriticalSection(&g_oalRTCcs);
g_oalRTCcsInit = 1;
// Add static mapping for RTC alarm
OALIntrStaticTranslate(SYSINTR_RTC_ALARM, IRQ_RTC_ALARM);
OEMGetRealTime(&SysTime);
/* RTC Time validity check */
bResetRTC = (SysTime.wYear < RTC_YEAR_DATUM || (SysTime.wYear - RTC_YEAR_DATUM) > 99) ? TRUE : bResetRTC;
bResetRTC = (SysTime.wMonth > 12 || SysTime.wMonth < 1) ? TRUE : bResetRTC;
bResetRTC = (SysTime.wDay > 31 || SysTime.wDay < 1) ? TRUE : bResetRTC;
bResetRTC = (SysTime.wDayOfWeek > 6 || SysTime.wDayOfWeek < 0) ? TRUE : bResetRTC;
bResetRTC = (SysTime.wHour > 23 || SysTime.wHour < 0) ? TRUE : bResetRTC;
bResetRTC = (SysTime.wMinute > 59 || SysTime.wMinute < 0) ? TRUE : bResetRTC;
bResetRTC = (SysTime.wSecond > 59 || SysTime.wSecond < 0) ? TRUE : bResetRTC;
if(bResetRTC)
{
OALMSG(OAL_RTC&&OAL_ERROR,(L"Invalid RTC Time (%d.%d.%d, %d:%d:%d, (%d th day of week)\r\n", \
SysTime.wYear, SysTime.wMonth, SysTime.wDay, \
SysTime.wHour, SysTime.wMinute, SysTime.wSecond, \
SysTime.wDayOfWeek
));
}
// Set time
if(bResetRTC)
{
rc = OEMSetRealTime(&g_oalRtcResetTime);
}
cleanUp:
OALMSG(OAL_IOCTL&&OAL_FUNC, (L"-OALIoCtlHalInitRTC(rc = %d)\r\n", rc));
return rc;
}
开发者ID:sriemann,项目名称:S3C6410_SEC_V1,代码行数:67,代码来源:rtc.c
示例18: main
void main(void)
{
OEMInitDebugSerial();
OALMSG(TRUE,(TEXT("IPLmain\r\n")));
//InitializeDisplay();
OALMSG(OAL_ERROR, (TEXT("Start: IPLmain start \r\n")));
IPLmain();
}
开发者ID:blueskycoco,项目名称:BigStar,代码行数:9,代码来源:main.c
示例19: OEMSetRealTime
//------------------------------------------------------------------------------
//
// Function: OEMSetRealTime
//
// Updates the RTC with the specified system time.
//
BOOL OEMSetRealTime(LPSYSTEMTIME pTime)
{
BOOL rc = FALSE;
volatile S3C6400_RTC_REG *pRTCReg;
if (pTime == NULL) goto cleanUp;
OALMSG(OAL_RTC&&OAL_FUNC, (
L"+OEMSetRealTime(%d/%d/%d %d:%d:%d.%03d)\r\n",
pTime->wYear, pTime->wMonth, pTime->wDay, pTime->wHour, pTime->wMinute,
pTime->wSecond, pTime->wMilliseconds));
OALMSG(TRUE, (
L"OEMSetRealTime(%d/%d/%d %d:%d:%d.%03d)\r\n",
pTime->wYear, pTime->wMonth, pTime->wDay, pTime->wHour, pTime->wMinute,
pTime->wSecond, pTime->wMilliseconds));
// The RTC will only support a BCD year value of 0 - 99. The year datum is
// 1980, so any dates greater than 2079 will fail unless the datum is
// adjusted.
if ((pTime->wYear < RTC_YEAR_DATUM)
|| ((pTime->wYear - RTC_YEAR_DATUM) > 99))
{
OALMSG(OAL_ERROR, (L"ERROR: OEMSetRealTime: "
L"RTC cannot support a year greater than %d or less than %d "
L"(value %d)\r\n", (RTC_YEAR_DATUM + 99), RTC_YEAR_DATUM,
pTime->wYear));
goto cleanUp;
}
// Get uncached virtual address
pRTCReg = (S3C6400_RTC_REG *)OALPAtoVA(S3C6400_BASE_REG_PA_RTC, FALSE);
// Enable RTC control.
pRTCReg->RTCCON |= (1<<0);
pRTCReg->BCDSEC = TO_BCD(pTime->wSecond);
pRTCReg->BCDMIN = TO_BCD(pTime->wMinute);
pRTCReg->BCDHOUR = TO_BCD(pTime->wHour);
pRTCReg->BCDDATE = TO_BCD(pTime->wDay);
pRTCReg->BCDDAY = pTime->wDayOfWeek + 1;
pRTCReg->BCDMON = TO_BCD(pTime->wMonth);
pRTCReg->BCDYEAR = TO_BCD(pTime->wYear - RTC_YEAR_DATUM);
// Disable RTC control.
pRTCReg->RTCCON &= ~(1<<0);
// Done
rc = TRUE;
cleanUp:
OALMSG(OAL_RTC&&OAL_FUNC, (L"-OEMSetRealTime(rc = %d)\r\n", rc));
return rc;
}
开发者ID:darwinbeing,项目名称:wince-on-iphone,代码行数:63,代码来源:rtc.c
示例20: ReadFlashNK
static
UINT32
ReadFlashNK(
)
{
UINT32 rc = (UINT32)BL_ERROR;
ROMHDR *pTOC;
ULONG offset, size;
UCHAR *pData;
DWORD *pInfo;
UCHAR *pBase = OALPAtoVA(g_ulFlashBase, FALSE);
UCHAR *pStart = (void *)((UINT32)pBase + IMAGE_WINCE_NOR_OFFSET);
OALMSG(OAL_INFO, (L"\r\nLoad NK image from flash memory\r\n"));
// Set address where to place image
pData = (UCHAR*)IMAGE_WINCE_CODE_CA;
// First read 4kB with pointer to TOC
offset = 0;
size = 4096;
memcpy(pData + offset, pStart, size);
// Verify that we get CE image
pInfo = (DWORD *)(pData + offset + ROM_SIGNATURE_OFFSET);
if (*pInfo != ROM_SIGNATURE)
{
OALMSG(OAL_ERROR, (L"ERROR: Image signature not found\r\n"));
goto cleanUp;
}
// Read image up through actual TOC
offset = size;
size = pInfo[2] - size + sizeof(ROMHDR);
memcpy(pData + offset, pStart + offset, size);
// Verify image
if (!VerifyImage(pData, &pTOC))
{
OALMSG(OAL_ERROR, (L"ERROR: NK image doesn't have ROM signature\r\n"));
goto cleanUp;
}
// Read remainder of image
offset += size;
size = pTOC->physlast - pTOC->physfirst - offset;
memcpy(pData + offset, pStart + offset, size);
OALMSG(OAL_INFO, (L"NK Image Loaded\r\n"));
// Done
g_eboot.launchAddress = OALVAtoPA((UCHAR*)IMAGE_WINCE_CODE_CA);
rc = BL_JUMP;
cleanUp:
return rc;
}
开发者ID:grilledcheesesandwich,项目名称:projects_wince_old,代码行数:57,代码来源:flash.c
注:本文中的OALMSG函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论