diff --git a/examples/Basic_TwoWay/Basic_TwoWay.pde b/examples/Basic_TwoWay/Basic_TwoWay.pde index 40a79c0..8a2b3eb 100644 --- a/examples/Basic_TwoWay/Basic_TwoWay.pde +++ b/examples/Basic_TwoWay/Basic_TwoWay.pde @@ -20,10 +20,10 @@ long tx_interval = 1000; void setup() { Serial.begin(9600); - Serial.println("Starting to reset and startup..."); - mrf.mrf_pan_write(0xcafe); - mrf.mrf_address16_write(0x6001); + mrf.set_pan(0xcafe); + // This is _our_ address + mrf.address16_write(0x6001); attachInterrupt(0, interrupt_routine, CHANGE); last_time = millis(); } @@ -34,7 +34,7 @@ volatile uint8_t last_interrupt; void interrupt_routine() { // read and clear from the radio - last_interrupt = mrf.mrf_read_short(MRF_INTSTAT); + last_interrupt = mrf.read_short(MRF_INTSTAT); if (last_interrupt & MRF_I_RXIF) { gotrx = 1; } @@ -44,19 +44,19 @@ void interrupt_routine() { } void loop() { - //mrf.mrf_write_short(MRF_RXMCR, 0x01); // promiscuous! + //mrf.set_promiscuous(true); int tmp; interrupts(); unsigned long current_time = millis(); if (current_time - last_time > tx_interval) { last_time = current_time; Serial.println("txxxing..."); - mrf.mrf_send16(0x4202, 4, "abcd"); + mrf.send16(0x4202, 4, "abcd"); } if (txok) { txok = 0; Serial.print("tx went ok:"); - tmp = mrf.mrf_read_short(MRF_TXSTAT); + tmp = mrf.read_short(MRF_TXSTAT); Serial.print(tmp); if (!(tmp & ~(1<