Dialog::Dialog(QWidget *parent) : QDialog(parent), ui(new Ui::Dialog) { ui->setupUi(this); connect(ui->pushButton_Open, SIGNAL(clicked()), this, SLOT(open())); connect(ui->pushButton_Close, SIGNAL(clicked()), this, SLOT(close())); connect(ui->pushButton_WriteWiegand, SIGNAL(clicked()), this, SLOT(writeWiegand())); connect(ui->pushButton_WiegandSetConfig, SIGNAL(clicked()), this, SLOT(wiegandSetConfig())); connect(ui->pushButton_WiegandGetConfig, SIGNAL(clicked()), this, SLOT(wiegandGetConfig())); connect(ui->pushButton_WiegandAutoDetect, SIGNAL(clicked()), this, SLOT(wiegandAutoDetect())); connect(ui->pushButton_WriteGPO1, SIGNAL(clicked()), this, SLOT(writeGPO1())); connect(ui->pushButton_WriteGPO2, SIGNAL(clicked()), this, SLOT(writeGPO2())); connect(ui->pushButton_WriteGPO12, SIGNAL(clicked()), this, SLOT(writeGPO12())); connect(ui->pushButton_WriteRelay, SIGNAL(clicked()), this, SLOT(writeRelay())); connect(ui->pushButton_USBPowerOff, SIGNAL(clicked()), this, SLOT(usbPowerOff())); connect(ui->pushButton_USBPowerOn, SIGNAL(clicked()), this, SLOT(usbPowerOn())); m_eventThread = NULL; m_isOpen = false; if (ema_createEMA(&m_emaHandle) == EMA_SUCCESS) { m_eventThread = new EventThread(NULL, m_emaHandle); if (m_eventThread) { connect(m_eventThread, SIGNAL(dataReceived(EMA_EVENT *)), this, SLOT(showReceivedData(EMA_EVENT *))); } m_eventThread->start(); }
void usbInit(void) { pInformation->Current_Configuration = 0; usbPowerOn(); _SetISTR(0); wInterrupt_Mask = ISR_MSK; _SetCNTR(wInterrupt_Mask); usbEnbISR(); bDeviceState = UNCONNECTED; }
void usbInit(void) { dfuInit(); pInformation->Current_Configuration = 0; usbPowerOn(); _SetISTR(0); wInterrupt_Mask = ISR_MSK; _SetCNTR(wInterrupt_Mask); usbEnbISR(); /* configure the cortex M3 private peripheral NVIC */ bDeviceState = UNCONNECTED; }