18 for(
int i = 0; i < 32; i++) {
19 _settings[i] = settings[i];
30 _settings[0] = (enable ? (_settings[0] | 1) : (_settings[0] & (~1)));
34 return _settings[0] & 1;
40 _settings[0] = (enable ? (_settings[0] | 2) : (_settings[0] & (~2)));
44 return (_settings[0] >> 1) & 1;
50 _settings[0] = (enable ? (_settings[0] | 4) : (_settings[0] & (~4)));
54 return (_settings[0] >> 2) & 1;
60 _settings[0] = (_settings[0] & (~24)) | (datarate << 3);
64 uint8_t datarate = (_settings[0] >> 3) & 3;
77 _settings[1] = channel;
85 _settings[2] = min(payload, 32);
93 _settings[3] = frequency;
103 _settings[4] = (_settings[4] & (~15)) | (time & 15);
107 return _settings[4] & 15;
111 _settings[5] = numChannels;
119 Serial.print(
"Dyn Load: ");
122 Serial.print(
"Ack: ");
125 Serial.print(
"Ack Load: ");
128 Serial.print(
"DataRate: ");
129 Serial.println(
getDataRate() == RF24_1MBPS ?
"1MBPS" :
130 (
getDataRate() == RF24_250KBPS ?
"250MBPS" :
"2MBPS"));
132 Serial.print(
"Channel: ");
135 Serial.print(
"Payload SIze: ");
138 Serial.print(
"Frequency: ");
141 Serial.print(
"Retry Delay: ");
144 Serial.print(
"Num Channels: ");
147 Serial.println(
"Array:");
148 for(
int i = 0; i < 5; i++) {
152 Serial.println(_settings[i]);
rf24_datarate_e getDataRate()
void setEnableAck(bool enable)
bool getEnableDynamicPayload()
void setSettings(const uint8_t *settings)
void setDataRate(rf24_datarate_e datarate)
uint8_t getStartChannel()
uint8_t getCommsFrequency()
void setCommsFrequency(uint8_t frequency)
void setNumChannels(uint8_t numChannels)
void setEnableAckPayload(bool enable)
void setPayloadSize(uint8_t payload)
void setStartChannel(uint8_t channel)
void setRetryDelay(uint8_t time)
bool getEnableAckPayload()
void setEnableDynamicPayload(bool enable)