X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=decoders%2Frfm12%2Fpd.py;h=d3df13a9eb3dfeb024cf7cf836b43a672d269920;hb=HEAD;hp=46e5b07bfe7d7489cbf344445d09107b0e028383;hpb=92b7b49f6964f57a7d6fc4473645c993cfa4ba52;p=libsigrokdecode.git diff --git a/decoders/rfm12/pd.py b/decoders/rfm12/pd.py index 46e5b07..3f25b32 100644 --- a/decoders/rfm12/pd.py +++ b/decoders/rfm12/pd.py @@ -14,36 +14,39 @@ ## GNU General Public License for more details. ## ## You should have received a copy of the GNU General Public License -## along with this program; if not, write to the Free Software -## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +## along with this program; if not, see . ## import sigrokdecode as srd class Decoder(srd.Decoder): - api_version = 2 + api_version = 3 id = 'rfm12' name = 'RFM12' - longname = 'RFM12 control protocol' + longname = 'HopeRF RFM12' desc = 'HopeRF RFM12 wireless transceiver control protocol.' license = 'gplv2+' inputs = ['spi'] - outputs = ['rfm12'] + outputs = [] + tags = ['Wireless/RF'] annotations = ( ('cmd', 'Command'), - ('params', 'Command parameters'), - ('disabled', 'Disabled bits'), - ('return', 'Returned values'), - ('disabled_return', 'Disabled returned values'), + ('param', 'Command parameter'), + ('disabled', 'Disabled bit'), + ('return', 'Returned value'), + ('disabled_return', 'Disabled returned value'), ('interpretation', 'Interpretation'), ) annotation_rows = ( ('commands', 'Commands', (0, 1, 2)), - ('return', 'Return', (3, 4)), - ('interpretation', 'Interpretation', (5,)), + ('returns', 'Returns', (3, 4)), + ('interpretations', 'Interpretations', (5,)), ) def __init__(self): + self.reset() + + def reset(self): self.mosi_bytes, self.miso_bytes = [], [] self.mosi_bits, self.miso_bits = [], [] self.row_pos = [0, 0, 0]