Library for interfacing with the AMICCOM A7105 2.4GHz FSK/GFSK Transceiver.
Revision 8:033e328fb7c3, committed 2015-01-01
- Comitter:
- d34d
- Date:
- Thu Jan 01 22:24:40 2015 +0000
- Parent:
- 7:1b1d7e446aa4
- Commit message:
- Fix A7105::writeData method
Changed in this revision
A7105.cpp | Show annotated file Show diff for this revision Revisions of this file |
A7105.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/A7105.cpp Thu Jan 01 19:29:49 2015 +0000 +++ b/A7105.cpp Thu Jan 01 22:24:40 2015 +0000 @@ -46,7 +46,7 @@ return ret; } -void A7105::writeData(uint8_t* data, size_t len) { +void A7105::writeData(uint8_t* data, size_t len, uint8_t channel) { // assert CS assertChipSelect(); _spi.write(A7105_RST_WRPTR); @@ -54,9 +54,11 @@ for (size_t i = 0; i < len; i++) { _spi.write(data[i]); } - // de-assert CS deassertChipSelect(); + + writeRegister(A7105_0F_PLL_I, channel); + strobe(A7105_TX); } void A7105::readData(uint8_t* buffer, size_t len) {
--- a/A7105.h Thu Jan 01 19:29:49 2015 +0000 +++ b/A7105.h Thu Jan 01 22:24:40 2015 +0000 @@ -167,8 +167,9 @@ * * @param data Byte array to send * @param len Length of the byte array + * @param channel Channel to transmit data on */ - void writeData(uint8_t* data, size_t len); + void writeData(uint8_t* data, size_t len, uint8_t channel); /** * Read a packet of date from the A7105