github.com/martinohmann/rfoutlet@v1.2.1-0.20220707195255-8a66aa411105/pkg/gpio/protocol.go (about) 1 package gpio 2 3 // HighLow defines the number of high pulses followed by a number of low pulses 4 // to send. 5 type HighLow struct { 6 High, Low uint 7 } 8 9 // Protocol defines the HighLow sequences to send to emit ones (One) and zeros 10 // (Zero) and the sync sequence (Sync) which signals the end of a code 11 // transmission. 12 type Protocol struct { 13 Sync, Zero, One HighLow 14 } 15 16 // DefaultProtocols defines known remote control protocols. These are exported 17 // to give users the ability to add more protocols if needed. However, it is 18 // advised to use the ReceiverProtocols ReceiverOption to configure a *Receiver 19 // with custom protocols. 20 var DefaultProtocols = []Protocol{ 21 {HighLow{1, 31}, HighLow{1, 3}, HighLow{3, 1}}, 22 {HighLow{1, 10}, HighLow{1, 2}, HighLow{2, 1}}, 23 {HighLow{30, 71}, HighLow{4, 11}, HighLow{9, 6}}, 24 {HighLow{1, 6}, HighLow{1, 3}, HighLow{3, 1}}, 25 {HighLow{6, 14}, HighLow{1, 2}, HighLow{2, 1}}, 26 }