Ejemplo n.º 1
0
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;	
}
Ejemplo n.º 2
0
// adds function autoBL to timer
// initialises parameters   // TODO: vgl. load_setting (settingsmenu.c)
void initBacklight(void)
{
	direction = 1;
	bl_speed = 2;
	bl_timeout = 5000;
	bl_max = 63;
	bl_cb = addTimerCB(autoBL, bl_timeout);
	startCB(bl_cb);
}
Ejemplo n.º 3
0
void switch_WOR_RX(void) {
	if (RFstatus & WORrxon)
		setCBIntervall(WORrx_cb,WORrx_time);
	else {
		WORrx_cb = addTimerCB(WORrx_timeout, WORrx_time);
		startCB(WORrx_cb);
		RFstatus |= WORrxon;
		RFstatus &= ~WORenabled;
		draw_ant(100,0,DRAW_PUT);
		cc1100_write1(0x16,0x07);
	}
}