amount of bytes that were requested by the read request.
Attention: should be used in combination with sync, only
enable_address_filtering;
- filteringOff - no address filtering will take place
- nodeAddress - all telegrams, not matching the node
- address will be internally discarded
- nodeOrBroadcastAddress - all telegrams, neither matching the
- node, nor the broadcast address will
- be internally discarded
+ filtering_off - no address filtering will take place
+ node_address - all telegrams, not matching the node
+ address will be internally discarded
+ node_or_broadcast_address - all telegrams, neither matching the
+ node, nor the broadcast address will
+ be internally discarded
Attention: Sync option must be enabled in order to use this feature
enable_crc
optionOn - a crc will be calculated over the payload of
payload_length = rx_cfg->fixed_message_length;
if (rx_cfg->enable_length_byte == OPTION_ON)
payload_length++;
- if (rx_cfg->enable_address_filtering != filteringOff)
+ if (rx_cfg->enable_address_filtering != filtering_off)
payload_length++;
ret = rf69_set_payload_length(dev->spi, payload_length);
if (ret < 0)
if (ret < 0)
return ret;
}
- if (rx_cfg->enable_address_filtering != filteringOff) {
+ if (rx_cfg->enable_address_filtering != filtering_off) {
ret = rf69_set_node_address(dev->spi, rx_cfg->node_address);
if (ret < 0)
return ret;
}
/* address byte enabled? */
- if (dev->rx_cfg.enable_address_filtering != filteringOff) {
+ if (dev->rx_cfg.enable_address_filtering != filtering_off) {
u8 dummy;
bytes_total--;
int rf69_set_address_filtering(struct spi_device *spi, enum address_filtering address_filtering)
{
switch (address_filtering) {
- case filteringOff:
+ case filtering_off:
return rf69_read_mod_write(spi, REG_PACKETCONFIG1, MASK_PACKETCONFIG1_ADDRESSFILTERING, PACKETCONFIG1_ADDRESSFILTERING_OFF);
- case nodeAddress:
+ case node_address:
return rf69_read_mod_write(spi, REG_PACKETCONFIG1, MASK_PACKETCONFIG1_ADDRESSFILTERING, PACKETCONFIG1_ADDRESSFILTERING_NODE);
- case nodeOrBroadcastAddress:
+ case node_or_broadcast_address:
return rf69_read_mod_write(spi, REG_PACKETCONFIG1, MASK_PACKETCONFIG1_ADDRESSFILTERING, PACKETCONFIG1_ADDRESSFILTERING_NODEBROADCAST);
default:
dev_dbg(&spi->dev, "set: illegal input param");
};
enum address_filtering {
- filteringOff,
- nodeAddress,
- nodeOrBroadcastAddress
+ filtering_off,
+ node_address,
+ node_or_broadcast_address
};
enum dagc {