Commit Graph
105 Commits
Author SHA1 Message Date
TMRh20 d28323aadc Fix: Missing byte with due RX
- SPI transfer fix to read every available byte in the payload with
payloads less than 32 bytes with dynamic payload size disabled.
2014-04-06 08:49:35 -06:00
TMRh20 e1aaa57172 Full Due support, maskIRQ function
- Tested and now fully functional on Arduino Due
- Added support for the extended SPI functions: brings Due performance
up to par with Due managing the CSN   pin and settings
- Corrected issues with printDetails() on Due
- Changed added variables to staticly defined types: ie: uint16_t
instead of unsigned int
- I think this will work on all ARM based boards that use the Arduino
libs
- Added maskIRQ function - to be used in RF24Network sleep mode
- Changed csn(int mode) to csn(bool mode)
- Updated GettingStarted_CallResponse.ino example: Capture start time
AFTER printing to serial so measurement is more accurate
2014-04-05 05:34:52 -06:00
TMRh20 3455e489f4 Add powerUp to begin(), increase powerUp delay
- Found I could create a hang condition on startup with some code.
a: Now power up the radio on begin() to simplify things
b: Increase delay to 5ms for powerUp, although it should only take 2ms
tops, this prevents the hanging condition.
2014-04-02 22:08:29 -06:00
TMRh20 2f7e4489ba Fix: Ext. timeout hang, examples, board support
- Initial support for Due and ATTiny boards
- Fix for 0 timeout period causing hang
- Remove unnecessary delays from startWrite
- Cleaned up/Updated example files
- Optimization is nearing completion
2014-04-01 23:47:19 -06:00
TMRh20 6263bccd02 Extended timeouts, txStandBy changes
- For use in noisy or low signal scenarios
- Allows user specified timeout period of extended duration
- Modified txStandBy() and writeBlocking() functions to rely on a user
defined timeout period, automatic retries and payload reUse
2014-03-29 05:29:29 -06:00
TMRh20 1cc7454d97 txStandby() function modified completely
txStandBy() now either works in two modes. The main mode will block
until success or fail. Using txStandBy(1) will block and retry forever
until succesful. Using a while loop with the function is no longer
required. See the updated class reference at
http://tmrh20.github.io/RF24/class_r_f24.html
2014-03-22 20:32:31 -06:00
TMRh20 4340d9339a Lib now passes all tests
Added back original startWrite function for when users want to use
manual methods. The library uses startFastWrite for its internal
functions. Provides compatibility with prev. code while still using the
new methods for everything else.
2014-03-22 18:39:46 -06:00
TMRh20 f3b3fb1f44 Fix: txStandBy hang. Updated Transfer example
- txStandBy was hanging if the last of the data timed out. Now clears
the MAX_RT flag if timed out
- Finished updating example file Transfer.ino for demonstrating
half-rate transfers using the FIFO buffers
2014-03-22 01:52:22 -06:00
TMRh20 bcd48f2f47 Fix: Standby after regular write cmd
Realized that the normal write command should always drop to standby-I
mode immediately since the FIFO cannot be filled using this method, and
TX will be complete.
2014-03-19 20:47:37 -06:00
TMRh20 1e2f41c3f8 Inspired idea to change TX standby code
Realised that data would be lost if dropping to standby or power down
mode before the FIFO is empty.
txStandby now returns a boolean value to indicate whether the
transmission is complete. If there is data in the TX FIFO the radio will
not drop out of TX mode. eg: while(  !txStandBy()  ){}
2014-03-19 08:26:59 -06:00
TMRh20 77b1e2c140 - Slight modification to reUseTX cmd
- put the CE HIGH, LOW changes in the cmd for non-internal use
- Put the clearing of MAX_RT in the reUse cmd for non-internal use
- Removed unneeded delay from writeBlocking()
2014-03-19 03:43:13 -06:00
TMRh20 281ace4ba2 Added writeFast() cmd - fill FIFO or return 0
- WriteFast allows the FIFO buffers to be filled up before returning 0
- The current payload will be dropped, and the previous payload resent
- The user should just keep trying to send the same data if a 0 is
received
2014-03-19 03:19:39 -06:00
TMRh20 d0ec0c461c Changed writing modes
- Changed writeClear to the default radio.write() option
- Changed write() to writeBlock() - uses the auto-retry functionality of
the chip and will block forever until successful
2014-03-19 00:46:47 -06:00
TMRh20 4cf0fb0c5a High Speed Data Transfers/Optimization
Changes:

- Enable PTX at radio begin, in standby-I mode
- Enable PTX at radio stopListening(); in standy-I mode

- Radio startListening
- removed delay. What is there to wait for when the radio will just be
listening anyway?

- Radio powerUp
- radio will need to be powered up after configuration
- radio will not power down unless instructed to
- need to issue radio.txStandBy(); when finished transmitting to engage
standby-I mode

- Added txStandBy() to drop to standBy-I mode if not switching to RX
mode

- Radio Write: Sped up
- radio previously did not use standby mode effectively, after TX
sending of each packet, the radio is
powered down introducing a 1.5ms delay in addition to the 130us delay
from standby.
- No observe-tx code, a simple NOP cmd is sent to get the status info
- No millis() timeout, hanging condition should only occur because of
faulty code
- Simplified whatHappened() code
- Flush TX FIFO if MAX_RT met as lib does not support re-transmit
instead of flush every time.
- Remove ack size monitoring
- No powerdown needed,

- Added writeClear() function for writes that need the interrupt flags
cleared (ack payloads, etc). Same as write() otherwise

