irda_transmit.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #include <api-hal-irda.h>
  2. #include <irda.h>
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. /**
  7. * Send message over IRDA.
  8. *
  9. * \param[in] message - message to send.
  10. * \param[in] times - number of times message should be sent.
  11. */
  12. void irda_send(const IrdaMessage* message, int times);
  13. /**
  14. * Send raw data through infrared port.
  15. *
  16. * \param[in] timings - array of timings to send.
  17. * \param[in] timings_cnt - timings array size.
  18. * \param[in] start_from_mark - true if timings starts from mark,
  19. * otherwise from space
  20. */
  21. void irda_send_raw(const uint32_t timings[], uint32_t timings_cnt, bool start_from_mark);
  22. /**
  23. * Send raw data through infrared port, with additional settings.
  24. *
  25. * \param[in] timings - array of timings to send.
  26. * \param[in] timings_cnt - timings array size.
  27. * \param[in] start_from_mark - true if timings starts from mark,
  28. * otherwise from space
  29. * \param[in] duty_cycle - duty cycle to generate on PWM
  30. * \param[in] frequency - frequency to generate on PWM
  31. */
  32. void irda_send_raw_ext(const uint32_t timings[], uint32_t timings_cnt, bool start_from_mark, float duty_cycle, float frequency);
  33. #ifdef __cplusplus
  34. }
  35. #endif