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().

Returns:

  • status of encode operation.

Arguments

  • handler - [Direction: In] - handler to INFRARED encoder. Should be acquired with \c infrared_alloc_encoder().
  • duration - [Direction: In, Out] - encoded timing.
  • level - [Direction: In, Out] - encoded level.