- Radio startWrite: Sped up
- Enable PTX mode is now done in stopListening() code. Enter TX mode by
writing CE high.
This brings the data transfer capabilities up to a reasonable level
- No need to power up, already in Standby-I mode
- No need for delayMicroseconds() in write functon.
- No need for delay after writing CE high
- Does not enter Standby-I mode be default. It is up to the MCU to call
the new txStandBy() function to enter standby-I mode from PTX if not
switching back to PRX

- Radio available:
- Now checks the FIFO buffer instead of the interrupt flag (no missed
data)
- Moved clearing of interrupt flags to Read()

- Radio read:
- No longer returns any value - use available to check for more data

- Radio isAckPayloadAvailable() now checks the FIFO directly

- Radio getDynamicPayloadSize() - Per the datasheet, added fix to flush
corrupted packets
2014-03-18 07:07:03 -06:00
maniacbug 2c97186329 Fix bug introduced in the move to PROGMEM. Props to @basilrx for finding this. Also added a test case to demonstrate the bug, and guard against more like it in the future. 2012-02-26 19:53:08 -08:00
maniacbug f6e59b9de8 Remove prog_char, for compliance with gcc 4.6.1 2012-01-17 22:05:11 -08:00
maniacbug eb3b2d800a Reduce RAM footprint by moving static const data to progmem, and refactoring out switch statements. 2012-01-15 22:05:44 -08:00
maniacbug 07a4bcf425 Use latest copyright 2011-12-24 10:07:16 -08:00
maniacbug 238e9d27b6 Merge branch 'master' of github.com:maniacbug/RF24 2011-12-21 08:33:01 -08:00
maniacbug 5cb32c92cc Handle SPI.h better in Maple 2011-12-21 08:32:57 -08:00
maniacbug 50b18a9c7d Reduce delays in startWrite down to only required delays 2011-12-19 06:19:25 -08:00
maniacbug 53cb579400 Moved environment-specific checking out to RF24_config.h 2011-12-10 15:52:33 -08:00
maniacbug f3934084a1 Changes to work on Maple 2011-12-10 00:42:23 -08:00
maniacbug d92ac14f86 Compatibility with Arduino 1.0 2011-11-02 21:28:28 -07:00
maniacbug 726027837e Merge branch 'master' of github.com:maniacbug/RF24 2011-10-19 15:18:11 -07:00
maniacbug 066d79f21e Flush all buffers on start and stop listening 2011-10-12 20:36:00 -07:00
maniacbug ef02ce6e60 Merge branch 'master' of github.com:maniacbug/RF24 2011-10-07 19:07:21 -07:00
maniacbug 19dd5c7726 Avert warnings on native platform 2011-10-07 19:07:08 -07:00
maniacbug c419532cbe Merge branch 'master' of github.com:maniacbug/RF24 2011-09-12 19:29:04 -07:00
maniacbug a28e2361fc SPI bus speed divider to 4, suggested by Greg Copeland. Also removed duplicated spi setup out of begin(), as it's all in csn() 2011-09-12 19:27:27 -07:00
Greg Copeland a4cabc66a2 Yet more merge cleanup. Changes default channel to be
US/Internationally legal while ensuring no spectrum bleed.
2011-09-12 19:22:27 -07:00
Greg Copeland 7ad1b409fe More debugging information. 2011-09-12 19:21:49 -07:00
maniacbug cc7e0a2f19 Fixed a bug when pipe 0 was NOT being used for writing. 2011-09-12 19:11:37 -07:00
maniacbug e1527afc31 Small tweaks and new test for native target 2011-08-27 21:58:06 -07:00
maniacbug 5344c5fe8c CHanged default data rate to 1MBps and default channel to 100 for better performance 2011-08-04 20:46:30 -07:00
maniacbug 4c21ab6ad0 Added back in gcopeland's additional debugging info, with readable values. 2011-08-04 20:16:07 -07:00
maniacbug 8f17e63a22 Add getDataRate, add DISABLED to data rate enum 2011-08-04 20:14:27 -07:00
maniacbug b715bf0fc8 Comment cleanups 2011-08-02 21:15:14 -07:00
maniacbug a261710761 Comment cleanups 2011-08-02 20:59:57 -07:00
maniacbug 3aab74ae8f Merge master with static payload fixes 2011-08-02 16:38:14 -07:00
maniacbug a31cafcc88 Static and dynamic payloads now fully fixed and interoperable 2011-08-02 16:31:18 -07:00
maniacbug 4542464e0b Merge fix for static payloads 2011-08-02 15:55:14 -07:00
maniacbug af00a61555 Fix bug in which static payloads were broken 2011-08-02 15:51:51 -07:00
maniacbug 2f33bdbebd Experimental changes to help in debugging 2011-08-02 15:24:46 -07:00
maniacbug df328408f7 Fix bugs. Ack payload available was broken since interrupts went in. stREtries was missing since the gcopeland merge. 2011-08-02 15:24:19 -07:00
maniacbug cd3b0b3ccb Merge cleanups 2011-07-31 10:00:21 -07:00
maniacbug 956b63a4dc sed s/boolean/bool/g 2011-07-31 10:00:09 -07:00
maniacbug 14c34ca2e4 astyle -A1 -s2 2011-07-31 09:47:41 -07:00
maniacbug 602d96264a Merge gcopeland/constremove 2011-07-31 09:45:40 -07:00
Greg Copeland 0c2515df19 As a just in case I misunderstood some of the constant-ness changes, I
completely took out all of the constant correctness enahcements. Also
added a powerUp() method.
2011-07-19 11:05:18 -05:00