/* (C) 2003 XDA Developers itsme@xs4all.nl * * $Header$ */ #include #include // from the platform builder extern "C" { BOOL WINAPI NLedGetDeviceInfo( UINT nInfoId, void *pOutput ); BOOL WINAPI NLedSetDevice( UINT nDeviceId, void *pInput ); }; void LedOn(int id) { NLED_SETTINGS_INFO settings; settings.LedNum= id; settings.OffOnBlink= 1; NLedSetDevice(NLED_SETTINGS_INFO_ID, &settings); } void LedOff(int id) { NLED_SETTINGS_INFO settings; settings.LedNum= id; settings.OffOnBlink= 0; NLedSetDevice(NLED_SETTINGS_INFO_ID, &settings); } int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { for (int i=1 ; i<4096 ; i*=2) { for (int j=0 ; j<10 ; j++) { LedOn(1); Sleep(i); LedOff(1); Sleep(i); } } return 0; }