本文整理汇总了C++中OALMSG函数的典型用法代码示例。如果您正苦于以下问题:C++ OALMSG函数的具体用法?C++ OALMSG怎么用?C++ OALMSG使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了OALMSG函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
示例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"));
}
示例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);
}
示例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;
}
示例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;
}
示例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;
}
示例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"));
}
示例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"));
}
示例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 );
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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"));
}