Thank you.
Maybe you can help me with this. I am trying to send:
PREAMBLE | SYNC | DATA (manchester)
6 bytes of PREAMBLE:
/* 0x2C */ { REG_PREAMBLEMSB, 0x00 },
/* 0x2D */ { REG_PREAMBLELSB, 0x06 },
3 bytes of SYNC:
/* 0x2E */ { REG_SYNCCONFIG, RF_SYNC_ON | RF_SYNC_FIFOFILL_AUTO | RF_SYNC_SIZE_3 | RF_SYNC_TOL_0 },
/* 0x2F */ { REG_SYNCVALUE1, 0xBB },
/* 0x30 */ { REG_SYNCVALUE2, 0xBC },
/* 0x31 */ { REG_SYNCVALUE3, 0xBD },
32 bytes of DATA - Manchester coding:
/* 0x37 */ { REG_PACKETCONFIG1, RF_PACKET1_FORMAT_VARIABLE | RF_PACKET1_DCFREE_MANCHESTER | RF_PACKET1_CRC_OFF | RF_PACKET1_CRCAUTOCLEAR_ON | RF_PACKET1_ADRSFILTERING_OFF },
/* 0x38 */ { REG_PAYLOADLENGTH, 32 },
data[0] = 0x1F;
....
I don't need to send these bytes:
SPI.transfer(REG_FIFO | 0x80);
SPI.transfer(bufferSize + 3);
SPI.transfer(toAddress);
SPI.transfer(_address);
SPI.transfer(CTLbyte);
What I need is sending byte data[0] - 0x1f after sync 0xBD. I was trying to change a sendFrame function but no success and I don't understand this first line
SPI.transfer(REG_FIFO | 0x80) - this one bit is very important and for me there is no place for that.