flipperzero_sys

Function infrared_encode

Source
pub unsafe extern "C" fn infrared_encode(
    handler: *mut InfraredEncoderHandler,
    duration: *mut u32,
    level: *mut bool,
) -> InfraredStatus
Expand description

Encode previously set INFRARED message. Usage:

  1. alloc with infrared_alloc_encoder()
  2. set message to encode with infrared_reset_encoder()
  3. call for infrared_encode() to continuously get one at a time timings.
  4. when infrared_encode() returns InfraredStatusDone, it means new message is fully encoded.
  5. to encode additional timings, just continue calling infrared_encode().

§Arguments

  • handler (direction in) - - handler to INFRARED encoder. Should be acquired with infrared_alloc_encoder().
  • duration (direction out) - - encoded timing.
  • level (direction out) - - encoded level.

§Returns

status of encode operation.