Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: pi433: add docs to packet_format and tx_start_condition enum

While pi433 driver deals with the nuances of the different possible
config combinations, it's hard (at first) to understand the rationale
for some of the tx/rx-related source code unless you're fairly familiar
with the rf69's inner workings.

This patch documents the expected behaviour and limits of both
packet_format and tx_start_condition enum fields.

Signed-off-by: Paulo Miguel Almeida <paulo.miguel.almeida.rodenas@gmail.com>
Link: https://lore.kernel.org/r/20211231001933.GA6779@mail.google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Paulo Miguel Almeida and committed by
Greg Kroah-Hartman
a0c43a46 12b31d07

+12
+12
drivers/staging/pi433/rf69_enum.h
··· 110 110 }; 111 111 112 112 enum packet_format { 113 + /* 114 + * Used when the size of payload is fixed in advance. This mode of 115 + * operation may be of interest to minimize RF overhead by 1 byte as 116 + * no length byte field is required 117 + */ 113 118 packet_length_fix, 119 + /* 120 + * Used when the size of payload isn't known in advance. It requires the 121 + * transmitter to send the length byte in each packet so the receiver 122 + * would know how to operate properly 123 + */ 114 124 packet_length_var 115 125 }; 116 126 117 127 enum tx_start_condition { 128 + /* the number of bytes in the FIFO exceeds FIFO_THRESHOLD */ 118 129 fifo_level, 130 + /* at least one byte in the FIFO */ 119 131 fifo_not_empty 120 132 }; 121 133