printer_receive.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. #ifndef PRINTER_RECEIVE_H
  2. #define PRINTER_RECEIVE_H
  3. #pragma once
  4. /**
  5. * Start a printer instance in receive mode
  6. *
  7. * Allows devices to send image data to the flipper
  8. *
  9. * @note Once printer_receive_start() is called, some printer instance settings
  10. * can no longer be modified, e.g. the Game Boy Link pinout.
  11. *
  12. * @param printer_handle Printer instance handle
  13. */
  14. void printer_receive_start(void *printer_handle);
  15. /**
  16. * Mark a received print as printed/completed
  17. *
  18. * Once a print command is actually received, the printer instance callback
  19. * is called with the print reason. The printer instance will continually
  20. * report that it is in the printing state until this function is called.
  21. * At which time, the image is considered printed, and this updated status
  22. * is returned on the next status check.
  23. *
  24. * @warning Once this function is called, the struct gb_image pointer given to the
  25. * printer instance callback should be considered no longer valid! It is advised
  26. * complete operations on the struct gb_image (or copy its contents to another
  27. * buffer) before calling this function.
  28. *
  29. * @param printer_handle Printer instance handle
  30. */
  31. void printer_receive_print_complete(void *printer_handle);
  32. #endif // PRINTER_RECEIVE_H