Example #1
0
uint8_t CC110x::detectBurst(void) {														// wake up CC1101 from power down state
	// 10 7/10 5 in front of the received string; 33 after received string
	// 10 - 00001010 - sync word found
	// 7  - 00000111 - GDO0 = 1, GDO2 = 1
	// 5  - 00000101 - GDO0 = 1, GDO2 = 1
	// 33 - 00100001 - GDO0 = 1, preamble quality reached
	// 96 - 01100000 - burst sent
	// 48 - 00110000 - in receive mode
	//
	// Status byte table:
	//	0 current GDO0 value
	//	1 reserved
	//	2 GDO2
	//	3 sync word found
	//	4 channel is clear
	//	5 preamble quality reached
	//	6 carrier sense
	//	7 CRC ok
	//
	// possible solution for finding a burst is to check for bit 6, carrier sense

	// set RXTX module in receive mode
	cc1101_Select();																	// select CC1101
	wait_Miso();																		// wait until MISO goes low
	cc1101_Deselect();																	// deselect CC1101
	cmdStrobe(CC1101_SRX);																// set RX mode again
	_delay_ms(3);																		// wait a short time to set RX mode

	// todo: check carrier sense for 5ms to avoid wakeup due to normal transmition
	//Serial << F("rx\n");
//	return bitRead(hm.cc.monitorStatus(),6);											// return the detected signal
	return bitRead(monitorStatus(),6);													// return the detected signal
}
Example #2
0
void QQuickViewStatusMonitor::monitor(QQuickView *view){
    this->view = view;
    QObject::connect(view,SIGNAL(statusChanged(QQuickView::Status)),
                     this,SLOT(monitorStatus(QQuickView::Status)));
}