Function flipper0::ffi::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 \c infrared_alloc_encoder()
  2. set message to encode with \c infrared_reset_encoder()
  3. call for \c infrared_encode() to continuously get one at a time timings.
  4. when \c infrared_encode() returns InfraredStatusDone, it means new message is fully encoded.
  5. to encode additional timings, just continue calling \c infrared_encode().

\param[in] handler - handler to INFRARED encoder. Should be acquired with \c infrared_alloc_encoder(). \param[out] duration - encoded timing. \param[out] level - encoded level.

\return status of encode operation.