20130328-185004

This commit is contained in:
2013-03-28 17:48:55 +00:00
parent a95aa66df8
commit bc21a2147a
16 changed files with 770 additions and 723 deletions
Binary file not shown.
+1 -1
View File
@@ -34,7 +34,7 @@ void init_int() {
// Function: Bit2=In
DDRD &= ~(1<<PD2);
// State: Bit2=H
PORTD |= (1<<PD
PORTD |= (1<<PD);
// External Interrupt(s) initialization
// INT0: On
// INT0 Mode: Falling Edge
+4
View File
@@ -93,6 +93,10 @@ void rf12_ready(void)
while (!(RF_PIN&(1<<SDO))); // wait until FIFO ready
}
int rf12_hasdata() {
}
void rf12_txdata(unsigned char *data, unsigned char number)
{ unsigned char i;
rf12_trans(0x8238); // TX on
+1
View File
@@ -18,6 +18,7 @@ extern void rf12_setbandwidth(unsigned char bandwidth, unsigned char gain, unsig
extern void rf12_txdata(unsigned char *data, unsigned char number); // transmit number of bytes from array
extern void rf12_rxdata(unsigned char *data, unsigned char number); // receive number of bytes into array
extern void rf12_ready(void); // wait until FIFO ready (to transmit/read data)
extern void rf12_txpacket(uint8_t addr, uint8_t data); // Send two bytes over the air
#define RF12FREQ(freq) ((freq-430.0)/0.0025) // macro for calculating frequency value out of frequency in MHz