void main(void) { u16 id; InitUart(); InitKeyBoard(); //*********************************** // Prints("adfasdfadsfasf"); // LightUpLed(LED1); // TurnOffLed(LED2); Prints("\nGetting chip ID..."); D12ReadID(&id); PrintShortIntHex(id); Prints(",over\n"); USBConnect(); //************************************ while(1); }
bool CVLCtrl::ConnectToUSB(bool bDisplayMsg) { char* productName = "LC-11"; byte err_code = USBConnect(productName); if(err_code == 0) { m_bUsbConnected = true; } else { if(bDisplayMsg) { #ifdef _ENGLISH AfxMessageBox(_T("Cannot connect to Light Controller!")); #else AfxMessageBox(_T("连接光源控制器失败!")); #endif } m_bUsbConnected = false; } return m_bUsbConnected; }