sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget=/translations/zh_CN/userspace-api/media/cec/cec-pin-error-injmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget=/translations/zh_TW/userspace-api/media/cec/cec-pin-error-injmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget=/translations/it_IT/userspace-api/media/cec/cec-pin-error-injmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget=/translations/ja_JP/userspace-api/media/cec/cec-pin-error-injmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget=/translations/ko_KR/userspace-api/media/cec/cec-pin-error-injmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget=/translations/sp_SP/userspace-api/media/cec/cec-pin-error-injmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhcomment)}(h8SPDX-License-Identifier: GFDL-1.1-no-invariants-or-laterh]h8SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhhW/var/lib/git/docbuild/linux/Documentation/userspace-api/media/cec/cec-pin-error-inj.rsthKubhtarget)}(h.. _cec_pin_error_inj:h]h}(h]h ]h"]h$]h&]refidcec-pin-error-injuh1hhKhhhhhhubhsection)}(hhh](htitle)}(h!CEC Pin Framework Error Injectionh]h!CEC Pin Framework Error Injection}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh paragraph)}(hXThe CEC Pin Framework is a core CEC framework for CEC hardware that only has low-level support for the CEC bus. Most hardware today will have high-level CEC support where the hardware deals with driving the CEC bus, but some older devices aren't that fancy. However, this framework also allows you to connect the CEC pin to a GPIO on e.g. a Raspberry Pi and you have now made a CEC adapter.h]hXThe CEC Pin Framework is a core CEC framework for CEC hardware that only has low-level support for the CEC bus. Most hardware today will have high-level CEC support where the hardware deals with driving the CEC bus, but some older devices aren’t that fancy. However, this framework also allows you to connect the CEC pin to a GPIO on e.g. a Raspberry Pi and you have now made a CEC adapter.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hWhat makes doing this so interesting is that since we have full control over the bus it is easy to support error injection. This is ideal to test how well CEC adapters can handle error conditions.h]hWhat makes doing this so interesting is that since we have full control over the bus it is easy to support error injection. This is ideal to test how well CEC adapters can handle error conditions.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hCurrently only the cec-gpio driver (when the CEC line is directly connected to a pull-up GPIO line) and the AllWinner A10/A20 drm driver support this framework.h]hCurrently only the cec-gpio driver (when the CEC line is directly connected to a pull-up GPIO line) and the AllWinner A10/A20 drm driver support this framework.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hIf ``CONFIG_CEC_PIN_ERROR_INJ`` is enabled, then error injection is available through debugfs. Specifically, in ``/sys/kernel/debug/cec/cecX/`` there is now an ``error-inj`` file.h](hIf }(hjhhhNhNubhliteral)}(h``CONFIG_CEC_PIN_ERROR_INJ``h]hCONFIG_CEC_PIN_ERROR_INJ}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubhQ is enabled, then error injection is available through debugfs. Specifically, in }(hjhhhNhNubj )}(h``/sys/kernel/debug/cec/cecX/``h]h/sys/kernel/debug/cec/cecX/}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubh there is now an }(hjhhhNhNubj )}(h ``error-inj``h]h error-inj}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubh file.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubhnote)}(hOThe error injection commands are not a stable ABI and may change in the future.h]h)}(hOThe error injection commands are not a stable ABI and may change in the future.h]hOThe error injection commands are not a stable ABI and may change in the future.}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjKubah}(h]h ]h"]h$]h&]uh1jIhhhhhhhNubh)}(hfWith ``cat error-inj`` you can see both the possible commands and the current error injection status::h](hWith }(hjchhhNhNubj )}(h``cat error-inj``h]h cat error-inj}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjcubhO you can see both the possible commands and the current error injection status:}(hjchhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh literal_block)}(hX $ cat /sys/kernel/debug/cec/cec0/error-inj # Clear error injections: # clear clear all rx and tx error injections # rx-clear clear all rx error injections # tx-clear clear all tx error injections # clear clear all rx and tx error injections for # rx-clear clear all rx error injections for # tx-clear clear all tx error injections for # # RX error injection settings: # rx-no-low-drive do not generate low-drive pulses # # RX error injection: # [,] rx-nack NACK the message instead of sending an ACK # [,] rx-low-drive force a low-drive condition at this bit position # [,] rx-add-byte add a spurious byte to the received CEC message # [,] rx-remove-byte remove the last byte from the received CEC message # any[,] rx-arb-lost [] generate a POLL message to trigger an arbitration lost # # TX error injection settings: # tx-ignore-nack-until-eom ignore early NACKs until EOM # tx-custom-low-usecs define the 'low' time for the custom pulse # tx-custom-high-usecs define the 'high' time for the custom pulse # tx-custom-pulse transmit the custom pulse once the bus is idle # tx-glitch-low-usecs define the 'low' time for the glitch pulse # tx-glitch-high-usecs define the 'high' time for the glitch pulse # tx-glitch-falling-edge send the glitch pulse after every falling edge # tx-glitch-rising-edge send the glitch pulse after every rising edge # # TX error injection: # [,] tx-no-eom don't set the EOM bit # [,] tx-early-eom set the EOM bit one byte too soon # [,] tx-add-bytes append (1-255) spurious bytes to the message # [,] tx-remove-byte drop the last byte from the message # [,] tx-short-bit make this bit shorter than allowed # [,] tx-long-bit make this bit longer than allowed # [,] tx-custom-bit send the custom pulse instead of this bit # [,] tx-short-start send a start pulse that's too short # [,] tx-long-start send a start pulse that's too long # [,] tx-custom-start send the custom pulse instead of the start pulse # [,] tx-last-bit stop sending after this bit # [,] tx-low-drive force a low-drive condition at this bit position # # CEC message opcode (0-255) or 'any' # 'once' (default), 'always', 'toggle' or 'off' # CEC message bit (0-159) # 10 bits per 'byte': bits 0-7: data, bit 8: EOM, bit 9: ACK # CEC poll message used to test arbitration lost (0x00-0xff, default 0x0f) # microseconds (0-10000000, default 1000) clearh]hX $ cat /sys/kernel/debug/cec/cec0/error-inj # Clear error injections: # clear clear all rx and tx error injections # rx-clear clear all rx error injections # tx-clear clear all tx error injections # clear clear all rx and tx error injections for # rx-clear clear all rx error injections for # tx-clear clear all tx error injections for # # RX error injection settings: # rx-no-low-drive do not generate low-drive pulses # # RX error injection: # [,] rx-nack NACK the message instead of sending an ACK # [,] rx-low-drive force a low-drive condition at this bit position # [,] rx-add-byte add a spurious byte to the received CEC message # [,] rx-remove-byte remove the last byte from the received CEC message # any[,] rx-arb-lost [] generate a POLL message to trigger an arbitration lost # # TX error injection settings: # tx-ignore-nack-until-eom ignore early NACKs until EOM # tx-custom-low-usecs define the 'low' time for the custom pulse # tx-custom-high-usecs define the 'high' time for the custom pulse # tx-custom-pulse transmit the custom pulse once the bus is idle # tx-glitch-low-usecs define the 'low' time for the glitch pulse # tx-glitch-high-usecs define the 'high' time for the glitch pulse # tx-glitch-falling-edge send the glitch pulse after every falling edge # tx-glitch-rising-edge send the glitch pulse after every rising edge # # TX error injection: # [,] tx-no-eom don't set the EOM bit # [,] tx-early-eom set the EOM bit one byte too soon # [,] tx-add-bytes append (1-255) spurious bytes to the message # [,] tx-remove-byte drop the last byte from the message # [,] tx-short-bit make this bit shorter than allowed # [,] tx-long-bit make this bit longer than allowed # [,] tx-custom-bit send the custom pulse instead of this bit # [,] tx-short-start send a start pulse that's too short # [,] tx-long-start send a start pulse that's too long # [,] tx-custom-start send the custom pulse instead of the start pulse # [,] tx-last-bit stop sending after this bit # [,] tx-low-drive force a low-drive condition at this bit position # # CEC message opcode (0-255) or 'any' # 'once' (default), 'always', 'toggle' or 'off' # CEC message bit (0-159) # 10 bits per 'byte': bits 0-7: data, bit 8: EOM, bit 9: ACK # CEC poll message used to test arbitration lost (0x00-0xff, default 0x0f) # microseconds (0-10000000, default 1000) clear}hjsbah}(h]h ]h"]h$]h&]hhuh1jhhhK#hhhhubh)}(hX You can write error injection commands to ``error-inj`` using ``echo 'cmd' >error-inj`` or ``cat cmd.txt >error-inj``. The ``cat error-inj`` output contains the current error commands. You can save the output to a file and use it as an input to ``error-inj`` later.h](h*You can write error injection commands to }(hjhhhNhNubj )}(h ``error-inj``h]h error-inj}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubh using }(hjhhhNhNubj )}(h``echo 'cmd' >error-inj``h]hecho 'cmd' >error-inj}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubh or }(hjhhhNhNubj )}(h``cat cmd.txt >error-inj``h]hcat cmd.txt >error-inj}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubh. The }(hjhhhNhNubj )}(h``cat error-inj``h]h cat error-inj}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubhi output contains the current error commands. You can save the output to a file and use it as an input to }(hjhhhNhNubj )}(h ``error-inj``h]h error-inj}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubh later.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKWhhhhubh)}(hhh](h)}(h Basic Syntaxh]h Basic Syntax}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK]ubh)}(hLeading spaces/tabs are ignored. If the next character is a ``#`` or the end of the line was reached, then the whole line is ignored. Otherwise a command is expected.h](h`` and error injection commands can co-exist. So this is fine::h](hAll combinations of }(hjhhhNhNubj )}(h````h]h}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubh< and error injection commands can co-exist. So this is fine:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKxhjhhubj)}(hE0x9e tx-add-bytes 1 0x9e tx-early-eom 0x9f tx-add-bytes 2 any rx-nackh]hE0x9e tx-add-bytes 1 0x9e tx-early-eom 0x9f tx-add-bytes 2 any rx-nack}hj8sbah}(h]h ]h"]h$]h&]hhuh1jhhhK{hjhhubh)}(h@All four error injection commands will be active simultaneously.h]h@All four error injection commands will be active simultaneously.}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hbHowever, if the same ```` and command combination is specified, but with different arguments::h](hHowever, if the same }(hjThhhNhNubj )}(h````h]h}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjTubhD and command combination is specified, but with different arguments:}(hjThhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj)}(h'0x9e tx-add-bytes 1 0x9e tx-add-bytes 2h]h'0x9e tx-add-bytes 1 0x9e tx-add-bytes 2}hjtsbah}(h]h ]h"]h$]h&]hhuh1jhhhKhjhhubh)}(h)Then the second will overwrite the first.h]h)Then the second will overwrite the first.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubeh}(h] basic-syntaxah ]h"] basic syntaxah$]h&]uh1hhhhhhhhK]ubh)}(hhh](h)}(hClear Error Injectionsh]hClear Error Injections}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubhdefinition_list)}(hhh](hdefinition_list_item)}(h&``clear`` Clear all error injections. h](hterm)}(h ``clear``h]j )}(hjh]hclear}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1jhhhKhjubh definition)}(hhh]h)}(hClear all error injections.h]hClear all error injections.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKhjubj)}(h0``rx-clear`` Clear all receive error injections h](j)}(h ``rx-clear``h]j )}(hjh]hrx-clear}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1jhhhKhjubj)}(hhh]h)}(h"Clear all receive error injectionsh]h"Clear all receive error injections}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKhjhhubj)}(h1``tx-clear`` Clear all transmit error injections h](j)}(h ``tx-clear``h]j )}(hj*h]htx-clear}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj(ubah}(h]h ]h"]h$]h&]uh1jhhhKhj$ubj)}(hhh]h)}(h#Clear all transmit error injectionsh]h#Clear all transmit error injections}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj?ubah}(h]h ]h"]h$]h&]uh1jhj$ubeh}(h]h ]h"]h$]h&]uh1jhhhKhjhhubj)}(h@`` clear`` Clear all error injections for the given opcode. h](j)}(h`` clear``h]j )}(hjbh]h clear}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1j hj`ubah}(h]h ]h"]h$]h&]uh1jhhhKhj\ubj)}(hhh]h)}(h0Clear all error injections for the given opcode.h]h0Clear all error injections for the given opcode.}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjwubah}(h]h ]h"]h$]h&]uh1jhj\ubeh}(h]h ]h"]h$]h&]uh1jhhhKhjhhubj)}(hK`` rx-clear`` Clear all receive error injections for the given opcode. h](j)}(h`` rx-clear``h]j )}(hjh]h rx-clear}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1jhhhKhjubj)}(hhh]h)}(h8Clear all receive error injections for the given opcode.h]h8Clear all receive error injections for the given opcode.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKhjhhubj)}(hL`` tx-clear`` Clear all transmit error injections for the given opcode. h](j)}(h`` tx-clear``h]j )}(hjh]h tx-clear}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1jhhhKhjubj)}(hhh]h)}(h9Clear all transmit error injections for the given opcode.h]h9Clear all transmit error injections for the given opcode.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKhjhhubeh}(h]h ]h"]h$]h&]uh1jhjhhhhhNubeh}(h]clear-error-injectionsah ]h"]clear error injectionsah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hReceive Messagesh]hReceive Messages}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubj)}(hhh](j)}(h``[,] rx-nack`` NACK broadcast messages and messages directed to this CEC adapter. Every byte of the message will be NACKed in case the transmitter keeps transmitting after the first byte was NACKed. h](j)}(h``[,] rx-nack``h]j )}(hj,h]h[,] rx-nack}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj*ubah}(h]h ]h"]h$]h&]uh1jhhhKhj&ubj)}(hhh]h)}(hNACK broadcast messages and messages directed to this CEC adapter. Every byte of the message will be NACKed in case the transmitter keeps transmitting after the first byte was NACKed.h]hNACK broadcast messages and messages directed to this CEC adapter. Every byte of the message will be NACKed in case the transmitter keeps transmitting after the first byte was NACKed.}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjAubah}(h]h ]h"]h$]h&]uh1jhj&ubeh}(h]h ]h"]h$]h&]uh1jhhhKhj#ubj)}(hX``[,] rx-low-drive `` Force a Low Drive condition at this bit position. If specifies a specific CEC opcode then the bit position must be at least 18, otherwise the opcode hasn't been received yet. This tests if the transmitter can handle the Low Drive condition correctly and reports the error correctly. Note that a Low Drive in the first 4 bits can also be interpreted as an Arbitration Lost condition by the transmitter. This is implementation dependent. h](j)}(h$``[,] rx-low-drive ``h]j )}(hjdh]h [,] rx-low-drive }(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjbubah}(h]h ]h"]h$]h&]uh1jhhhKhj^ubj)}(hhh]h)}(hXForce a Low Drive condition at this bit position. If specifies a specific CEC opcode then the bit position must be at least 18, otherwise the opcode hasn't been received yet. This tests if the transmitter can handle the Low Drive condition correctly and reports the error correctly. Note that a Low Drive in the first 4 bits can also be interpreted as an Arbitration Lost condition by the transmitter. This is implementation dependent.h]hXForce a Low Drive condition at this bit position. If specifies a specific CEC opcode then the bit position must be at least 18, otherwise the opcode hasn’t been received yet. This tests if the transmitter can handle the Low Drive condition correctly and reports the error correctly. Note that a Low Drive in the first 4 bits can also be interpreted as an Arbitration Lost condition by the transmitter. This is implementation dependent.}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjyubah}(h]h ]h"]h$]h&]uh1jhj^ubeh}(h]h ]h"]h$]h&]uh1jhhhKhj#hhubj)}(h``[,] rx-add-byte`` Add a spurious 0x55 byte to the received CEC message, provided the message was 15 bytes long or less. This is useful to test the high-level protocol since spurious bytes should be ignored. h](j)}(h``[,] rx-add-byte``h]j )}(hjh]h[,] rx-add-byte}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1jhhhKhjubj)}(hhh]h)}(hAdd a spurious 0x55 byte to the received CEC message, provided the message was 15 bytes long or less. This is useful to test the high-level protocol since spurious bytes should be ignored.h]hAdd a spurious 0x55 byte to the received CEC message, provided the message was 15 bytes long or less. This is useful to test the high-level protocol since spurious bytes should be ignored.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKhj#hhubj)}(h``[,] rx-remove-byte`` Remove the last byte from the received CEC message, provided it was at least 2 bytes long. This is useful to test the high-level protocol since messages that are too short should be ignored. h](j)}(h ``[,] rx-remove-byte``h]j )}(hjh]h[,] rx-remove-byte}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1jhhhKhjubj)}(hhh]h)}(hRemove the last byte from the received CEC message, provided it was at least 2 bytes long. This is useful to test the high-level protocol since messages that are too short should be ignored.h]hRemove the last byte from the received CEC message, provided it was at least 2 bytes long. This is useful to test the high-level protocol since messages that are too short should be ignored.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKhj#hhubj)}(hXw``[,] rx-arb-lost `` Generate a POLL message to trigger an Arbitration Lost condition. This command is only allowed for ```` values of ``next`` or ``all``. As soon as a start bit has been received the CEC adapter will switch to transmit mode and it will transmit a POLL message. By default this is 0x0f, but it can also be specified explicitly via the ```` argument. This command can be used to test the Arbitration Lost condition in the remote CEC transmitter. Arbitration happens when two CEC adapters start sending a message at the same time. In that case the initiator with the most leading zeroes wins and the other transmitter has to stop transmitting ('Arbitration Lost'). This is very hard to test, except by using this error injection command. This does not work if the remote CEC transmitter has logical address 0 ('TV') since that will always win. h](j)}(h$``[,] rx-arb-lost ``h]j )}(hj h]h [,] rx-arb-lost }(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hj ubah}(h]h ]h"]h$]h&]uh1jhhhKhjubj)}(hhh](h)}(hXcGenerate a POLL message to trigger an Arbitration Lost condition. This command is only allowed for ```` values of ``next`` or ``all``. As soon as a start bit has been received the CEC adapter will switch to transmit mode and it will transmit a POLL message. By default this is 0x0f, but it can also be specified explicitly via the ```` argument.h](hcGenerate a POLL message to trigger an Arbitration Lost condition. This command is only allowed for }(hj$hhhNhNubj )}(h````h]h}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj$ubh values of }(hj$hhhNhNubj )}(h``next``h]hnext}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj$ubh or }(hj$hhhNhNubj )}(h``all``h]hall}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1j hj$ubh. As soon as a start bit has been received the CEC adapter will switch to transmit mode and it will transmit a POLL message. By default this is 0x0f, but it can also be specified explicitly via the }(hj$hhhNhNubj )}(h ````h]h}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1j hj$ubh argument.}(hj$hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj!ubh)}(hXThis command can be used to test the Arbitration Lost condition in the remote CEC transmitter. Arbitration happens when two CEC adapters start sending a message at the same time. In that case the initiator with the most leading zeroes wins and the other transmitter has to stop transmitting ('Arbitration Lost'). This is very hard to test, except by using this error injection command.h]hXThis command can be used to test the Arbitration Lost condition in the remote CEC transmitter. Arbitration happens when two CEC adapters start sending a message at the same time. In that case the initiator with the most leading zeroes wins and the other transmitter has to stop transmitting (‘Arbitration Lost’). This is very hard to test, except by using this error injection command.}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj!ubh)}(hiThis does not work if the remote CEC transmitter has logical address 0 ('TV') since that will always win.h]hmThis does not work if the remote CEC transmitter has logical address 0 (‘TV’) since that will always win.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj!ubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKhj#hhubj)}(hX``rx-no-low-drive`` The receiver will ignore situations that would normally generate a Low Drive pulse (3.6 ms). This is typically done if a spurious pulse is detected when receiving a message, and it indicates to the transmitter that the message has to be retransmitted since the receiver got confused. Disabling this is useful to test how other CEC devices handle glitches by ensuring we will not be the one that generates a Low Drive. h](j)}(h``rx-no-low-drive``h]j )}(hjh]hrx-no-low-drive}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1jhhhKhjubj)}(hhh]h)}(hXThe receiver will ignore situations that would normally generate a Low Drive pulse (3.6 ms). This is typically done if a spurious pulse is detected when receiving a message, and it indicates to the transmitter that the message has to be retransmitted since the receiver got confused. Disabling this is useful to test how other CEC devices handle glitches by ensuring we will not be the one that generates a Low Drive.h]hXThe receiver will ignore situations that would normally generate a Low Drive pulse (3.6 ms). This is typically done if a spurious pulse is detected when receiving a message, and it indicates to the transmitter that the message has to be retransmitted since the receiver got confused. Disabling this is useful to test how other CEC devices handle glitches by ensuring we will not be the one that generates a Low Drive.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKhj#hhubeh}(h]h ]h"]h$]h&]uh1jhjhhhhhNubeh}(h]receive-messagesah ]h"]receive messagesah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hTransmit Messagesh]hTransmit Messages}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubj)}(hhh](j)}(hXJ``tx-ignore-nack-until-eom`` This setting changes the behavior of transmitting CEC messages. Normally as soon as the receiver NACKs a byte the transmit will stop, but the specification also allows that the full message is transmitted and only at the end will the transmitter look at the ACK bit. This is not recommended behavior since there is no point in keeping the CEC bus busy for longer than is strictly needed. Especially given how slow the bus is. This setting can be used to test how well a receiver deals with transmitters that ignore NACKs until the very end of the message. h](j)}(h``tx-ignore-nack-until-eom``h]j )}(hjh]htx-ignore-nack-until-eom}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1jhhhKhjubj)}(hhh](h)}(hXThis setting changes the behavior of transmitting CEC messages. Normally as soon as the receiver NACKs a byte the transmit will stop, but the specification also allows that the full message is transmitted and only at the end will the transmitter look at the ACK bit. This is not recommended behavior since there is no point in keeping the CEC bus busy for longer than is strictly needed. Especially given how slow the bus is.h]hXThis setting changes the behavior of transmitting CEC messages. Normally as soon as the receiver NACKs a byte the transmit will stop, but the specification also allows that the full message is transmitted and only at the end will the transmitter look at the ACK bit. This is not recommended behavior since there is no point in keeping the CEC bus busy for longer than is strictly needed. Especially given how slow the bus is.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(hThis setting can be used to test how well a receiver deals with transmitters that ignore NACKs until the very end of the message.h]hThis setting can be used to test how well a receiver deals with transmitters that ignore NACKs until the very end of the message.}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKhjubj)}(hXY``[,] tx-no-eom`` Don't set the EOM bit. Normally the last byte of the message has the EOM (End-Of-Message) bit set. With this command the transmit will just stop without ever sending an EOM. This can be used to test how a receiver handles this case. Normally receivers have a time-out after which they will go back to the Idle state. h](j)}(h``[,] tx-no-eom``h]j )}(hjHh]h[,] tx-no-eom}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjFubah}(h]h ]h"]h$]h&]uh1jhhhKhjBubj)}(hhh]h)}(hX<Don't set the EOM bit. Normally the last byte of the message has the EOM (End-Of-Message) bit set. With this command the transmit will just stop without ever sending an EOM. This can be used to test how a receiver handles this case. Normally receivers have a time-out after which they will go back to the Idle state.h]hX>Don’t set the EOM bit. Normally the last byte of the message has the EOM (End-Of-Message) bit set. With this command the transmit will just stop without ever sending an EOM. This can be used to test how a receiver handles this case. Normally receivers have a time-out after which they will go back to the Idle state.}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj]ubah}(h]h ]h"]h$]h&]uh1jhjBubeh}(h]h ]h"]h$]h&]uh1jhhhKhjhhubj)}(hX``[,] tx-early-eom`` Set the EOM bit one byte too soon. This obviously only works for messages of two bytes or more. The EOM bit will be set for the second-to-last byte and not for the final byte. The receiver should ignore the last byte in this case. Since the resulting message is likely to be too short for this same reason the whole message is typically ignored. The receiver should be in Idle state after the last byte was transmitted. h](j)}(h``[,] tx-early-eom``h]j )}(hjh]h[,] tx-early-eom}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hj~ubah}(h]h ]h"]h$]h&]uh1jhhhKhjzubj)}(hhh]h)}(hXSet the EOM bit one byte too soon. This obviously only works for messages of two bytes or more. The EOM bit will be set for the second-to-last byte and not for the final byte. The receiver should ignore the last byte in this case. Since the resulting message is likely to be too short for this same reason the whole message is typically ignored. The receiver should be in Idle state after the last byte was transmitted.h]hXSet the EOM bit one byte too soon. This obviously only works for messages of two bytes or more. The EOM bit will be set for the second-to-last byte and not for the final byte. The receiver should ignore the last byte in this case. Since the resulting message is likely to be too short for this same reason the whole message is typically ignored. The receiver should be in Idle state after the last byte was transmitted.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjzubeh}(h]h ]h"]h$]h&]uh1jhhhKhjhhubj)}(hX``[,] tx-add-bytes `` Append ```` (1-255) spurious bytes to the message. The extra bytes have the value of the byte position in the message. So if you transmit a two byte message (e.g. a Get CEC Version message) and add 2 bytes, then the full message received by the remote CEC adapter is ``0x40 0x9f 0x02 0x03``. This command can be used to test buffer overflows in the receiver. E.g. what does it do when it receives more than the maximum message size of 16 bytes. h](j)}(h$``[,] tx-add-bytes ``h]j )}(hjh]h [,] tx-add-bytes }(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1jhhhKhjubj)}(hhh](h)}(hX(Append ```` (1-255) spurious bytes to the message. The extra bytes have the value of the byte position in the message. So if you transmit a two byte message (e.g. a Get CEC Version message) and add 2 bytes, then the full message received by the remote CEC adapter is ``0x40 0x9f 0x02 0x03``.h](hAppend }(hjhhhNhNubj )}(h ````h]h}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubhX (1-255) spurious bytes to the message. The extra bytes have the value of the byte position in the message. So if you transmit a two byte message (e.g. a Get CEC Version message) and add 2 bytes, then the full message received by the remote CEC adapter is }(hjhhhNhNubj )}(h``0x40 0x9f 0x02 0x03``h]h0x40 0x9f 0x02 0x03}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(hThis command can be used to test buffer overflows in the receiver. E.g. what does it do when it receives more than the maximum message size of 16 bytes.h]hThis command can be used to test buffer overflows in the receiver. E.g. what does it do when it receives more than the maximum message size of 16 bytes.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKhjhhubj)}(h``[,] tx-remove-byte`` Drop the last byte from the message, provided the message is at least two bytes long. The receiver should ignore messages that are too short. h](j)}(h ``[,] tx-remove-byte``h]j )}(hj"h]h[,] tx-remove-byte}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj ubah}(h]h ]h"]h$]h&]uh1jhhhKhjubj)}(hhh]h)}(hDrop the last byte from the message, provided the message is at least two bytes long. The receiver should ignore messages that are too short.h]hDrop the last byte from the message, provided the message is at least two bytes long. The receiver should ignore messages that are too short.}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj7ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKhjhhubj)}(hX``[,] tx-short-bit `` Make this bit period shorter than allowed. The bit position cannot be an Ack bit. If specifies a specific CEC opcode then the bit position must be at least 18, otherwise the opcode hasn't been received yet. Normally the period of a data bit is between 2.05 and 2.75 milliseconds. With this command the period of this bit is 1.8 milliseconds, this is done by reducing the time the CEC bus is high. This bit period is less than is allowed and the receiver should respond with a Low Drive condition. This command is ignored for 0 bits in bit positions 0 to 3. This is because the receiver also looks for an Arbitration Lost condition in those first four bits and it is undefined what will happen if it sees a too-short 0 bit. h](j)}(h$``[,] tx-short-bit ``h]j )}(hjZh]h [,] tx-short-bit }(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjXubah}(h]h ]h"]h$]h&]uh1jhhhM hjTubj)}(hhh](h)}(hXMake this bit period shorter than allowed. The bit position cannot be an Ack bit. If specifies a specific CEC opcode then the bit position must be at least 18, otherwise the opcode hasn't been received yet. Normally the period of a data bit is between 2.05 and 2.75 milliseconds. With this command the period of this bit is 1.8 milliseconds, this is done by reducing the time the CEC bus is high. This bit period is less than is allowed and the receiver should respond with a Low Drive condition.h]hXMake this bit period shorter than allowed. The bit position cannot be an Ack bit. If specifies a specific CEC opcode then the bit position must be at least 18, otherwise the opcode hasn’t been received yet. Normally the period of a data bit is between 2.05 and 2.75 milliseconds. With this command the period of this bit is 1.8 milliseconds, this is done by reducing the time the CEC bus is high. This bit period is less than is allowed and the receiver should respond with a Low Drive condition.}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjoubh)}(hThis command is ignored for 0 bits in bit positions 0 to 3. This is because the receiver also looks for an Arbitration Lost condition in those first four bits and it is undefined what will happen if it sees a too-short 0 bit.h]hThis command is ignored for 0 bits in bit positions 0 to 3. This is because the receiver also looks for an Arbitration Lost condition in those first four bits and it is undefined what will happen if it sees a too-short 0 bit.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjoubeh}(h]h ]h"]h$]h&]uh1jhjTubeh}(h]h ]h"]h$]h&]uh1jhhhM hjhhubj)}(hX{``[,] tx-long-bit `` Make this bit period longer than is valid. The bit position cannot be an Ack bit. If specifies a specific CEC opcode then the bit position must be at least 18, otherwise the opcode hasn't been received yet. Normally the period of a data bit is between 2.05 and 2.75 milliseconds. With this command the period of this bit is 2.9 milliseconds, this is done by increasing the time the CEC bus is high. Even though this bit period is longer than is valid it is undefined what a receiver will do. It might just accept it, or it might time out and return to Idle state. Unfortunately the CEC specification is silent about this. This command is ignored for 0 bits in bit positions 0 to 3. This is because the receiver also looks for an Arbitration Lost condition in those first four bits and it is undefined what will happen if it sees a too-long 0 bit. h](j)}(h#``[,] tx-long-bit ``h]j )}(hjh]h[,] tx-long-bit }(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1jhhhMhjubj)}(hhh](h)}(hXMake this bit period longer than is valid. The bit position cannot be an Ack bit. If specifies a specific CEC opcode then the bit position must be at least 18, otherwise the opcode hasn't been received yet. Normally the period of a data bit is between 2.05 and 2.75 milliseconds. With this command the period of this bit is 2.9 milliseconds, this is done by increasing the time the CEC bus is high.h]hXMake this bit period longer than is valid. The bit position cannot be an Ack bit. If specifies a specific CEC opcode then the bit position must be at least 18, otherwise the opcode hasn’t been received yet. Normally the period of a data bit is between 2.05 and 2.75 milliseconds. With this command the period of this bit is 2.9 milliseconds, this is done by increasing the time the CEC bus is high.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hEven though this bit period is longer than is valid it is undefined what a receiver will do. It might just accept it, or it might time out and return to Idle state. Unfortunately the CEC specification is silent about this.h]hEven though this bit period is longer than is valid it is undefined what a receiver will do. It might just accept it, or it might time out and return to Idle state. Unfortunately the CEC specification is silent about this.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hThis command is ignored for 0 bits in bit positions 0 to 3. This is because the receiver also looks for an Arbitration Lost condition in those first four bits and it is undefined what will happen if it sees a too-long 0 bit.h]hThis command is ignored for 0 bits in bit positions 0 to 3. This is because the receiver also looks for an Arbitration Lost condition in those first four bits and it is undefined what will happen if it sees a too-long 0 bit.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhMhjhhubj)}(hX``[,] tx-short-start`` Make this start bit period shorter than allowed. Normally the period of a start bit is between 4.3 and 4.7 milliseconds. With this command the period of the start bit is 4.1 milliseconds, this is done by reducing the time the CEC bus is high. This start bit period is less than is allowed and the receiver should return to Idle state when this is detected. h](j)}(h ``[,] tx-short-start``h]j )}(hjh]h[,] tx-short-start}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1jhhhM%hjubj)}(hhh]h)}(hXdMake this start bit period shorter than allowed. Normally the period of a start bit is between 4.3 and 4.7 milliseconds. With this command the period of the start bit is 4.1 milliseconds, this is done by reducing the time the CEC bus is high. This start bit period is less than is allowed and the receiver should return to Idle state when this is detected.h]hXdMake this start bit period shorter than allowed. Normally the period of a start bit is between 4.3 and 4.7 milliseconds. With this command the period of the start bit is 4.1 milliseconds, this is done by reducing the time the CEC bus is high. This start bit period is less than is allowed and the receiver should return to Idle state when this is detected.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hj ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhM%hjhhubj)}(hXi``[,] tx-long-start`` Make this start bit period longer than is valid. Normally the period of a start bit is between 4.3 and 4.7 milliseconds. With this command the period of the start bit is 5 milliseconds, this is done by increasing the time the CEC bus is high. This start bit period is more than is valid and the receiver should return to Idle state when this is detected. Even though this start bit period is longer than is valid it is undefined what a receiver will do. It might just accept it, or it might time out and return to Idle state. Unfortunately the CEC specification is silent about this. h](j)}(h``[,] tx-long-start``h]j )}(hj, h]h[,] tx-long-start}(hj. hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj* ubah}(h]h ]h"]h$]h&]uh1jhhhM1hj& ubj)}(hhh](h)}(hXbMake this start bit period longer than is valid. Normally the period of a start bit is between 4.3 and 4.7 milliseconds. With this command the period of the start bit is 5 milliseconds, this is done by increasing the time the CEC bus is high. This start bit period is more than is valid and the receiver should return to Idle state when this is detected.h]hXbMake this start bit period longer than is valid. Normally the period of a start bit is between 4.3 and 4.7 milliseconds. With this command the period of the start bit is 5 milliseconds, this is done by increasing the time the CEC bus is high. This start bit period is more than is valid and the receiver should return to Idle state when this is detected.}(hjD hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM(hjA ubh)}(hEven though this start bit period is longer than is valid it is undefined what a receiver will do. It might just accept it, or it might time out and return to Idle state. Unfortunately the CEC specification is silent about this.h]hEven though this start bit period is longer than is valid it is undefined what a receiver will do. It might just accept it, or it might time out and return to Idle state. Unfortunately the CEC specification is silent about this.}(hjR hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM.hjA ubeh}(h]h ]h"]h$]h&]uh1jhj& ubeh}(h]h ]h"]h$]h&]uh1jhhhM1hjhhubj)}(hXY``[,] tx-last-bit `` Just stop transmitting after this bit. If specifies a specific CEC opcode then the bit position must be at least 18, otherwise the opcode hasn't been received yet. This command can be used to test how the receiver reacts when a message just suddenly stops. It should time out and go back to Idle state. h](j)}(h#``[,] tx-last-bit ``h]j )}(hjr h]h[,] tx-last-bit }(hjt hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjp ubah}(h]h ]h"]h$]h&]uh1jhhhM8hjl ubj)}(hhh]h)}(hX4Just stop transmitting after this bit. If specifies a specific CEC opcode then the bit position must be at least 18, otherwise the opcode hasn't been received yet. This command can be used to test how the receiver reacts when a message just suddenly stops. It should time out and go back to Idle state.h]hX6Just stop transmitting after this bit. If specifies a specific CEC opcode then the bit position must be at least 18, otherwise the opcode hasn’t been received yet. This command can be used to test how the receiver reacts when a message just suddenly stops. It should time out and go back to Idle state.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM4hj ubah}(h]h ]h"]h$]h&]uh1jhjl ubeh}(h]h ]h"]h$]h&]uh1jhhhM8hjhhubj)}(hX``[,] tx-low-drive `` Force a Low Drive condition at this bit position. If specifies a specific CEC opcode then the bit position must be at least 18, otherwise the opcode hasn't been received yet. This can be used to test how the receiver handles Low Drive conditions. Note that if this happens at bit positions 0-3 the receiver can interpret this as an Arbitration Lost condition. This is implementation dependent. h](j)}(h$``[,] tx-low-drive ``h]j )}(hj h]h [,] tx-low-drive }(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj ubah}(h]h ]h"]h$]h&]uh1jhhhM@hj ubj)}(hhh]h)}(hXForce a Low Drive condition at this bit position. If specifies a specific CEC opcode then the bit position must be at least 18, otherwise the opcode hasn't been received yet. This can be used to test how the receiver handles Low Drive conditions. Note that if this happens at bit positions 0-3 the receiver can interpret this as an Arbitration Lost condition. This is implementation dependent.h]hXForce a Low Drive condition at this bit position. If specifies a specific CEC opcode then the bit position must be at least 18, otherwise the opcode hasn’t been received yet. This can be used to test how the receiver handles Low Drive conditions. Note that if this happens at bit positions 0-3 the receiver can interpret this as an Arbitration Lost condition. This is implementation dependent.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM;hj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhhhM@hjhhubeh}(h]h ]h"]h$]h&]uh1jhjhhhhhNubeh}(h]transmit-messagesah ]h"]transmit messagesah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h Custom Pulsesh]h Custom Pulses}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhMCubj)}(hhh](j)}(h``tx-custom-low-usecs `` This defines the duration in microseconds that the custom pulse pulls the CEC line low. The default is 1000 microseconds. h](j)}(h``tx-custom-low-usecs ``h]j )}(hj h]htx-custom-low-usecs }(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj ubah}(h]h ]h"]h$]h&]uh1jhhhMGhj ubj)}(hhh]h)}(hyThis defines the duration in microseconds that the custom pulse pulls the CEC line low. The default is 1000 microseconds.h]hyThis defines the duration in microseconds that the custom pulse pulls the CEC line low. The default is 1000 microseconds.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMFhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhhhMGhj ubj)}(hX+``tx-custom-high-usecs `` This defines the duration in microseconds that the custom pulse keeps the CEC line high (unless another CEC adapter pulls it low in that time). The default is 1000 microseconds. The total period of the custom pulse is ``tx-custom-low-usecs + tx-custom-high-usecs``. h](j)}(h ``tx-custom-high-usecs ``h]j )}(hj< h]htx-custom-high-usecs }(hj> hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj: ubah}(h]h ]h"]h$]h&]uh1jhhhMMhj6 ubj)}(hhh]h)}(hX This defines the duration in microseconds that the custom pulse keeps the CEC line high (unless another CEC adapter pulls it low in that time). The default is 1000 microseconds. The total period of the custom pulse is ``tx-custom-low-usecs + tx-custom-high-usecs``.h](hThis defines the duration in microseconds that the custom pulse keeps the CEC line high (unless another CEC adapter pulls it low in that time). The default is 1000 microseconds. The total period of the custom pulse is }(hjT hhhNhNubj )}(h.``tx-custom-low-usecs + tx-custom-high-usecs``h]h*tx-custom-low-usecs + tx-custom-high-usecs}(hj\ hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjT ubh.}(hjT hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMJhjQ ubah}(h]h ]h"]h$]h&]uh1jhj6 ubeh}(h]h ]h"]h$]h&]uh1jhhhMMhj hhubj)}(hX``[,] tx-custom-bit `` Send the custom bit instead of a regular data bit. The bit position cannot be an Ack bit. If specifies a specific CEC opcode then the bit position must be at least 18, otherwise the opcode hasn't been received yet. h](j)}(h%``[,] tx-custom-bit ``h]j )}(hj h]h![,] tx-custom-bit }(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj ubah}(h]h ]h"]h$]h&]uh1jhhhMRhj ubj)}(hhh]h)}(hSend the custom bit instead of a regular data bit. The bit position cannot be an Ack bit. If specifies a specific CEC opcode then the bit position must be at least 18, otherwise the opcode hasn't been received yet.h]hSend the custom bit instead of a regular data bit. The bit position cannot be an Ack bit. If specifies a specific CEC opcode then the bit position must be at least 18, otherwise the opcode hasn’t been received yet.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMPhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhhhMRhj hhubj)}(hV``[,] tx-custom-start`` Send the custom bit instead of a regular start bit. h](j)}(h!``[,] tx-custom-start``h]j )}(hj h]h[,] tx-custom-start}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj ubah}(h]h ]h"]h$]h&]uh1jhhhMUhj ubj)}(hhh]h)}(h3Send the custom bit instead of a regular start bit.h]h3Send the custom bit instead of a regular start bit.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMUhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhhhMUhj hhubj)}(hS``tx-custom-pulse`` Transmit a single custom pulse as soon as the CEC bus is idle. h](j)}(h``tx-custom-pulse``h]j )}(hj h]htx-custom-pulse}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj ubah}(h]h ]h"]h$]h&]uh1jhhhMXhj ubj)}(hhh]h)}(h>Transmit a single custom pulse as soon as the CEC bus is idle.h]h>Transmit a single custom pulse as soon as the CEC bus is idle.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMXhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhhhMXhj hhubeh}(h]h ]h"]h$]h&]uh1jhj hhhhhNubeh}(h] custom-pulsesah ]h"] custom pulsesah$]h&]uh1hhhhhhhhMCubh)}(hhh](h)}(h Glitch Pulsesh]h Glitch Pulses}(hj9 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj6 hhhhhM[ubh)}(hX=This emulates what happens if the signal on the CEC line is seeing spurious pulses. Typically this happens after the falling or rising edge where there is a short voltage fluctuation that, if the CEC hardware doesn't do deglitching, can be seen as a spurious pulse and can cause a Low Drive condition or corrupt data.h]hX?This emulates what happens if the signal on the CEC line is seeing spurious pulses. Typically this happens after the falling or rising edge where there is a short voltage fluctuation that, if the CEC hardware doesn’t do deglitching, can be seen as a spurious pulse and can cause a Low Drive condition or corrupt data.}(hjG hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM]hj6 hhubj)}(hhh](j)}(h``tx-glitch-low-usecs `` This defines the duration in microseconds that the glitch pulse pulls the CEC line low. The default is 1 microsecond. The range is 0-100 microseconds. If 0, then no glitch pulse will be generated. h](j)}(h``tx-glitch-low-usecs ``h]j )}(hj^ h]htx-glitch-low-usecs }(hj` hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj\ ubah}(h]h ]h"]h$]h&]uh1jhhhMfhjX ubj)}(hhh]h)}(hThis defines the duration in microseconds that the glitch pulse pulls the CEC line low. The default is 1 microsecond. The range is 0-100 microseconds. If 0, then no glitch pulse will be generated.h]hThis defines the duration in microseconds that the glitch pulse pulls the CEC line low. The default is 1 microsecond. The range is 0-100 microseconds. If 0, then no glitch pulse will be generated.}(hjv hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMdhjs ubah}(h]h ]h"]h$]h&]uh1jhjX ubeh}(h]h ]h"]h$]h&]uh1jhhhMfhjU ubj)}(hXv``tx-glitch-high-usecs `` This defines the duration in microseconds that the glitch pulse keeps the CEC line high (unless another CEC adapter pulls it low in that time). The default is 1 microseconds. The range is 0-100 microseconds. If 0, then no glitch pulse will be generated.The total period of the glitch pulse is ``tx-custom-low-usecs + tx-custom-high-usecs``. h](j)}(h ``tx-glitch-high-usecs ``h]j )}(hj h]htx-glitch-high-usecs }(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj ubah}(h]h ]h"]h$]h&]uh1jhhhMmhj ubj)}(hhh]h)}(hXTThis defines the duration in microseconds that the glitch pulse keeps the CEC line high (unless another CEC adapter pulls it low in that time). The default is 1 microseconds. The range is 0-100 microseconds. If 0, then no glitch pulse will be generated.The total period of the glitch pulse is ``tx-custom-low-usecs + tx-custom-high-usecs``.h](hX%This defines the duration in microseconds that the glitch pulse keeps the CEC line high (unless another CEC adapter pulls it low in that time). The default is 1 microseconds. The range is 0-100 microseconds. If 0, then no glitch pulse will be generated.The total period of the glitch pulse is }(hj hhhNhNubj )}(h.``tx-custom-low-usecs + tx-custom-high-usecs``h]h*tx-custom-low-usecs + tx-custom-high-usecs}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj ubh.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMihj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhhhMmhjU hhubj)}(hO``tx-glitch-falling-edge`` Send the glitch pulse right after the falling edge. h](j)}(h``tx-glitch-falling-edge``h]j )}(hj h]htx-glitch-falling-edge}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj ubah}(h]h ]h"]h$]h&]uh1jhhhMphj ubj)}(hhh]h)}(h3Send the glitch pulse right after the falling edge.h]h3Send the glitch pulse right after the falling edge. }(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMphj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhhhMphjU hhubj)}(hL``tx-glitch-rising-edge`` Send the glitch pulse right after the rising edge.h](j)}(h``tx-glitch-rising-edge``h]j )}(hj h]htx-glitch-rising-edge}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj ubah}(h]h ]h"]h$]h&]uh1jhhhMrhj ubj)}(hhh]h)}(h2Send the glitch pulse right after the rising edge.h]h2Send the glitch pulse right after the rising edge.}(hj0 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMshj- ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhhhMrhjU hhubeh}(h]h ]h"]h$]h&]uh1jhj6 hhhhhNubeh}(h] glitch-pulsesah ]h"] glitch pulsesah$]h&]uh1hhhhhhhhM[ubeh}(h](!cec-pin-framework-error-injectionheh ]h"](!cec pin framework error injectioncec_pin_error_injeh$]h&]uh1hhhhhhhhKexpect_referenced_by_name}j^ hsexpect_referenced_by_id}hhsubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksentryfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerj error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}h]hasnameids}(j^ hj] jZ jjjj jjj j j3 j0 jU jR u nametypes}(j^ j] jjjj j3 jU uh}(hhjZ hjjj jjjj jj0 j jR j6 u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages]hsystem_message)}(hhh]h)}(hhh]h7Hyperlink target "cec-pin-error-inj" is not referenced.}hj sbah}(h]h ]h"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]levelKtypeINFOsourcehlineKuh1j uba transformerN include_log] decorationNhhub.