这篇教程C++ DEBUGSTR函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中DEBUGSTR函数的典型用法代码示例。如果您正苦于以下问题:C++ DEBUGSTR函数的具体用法?C++ DEBUGSTR怎么用?C++ DEBUGSTR使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了DEBUGSTR函数的30个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: adcrom_config/* Configure ADC ROM Driver and pripheral */static int adcrom_config(void){ ADC_CFG_T cfg = { ADC_SEQ_A_CONFIG, ADC_SEQ_B_CONFIG, ADC_CONFIG, 0 /* Divider will be calculated during run time */ }; cfg.clkDiv = 0xFF; /* Configure the ADC */ ROM_ADC_Configure(hADC, &cfg); /* Calibrate the ADC */ if (ROM_ADC_Calibrate(hADC, Chip_Clock_GetSystemClockRate()) != LPC_OK) { DEBUGSTR("ERROR: Calibrating ADC/r/n"); while (1) {} } DEBUGSTR("ADC Initialized and Calibrated successfully!/r/n"); /* Channel configurations */ ROM_ADC_ConfigureCh(hADC, 0, ADC_CH_THRES_DATA | ADC_CH_THRES_SEL1 | ADC_CH_THRES_CROSSING); ROM_ADC_ConfigureCh(hADC, 1, ADC_CH_THRES_DATA); return 0;}
开发者ID:JamesHinnant,项目名称:osp,代码行数:28,
示例2: IPC_initMsgQueue/* Function to initialize the IPC message queue */void IPC_initMsgQueue(void *data, int size, int count){ struct ipc_queue *qrd; /* Sanity Check */ if (!size || !count || !data) { DEBUGSTR("ERROR:IPC Queue size invalid parameters/r/n"); while (1) {} } /* Check if size is a power of 2 */ if (count & (count - 1)) { DEBUGSTR("ERROR:IPC Queue size not power of 2/r/n"); while (1) { /* BUG: Size must always be power of 2 */ } } qrd = &q_ipc[CPUID_CURR]; memset(qrd, 0, sizeof(*qrd)); qrd->count = count; qrd->size = size; qrd->data = data; qrd->valid = QUEUE_MAGIC_VALID; if (!IPC_EventHandler) { IPC_EventHandler = IPC_EventHandler_sa; }}
开发者ID:dlang9159,项目名称:MCU_Test_MCore,代码行数:27,
示例3: PMC_Get_Wakeup_option/***************************************************************************** * Private functions ****************************************************************************/static void PMC_Get_Wakeup_option(uint8_t *Wakeup_rtc){ FlagStatus exitflag; uint8_t buffer = 0xFF; DEBUGSTR(menu1); exitflag = RESET; while (exitflag == RESET) { /* Get user input */ buffer = DEBUGIN(); if ((buffer == 'W') || (buffer == 'w')) { DEBUGSTR("WAKEUP0 pin selected /r/n"); *Wakeup_rtc = 0; exitflag = SET; } if ((buffer == 'R') || (buffer == 'r')) { DEBUGSTR("RTC Alarm selected /r/n"); *Wakeup_rtc = 1; exitflag = SET; } }}
开发者ID:fcladera,项目名称:ciaa_lpcopen_bare,代码行数:29,
示例4: DoneHooksRegvoid DoneHooksReg(){#ifdef HOOKS_USE_VIRT_REGISTRY#ifdef _DEBUG //WARNING!!! OutputDebugString must NOT be used from ConEmuHk::DllMain(DLL_PROCESS_DETACH). See Issue 465 DEBUGSTR(L"ConEmuHk: Deinitializing registry virtualization!/n");#endif if (gpRegKeyHooks) { free(gpRegKeyHooks); gpRegKeyHooks = NULL; } CloseRootKeys(); if (gpRegKeyStore) { gpRegKeyStore->Free(); free(gpRegKeyStore); gpRegKeyStore = NULL; }#ifdef _DEBUG //WARNING!!! OutputDebugString must NOT be used from ConEmuHk::DllMain(DLL_PROCESS_DETACH). See Issue 465 DEBUGSTR(L"ConEmuHk: Registry virtualization deinitialized!/n");#endif#endif}
开发者ID:EricSB,项目名称:ConEmu,代码行数:25,
示例5: TaperDegreesToDistance/* * FUNCTION: TaperDegreesToDistance * * PARAMETERS: p -- Pointer to Menu * * USES GLOBALS: * * DESCRIPTION: Convert the full angle degrees to inch/foot of diameter. * * * RETURNS: * */int8 TaperDegreesToDistance(TMENU_DATA * p) { // Convert the included angle in degrees to inch/inch of diameter. p->Data.FloatValue = tan((p->Data.FloatValue)/2 * RADIANS_PER_DEGREE)*2; // Then check if metric measurements are wanted. if (p->Dependancy != (uint8)0) { // DEBUGSTR("To Metric Var is dependant on %02X/n",p->Dependancy ); // First get menu from FLASH into data structure memcpypgm2ram( (void *)&d, (MEM_MODEL rom void *)&MenuData[p->Dependancy], sizeof(TMENU_DATA) ); // Then test the flag. if (GetFlagVar(&d)) { // If the metric flag is set convert the value to metric. DEBUGSTR("Convert to Metric/n"); p->Data.FloatValue *= 25.4; return('m'); } else return('"'); } else return(' ');}
开发者ID:speters,项目名称:ELS---Electronic-Leadscrew,代码行数:38,
示例6: Print_Val/* Using printf might cause text section overflow */static void Print_Val(const char *str, uint32_t val){ char buf[9]; int ret; buf[8] = 0; DEBUGSTR(str); ret = Hex2Str(buf, val); DEBUGSTR(&buf[8 - ret]); DEBUGSTR("/r/n");}
开发者ID:Magicoe,项目名称:LPC820,代码行数:11,
示例7: InitHooksRegbool InitHooksReg(){ bool lbRc = false;#ifdef HOOKS_USE_VIRT_REGISTRY CESERVER_CONSOLE_MAPPING_HDR* pInfo = GetConMap(); if (!pInfo || !(pInfo->isHookRegistry&1) || !*pInfo->sHiveFileName) return false; DEBUGSTR(L"ConEmuHk: Preparing for registry virtualization/n"); HookItem HooksRegistry[] = { /* ************************ */ {(void*)OnRegCloseKey, "RegCloseKey", advapi32}, {(void*)OnRegCreateKeyA, "RegCreateKeyA", advapi32}, {(void*)OnRegCreateKeyW, "RegCreateKeyW", advapi32}, {(void*)OnRegCreateKeyExA, "RegCreateKeyExA", advapi32}, {(void*)OnRegCreateKeyExW, "RegCreateKeyExW", advapi32}, {(void*)OnRegOpenKeyA, "RegOpenKeyA", advapi32}, {(void*)OnRegOpenKeyW, "RegOpenKeyW", advapi32}, {(void*)OnRegOpenKeyExA, "RegOpenKeyExA", advapi32}, {(void*)OnRegOpenKeyExW, "RegOpenKeyExW", advapi32}, {(void*)OnRegDeleteKeyA, "RegDeleteKeyA", advapi32}, {(void*)OnRegDeleteKeyW, "RegDeleteKeyW", advapi32}, /* ************************ */ {(void*)OnRegConnectRegistryA, "RegConnectRegistryA", advapi32}, {(void*)OnRegConnectRegistryW, "RegConnectRegistryW", advapi32}, /* ************************ */ {0} }; lbRc = (InitHooks(HooksRegistry) >= 0); if (lbRc) { PrepareHookedKeyList(); DEBUGSTR(L"ConEmuHk: Registry virtualization prepared/n"); // Если advapi32.dll уже загружена - можно сразу дернуть экспорты if (ghAdvapi32) { RegOpenKeyEx_f = (RegOpenKeyEx_t)GetProcAddress(ghAdvapi32, "RegOpenKeyExW"); RegCreateKeyEx_f = (RegCreateKeyEx_t)GetProcAddress(ghAdvapi32, "RegCreateKeyExW"); RegCloseKey_f = (RegCloseKey_t)GetProcAddress(ghAdvapi32, "RegCloseKey"); } } else { DEBUGSTR(L"ConEmuHk: Registry virtualization failed!/n"); } #else lbRc = true;#endif return lbRc;}
开发者ID:EricSB,项目名称:ConEmu,代码行数:54,
示例8: main /** * @brief Main entry point * @return Nothing */int main(void){ SPIFIobj *obj = &spifi_obj; uint32_t spifi_clk_mhz; SPIFIopers opers; int ret; spifi_rom_init(spifi); /* Initialize the board & LEDs for error indication */ Board_Init(); /* Since this code runs from SPIFI no special initialization required here */ prepare_write_data(data_buffer, sizeof(data_buffer)); spifi_clk_mhz = Chip_Clock_GetRate(CLK_MX_SPIFI) / 1000000; /* Typical time tCS is 20 ns min, we give 200 ns to be on safer side */ if (spifi_init(obj, spifi_clk_mhz / 5, S_RCVCLK | S_FULLCLK, spifi_clk_mhz)) { DEBUGSTR("Error initializing SPIFI interface!/r/n"); Board_LED_Set(1, 1); goto end_prog; } /* Prepare the operations structure */ memset(&opers, 0, sizeof(SPIFIopers)); opers.dest = (char *) SPIFI_WRITE_SECTOR_OFFSET; opers.length = sizeof(data_buffer); /* opers.options = S_VERIFY_PROG; */ /* NOTE: All interrupts must be disabled before calling program as * any triggered interrupts might attempt to run a code from SPIFI area */ ret = spifi_program(obj, (char *) data_buffer, &opers); if (ret) { DEBUGOUT("Error 0x%x: Programming of data buffer to SPIFI Failed!/r/n", ret); Board_LED_Set(1, 1); goto end_prog; } DEBUGSTR("SPIFI Programming successful!/r/n"); if (verify_spifi_data((uint8_t *) SPIFI_WRITE_SECTOR_ADDRESS, sizeof(data_buffer))) { DEBUGSTR("Error verifying the SPIFI data/r/n"); Board_LED_Set(1, 1); goto end_prog; } Board_LED_Set(0, 1); DEBUGSTR("SPIFI Data verified!/r/n");end_prog: while(1) {__WFI();}}
开发者ID:edarring,项目名称:lpcopen,代码行数:55,
示例9: showTime/* Show RTC time in UT format */static void showTime(uint32_t rtcCount){ struct tm currTime;#ifdef USE_CASCTIME char tempBuff[256];#endif ConvertRtcTime(rtcCount, &currTime);#ifdef USE_CASCTIME DEBUGOUT(asctime_r(&currTime, tempBuff));#else DEBUGOUT("Raw RTC tick value = %u/r/n", rtcCount); /* Todays date */ DEBUGOUT("DATE: %02d:%02d:%04d/r/n", currTime.tm_mon + 1, currTime.tm_mday, (currTime.tm_year + TM_YEAR_BASE)); /* Current time */ DEBUGOUT("TIME: %02d:%02d:%02d/r/n", currTime.tm_hour, currTime.tm_min, currTime.tm_sec); /* Day of week and year */ DEBUGOUT("tm_wday = %01d, tm_yday = %03d/r/n", currTime.tm_wday, currTime.tm_yday);#endif DEBUGSTR("/r/n");}
开发者ID:sensorplatforms,项目名称:osp,代码行数:31,
示例10: main/** * @brief main routine for ADC example * @return Function should not exit */int main(void){ uint16_t dataADC; int j; SystemCoreClockUpdate(); Board_Init(); Init_ADC_PinMux(); DEBUGSTR("ADC Demo/r/n"); /* ADC Init */ Chip_ADC_Init(LPC_ADC, &ADCSetup); Chip_ADC_EnableChannel(LPC_ADC, ADC_CH0, ENABLE); while (1) { /* Start A/D conversion */ Chip_ADC_SetStartMode(LPC_ADC, ADC_START_NOW, ADC_TRIGGERMODE_RISING); /* Waiting for A/D conversion complete */ while (Chip_ADC_ReadStatus(LPC_ADC, ADC_CH0, ADC_DR_DONE_STAT) != SET) {} /* Read ADC value */ Chip_ADC_ReadValue(LPC_ADC, ADC_CH0, &dataADC); /* Print ADC value */ DEBUGOUT("ADC value is 0x%x/r/n", dataADC); /* Delay */ j = 500000; while (j--) {} } /* Should not run to here */ return 0;}
开发者ID:Andriiy,项目名称:Circuit-Boards,代码行数:39,
示例11: main/** * @brief MRT example main function * @return Status (This function will not return) */int main(void){ int mrtch; /* Generic Initialization */ SystemCoreClockUpdate(); Board_Init(); DEBUGSTR("LPC15xx MRT Example /r/n"); /* MRT Initialization and disable all timers */ Chip_MRT_Init(); for (mrtch = 0; mrtch < MRT_CHANNELS_NUM; mrtch++) { Chip_MRT_SetDisabled(Chip_MRT_GetRegPtr(mrtch)); } /* Enable the interrupt for the MRT */ NVIC_EnableIRQ(MRT_IRQn); /* Enable timers 0 and 1 in repeat mode with different rates */ setupMRT(0, MRT_MODE_REPEAT, 2);/* 2Hz rate */ setupMRT(1, MRT_MODE_REPEAT, 5);/* 5Hz rate */ /* Enable timer 2 in single one mode with the interrupt restarting the timer */ setupMRT(2, MRT_MODE_ONESHOT, 7); /* Will fire in 1/7 seconds */ /* All processing and MRT reset in the interrupt handler */ while (1) { __WFI(); } return 0;}
开发者ID:frankzzcn,项目名称:M2_SE_RTOS_Project,代码行数:38,
示例12: SafeCloseHandlevoid CConEmuPipe::Close(){ SafeCloseHandle(mh_Pipe); SafeFree(pIn); SafeFree(pOut); DEBUGSTR(L"Pipe::Close()/n");}
开发者ID:rheostat2718,项目名称:conemu-maximus5,代码行数:7,
示例13: Inject// Find the name of the DLL and inject it.BOOL Inject( LPPROCESS_INFORMATION ppi ){ DWORD len; WCHAR dll[MAX_PATH]; int type;#if (MYDEBUG > 0) if (GetModuleFileNameEx( ppi->hProcess, NULL, dll, lenof(dll) )) DEBUGSTR( L"%s", dll );#endif type = ProcessType( ppi ); if (type == 0) return FALSE; len = GetModuleFileName( NULL, dll, lenof(dll) ); while (dll[len-1] != '//') --len;#ifdef _WIN64 wsprintf( dll + len, L"ANSI%d.dll", type ); if (type == 32) InjectDLL32( ppi, dll ); else InjectDLL64( ppi, dll );#else wcscpy( dll + len, L"ANSI32.dll" ); InjectDLL32( ppi, dll );#endif return TRUE;}
开发者ID:kmkkmk,项目名称:app,代码行数:30,
示例14: MyCreateProcessWBOOL WINAPI MyCreateProcessW( LPCWSTR lpApplicationName, LPWSTR lpCommandLine, LPSECURITY_ATTRIBUTES lpThreadAttributes, LPSECURITY_ATTRIBUTES lpProcessAttributes, BOOL bInheritHandles, DWORD dwCreationFlags, LPVOID lpEnvironment, LPCWSTR lpCurrentDirectory, LPSTARTUPINFOW lpStartupInfo, LPPROCESS_INFORMATION lpProcessInformation ){ PROCESS_INFORMATION pi; if (!CreateProcessW( lpApplicationName, lpCommandLine, lpThreadAttributes, lpProcessAttributes, bInheritHandles, dwCreationFlags | CREATE_SUSPENDED, lpEnvironment, lpCurrentDirectory, lpStartupInfo, &pi )) return FALSE; DEBUGSTR( L"CreateProcessW: /"%s/", /"%s/"", (lpApplicationName == NULL) ? L"" : lpApplicationName, (lpCommandLine == NULL) ? L"" : lpCommandLine ); Inject( &pi, lpProcessInformation, dwCreationFlags ); return TRUE;}
开发者ID:aliking,项目名称:ansicon,代码行数:32,
示例15: initCGIs/** Initialize the CGI environment * This function registers the pairs of file's name and CGI function for the HTTPD server * @returns nothing*/void initCGIs( void) { http_set_cgi_handlers(cgi_handlers, (sizeof (cgi_handlers) / sizeof (tCGI) ) ); DEBUGSTR("httpCGIHandlers registered...............[OK]/r/n"); return;}
开发者ID:patriciobos,项目名称:TpFinal-workspace,代码行数:11,
示例16: HookAPIAllModBOOL HookAPIAllMod( PHookFn Hooks, BOOL restore ){ HANDLE hModuleSnap; MODULEENTRY32 me; BOOL fOk; // Take a snapshot of all modules in the current process. hModuleSnap = CreateToolhelp32Snapshot( TH32CS_SNAPMODULE, GetCurrentProcessId() ); if (hModuleSnap == INVALID_HANDLE_VALUE) { DEBUGSTR( L"error: %S(%d)", __FILE__, __LINE__ ); return FALSE; } // Fill the size of the structure before using it. me.dwSize = sizeof(MODULEENTRY32); // Walk the module list of the modules. for (fOk = Module32First( hModuleSnap, &me ); fOk; fOk = Module32Next( hModuleSnap, &me )) { // We don't hook functions in our own module. if (me.hModule != hDllInstance && me.hModule != hKernel) { //attempting to ignore NVIDIA 3D wrapper modules that seem to be in conflict on some systems if (_wcsnicmp(me.szModule, L"nvd3d9wrap", 10) == 0) { DEBUGSTR(L"Ignoring %s", me.szModule); continue; } DEBUGSTR( (restore) ? L"Unhooking from %s" : L"Hooking in %s", me.szModule ); // Hook this function in this module. if (!HookAPIOneMod( me.hModule, Hooks, restore )) { CloseHandle( hModuleSnap ); return FALSE; } } } CloseHandle( hModuleSnap ); return TRUE;}
开发者ID:aliking,项目名称:ansicon,代码行数:46,
示例17: showDatavoid showData(char *reg, uint16_t *dat){ int i, j; DEBUGSTR("Showing data from :"); DEBUGSTR(reg); DEBUGSTR("/r/n"); /* Hard coded for a 2x8 16-bit displays */ for (i = 0; i < 2; i++) { for (j = 0; j < 8; j++) { Print_Val16(*dat); dat++; } DEBUGSTR("/r/n"); }}
开发者ID:Magicoe,项目名称:LPC820,代码行数:17,
示例18: print_image_info/* Prints the information of the M0/M4 image to screen */static void print_image_info(const char *pre, const struct image_sig *img){ DEBUGSTR("***************************************/r/n"); DEBUGOUT("%s: Header found at %p/r/n", pre, img); DEBUGOUT("%s: Included Examples: %s%s%s%s%s/r/n", pre, img->capability & EX_BLINKY ? "BLINKY" : "", img->capability & EX_USBHOST ? ", USB_Host" : "", img->capability & EX_USBDEV ? ", USB_Device" : "", img->capability & EX_LWIP ? ", lwIP" : "", img->capability & EX_EMWIN ? ", emWin" : ""); DEBUGOUT("%s: OS Used: %s/r/n", pre, img->os == 1 ? "NONE (STANDALONE)" : (img->os == 2 ? "FreeRTOS" : "UCOS-III")); DEBUGOUT("%s: Built on %s %s/r/n", pre, img->build_date, img->build_time); DEBUGSTR("***************************************/r/n");}
开发者ID:edodm85,项目名称:LPCOpen-keil-lpc43xx,代码行数:19,
示例19: MyLoadLibraryWHMODULE WINAPI MyLoadLibraryW( LPCWSTR lpFileName ){ HMODULE hMod = LoadLibraryW( lpFileName ); if (hMod && hMod != hKernel) { DEBUGSTR( L"Hooking in %s (LoadLibraryW)", lpFileName ); HookAPIOneMod( hMod, Hooks, FALSE ); } return hMod;}
开发者ID:aliking,项目名称:ansicon,代码行数:10,
示例20: MyGetProcAddressFARPROC WINAPI MyGetProcAddress( HMODULE hModule, LPCSTR lpProcName ){ PHookFn hook; FARPROC proc; proc = GetProcAddress( hModule, lpProcName ); if (proc) { if (hModule == hKernel) { // Ignore LoadLibrary so other hooks continue to work (our version // might end up at a different address). if (proc == Hooks[0].oldfunc || proc == Hooks[1].oldfunc) return proc; for (hook = Hooks+2; hook->name; ++hook) { if (proc == hook->oldfunc) { DEBUGSTR( L"GetProcAddress: %S", lpProcName ); return hook->newfunc; } } } else if (Hooks[0].apifunc) // assume if one is defined, all are { if (proc == Hooks[0].apifunc || proc == Hooks[1].apifunc) return proc; for (hook = Hooks+2; hook->name; ++hook) { if (proc == hook->apifunc) { DEBUGSTR( L"GetProcAddress: %S", lpProcName ); return hook->newfunc; } } } } return proc;}
开发者ID:aliking,项目名称:ansicon,代码行数:43,
示例21: SetOnboardStepperint8SetOnboardStepper(TMENU_DATA * p) { DEBUGSTR("Enabling SPI MicroStepper/n"); SSPSTAT = 0x40; // Transmit on clock high. SSPCON1 = 0x20; // FOsc/4, Enable SPI, Clock Idle Low. bMOTOR_LATCH = 0; SSPBUF = 0; fStepHappened = 0; // Prevent shutdown from doing anything to motor. MicroStep(0,0); // Set motor off.}
开发者ID:speters,项目名称:ELS---Electronic-Leadscrew,代码行数:10,
示例22: MyLoadLibraryExWHMODULE WINAPI MyLoadLibraryExW( LPCWSTR lpFileName, HANDLE hFile, DWORD dwFlags ){ HMODULE hMod = LoadLibraryExW( lpFileName, hFile, dwFlags ); if (hMod && hMod != hKernel && !(dwFlags & LOAD_LIBRARY_AS_DATAFILE)) { DEBUGSTR( L"Hooking in %s (LoadLibraryExW)", lpFileName ); HookAPIOneMod( hMod, Hooks, FALSE ); } return hMod;}
开发者ID:aliking,项目名称:ansicon,代码行数:11,
示例23: booting_m0_failure/* Function to blink the LED to show the error code * caused by M0 image boot failure */static void booting_m0_failure(uint32_t msec){ int32_t cnt = 60000 / (msec * 2); DEBUGSTR("ERROR: Boot failure!!/r/n"); while (cnt--) { Board_LED_Set(ERROR_LED, 1); MSleep(msec); Board_LED_Set(ERROR_LED, 0); MSleep(msec); }}
开发者ID:edodm85,项目名称:LPCOpen-keil-lpc43xx,代码行数:14,
示例24: _wsprintfvoid CGestures::DumpGesture(LPCWSTR tp, const GESTUREINFO& gi){ wchar_t szDump[256]; _wsprintf(szDump, SKIPLEN(countof(szDump)) L"Gesture(x%08X {%i,%i} %s", (DWORD)gi.hwndTarget, gi.ptsLocation.x, gi.ptsLocation.y, tp); // tp - имя жеста switch (gi.dwID) { case GID_PRESSANDTAP: { DWORD h = LODWORD(gi.ullArguments); _wsprintf(szDump+_tcslen(szDump), SKIPLEN(32) L" Dist={%i,%i}", (int)(short)LOWORD(h), (int)(short)HIWORD(h)); break; } case GID_ROTATE: { DWORD h = LODWORD(gi.ullArguments); _wsprintf(szDump+_tcslen(szDump), SKIPLEN(32) L" %i", (int)LOWORD(h)); break; } } if (gi.dwFlags&GF_BEGIN) wcscat_c(szDump, L" GF_BEGIN"); if (gi.dwFlags&GF_END) wcscat_c(szDump, L" GF_END"); if (gi.dwFlags&GF_INERTIA) { wcscat_c(szDump, L" GF_INERTIA"); DWORD h = HIDWORD(gi.ullArguments); _wsprintf(szDump+_tcslen(szDump), SKIPLEN(32) L" {%i,%i}", (int)(short)LOWORD(h), (int)(short)HIWORD(h)); } if (gpSetCls->isAdvLogging >= 2) { gpConEmu->LogString(szDump); } else { #ifdef USE_DUMPGEST wcscat_c(szDump, L")/n"); DEBUGSTR(szDump); #endif }}
开发者ID:rheostat2718,项目名称:conemu-maximus5,代码行数:53,
示例25: Print_Val16/* Prints an 8-bit value */static void Print_Val16(uint16_t val){ char buf[] = "0xXXXX "; buf[5] = "0123456789ABCDEF"[val & 0x0F]; val >>= 4; buf[4] = "0123456789ABCDEF"[val & 0x0F]; val >>= 4; buf[3] = "0123456789ABCDEF"[val & 0x0F]; val >>= 4; buf[2] = "0123456789ABCDEF"[val & 0x0F]; DEBUGSTR(buf);}
开发者ID:Magicoe,项目名称:LPC820,代码行数:13,
示例26: CGIinit//Initialise cgi environmentint CGIinit( void) {// cgi_handler.pcCGIName = "/actuadores.cgi";//// cgi_handler.pfnCGIHandler = actuatorsHandler; http_set_cgi_handlers(cgi_handlers, 2); DEBUGSTR("httpCGIHandler initialized............[OK]/r/n"); return 0;}
开发者ID:patriciobos,项目名称:TpFinal,代码行数:13,
示例27: DllMainBOOL WINAPI DllMain( HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved ){ BOOL bResult = TRUE; HMODULE api; PHookFn hook; if (dwReason == DLL_PROCESS_ATTACH) { hDllInstance = hInstance; // save Dll instance handle DEBUGSTR( L"hDllInstance = %p", hDllInstance ); // Get the entry points to the original functions. hKernel = GetModuleHandleA( APIKernel ); for (hook = Hooks; hook->name; ++hook) { hook->oldfunc = GetProcAddress( hKernel, hook->name ); api = GetModuleHandleA( hook->lib ); if (api) hook->apifunc = GetProcAddress( api, hook->name ); } bResult = HookAPIAllMod( Hooks, FALSE ); OriginalAttr(); DisableThreadLibraryCalls( hInstance ); } else if (dwReason == DLL_PROCESS_DETACH) { if (lpReserved == NULL) { DEBUGSTR( L"Unloading" ); HookAPIAllMod( Hooks, TRUE ); } else { DEBUGSTR( L"Terminating" ); } } return( bResult );}
开发者ID:aliking,项目名称:ansicon,代码行数:40,
示例28: MakeString/* Get a string to save from the UART */static uint32_t MakeString(uint8_t *str){ int index, byte; char strOut[2]; /* Get a string up to 32 bytes to write into Flash */ DEBUGSTR("/r/nEnter a string to write into Flash/r/n"); DEBUGSTR("Up to 32 bytes in length, press ESC to accept/r/n"); /* Setup header */ strncpy((char *) str, CHKTAG, CHKTAG_SIZE); /* Read until escape, but cap at 32 characters */ index = 0; strOut[1] = '/0';#if defined(DEBUG_ENABLE) byte = DEBUGIN(); while ((index < 32) && (byte != ESC_CHAR)) { if (byte != EOF) { strOut[0] = str[4 + index] = (uint8_t) byte; DEBUGSTR(strOut); index++; } byte = DEBUGIN(); }#else /* Suppress warnings */ (void) byte; (void) strOut; /* Debug input not enabled, so use a pre-setup string */ strncpy((char *) &str[4], "12345678", 8); index = 8;#endif str[3] = (uint8_t) index; return (uint32_t) index;}
开发者ID:TiddoLangerak,项目名称:mmc_test,代码行数:41,
示例29: prvSetupHardware/* initialization routine for Multicore examples */static void prvSetupHardware(void){ SystemCoreClockUpdate(); Board_Init(); /* Time to Start M0APP */ if (M0Image_Boot(CPUID_M0APP, (uint32_t) BASE_ADDRESS_M0APP) < 0) { DEBUGSTR("Unable to BOOT M0APP Core!"); }#ifdef BASE_ADDRESS_M0SUB if (M0Image_Boot(CPUID_M0SUB, (uint32_t) BASE_ADDRESS_M0SUB) < 0) { DEBUGSTR("Unable to BOOT M0SUB Core!"); }#endif /* Initialize the IPC Queue */ IPCEX_Init(); /* Start the tick timer */ SysTick_Config(SystemCoreClock / 1000);}
开发者ID:fcladera,项目名称:ciaa_lpcopen_bare,代码行数:23,
示例30: TaperDistanceToDegrees/* * FUNCTION: TaperDistanceToDegrees * * PARAMETERS: p -- Pointer to Menu * * USES GLOBALS: * * DESCRIPTION: Convert taper in inch/ft to degrees. * * RETURNS: Nothing. * */int8 TaperDistanceToDegrees(TMENU_DATA * p) { // Conversions are often dependant on whether another flag is set. if (p->Dependancy != (uint8)0) { // DEBUGSTR("To Imperial Var is dependant on %02X/n",p->Dependancy ); // First get menu from FLASH into data structure memcpypgm2ram( (void *)&d, (MEM_MODEL rom void *)&MenuData[p->Dependancy], sizeof(TMENU_DATA) ); // Then test the flag. if (GetFlagVar(&d)) { // If the metric flag is set convert the value to imperial. DEBUGSTR("Convert to Imperial/n"); p->Data.FloatValue /= 25.4; } } // Now we know we have imperial units in inch per inch and then degrees // finally change that to (included) angle degrees. p->Data.FloatValue = (atan(p->Data.FloatValue / 2) / RADIANS_PER_DEGREE) * 2; return(' ');}
开发者ID:speters,项目名称:ELS---Electronic-Leadscrew,代码行数:34,
注:本文中的DEBUGSTR函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ DEBUGVAR函数代码示例 C++ DEBUGPRINT_F函数代码示例 |