void autoBL(unsigned int cb) { switch(direction) { case 0: if(bl_val < bl_max) { bl_val++; } else { direction = 1; setCBIntervall(bl_cb, bl_timeout); } break; case 1: direction = 2; setCBIntervall(bl_cb, bl_speed); break; case 2: if(bl_val > 0x00) { bl_val--; } else { direction = 0; stopCB(bl_cb); } break; } }
void RF_sendWOR(unsigned char addr) { unsigned char b[2]; unsigned int WOR_cb; b[0]=0x01; b[1]=addr; VICIntEnClr = INT_EINT0; switch_to_idle(); RFstatus |= WORsend; cc1100_write1(0x18,conf[0x18] & 0xCF); cc1100_strobe(SCAL); waitTX(); WOR_cb = addTimerCB(WORsend_timeout, 101); startCB(WOR_cb); while (RFstatus & WORsend) { cc1100_write(TX_fifo | BURST,b,2); cc1100_strobe(STX); waitTX(); } stopCB(WOR_cb); removeTimerCB(WOR_cb); cc1100_write1(0x18,conf[0x18]); waitTX(); VICIntEnable = INT_EINT0; }
// set new brightness and set up fading and timout void setBacklight(unsigned char level) { if(level == BL_AUTO) { stopCB(bl_cb); direction = 0; setCBIntervall(bl_cb, bl_speed); startCB(bl_cb); } else if(level < BL_AUTO) { stopCB(bl_cb); bl_val = level; direction = 1; setCBIntervall(bl_cb, bl_timeout); startCB(bl_cb); } }
void WORrx_timeout(void) { stopCB(WORrx_cb); removeTimerCB(WORrx_cb); RFstatus &= ~WORrxon; draw_ant(100,0,DRAW_ERASE); cc1100_write1(0x16,conf[0x16]); RFstatus |= WORenabled; cc1100_strobe(SIDLE); cc1100_strobe(SWOR); }
//! //! PlayerCB //! void MEIntSliderPort::minusNewValue() { m_value = m_value - m_step; m_value = qMin(m_value, m_max); m_value = qMax(m_value, m_min); if (timer) { if (m_value == m_max || m_value == m_min) stopCB(); } sendParamMessage(); // inform parent widget that m_value has been changed node->setModified(true); }