infrared.h 438 B

1234567891011121314151617
  1. /*
  2. * (c) Philippe G. 2019, philippe_44@outlook.com
  3. *
  4. * This software is released under the MIT License.
  5. * https://opensource.org/licenses/MIT
  6. *
  7. */
  8. #pragma once
  9. #include <stdint.h>
  10. #include "freertos/FreeRTOS.h"
  11. #include "freertos/ringbuf.h"
  12. typedef void (*infrared_handler)(uint16_t addr, uint16_t cmd);
  13. void infrared_receive(RingbufHandle_t rb, infrared_handler handler);
  14. void infrared_init(RingbufHandle_t *rb, int gpio);