driver-bigpic.h 464 B

123456789101112131415161718192021222324252627282930313233
  1. #ifndef BFG_DRIVER_BIGPIC_H
  2. #define BFG_DRIVER_BIGPIC_H
  3. #include <stdint.h>
  4. #define BPM_BAUD 115200
  5. struct bigpic_identity
  6. {
  7. uint8_t version;
  8. char product[8];
  9. uint32_t serial;
  10. } __attribute__((packed));
  11. struct bigpic_state
  12. {
  13. uint8_t state;
  14. uint8_t switched;
  15. uint32_t nonce;
  16. } __attribute__((packed));
  17. struct bigpic_info
  18. {
  19. uint32_t baud;
  20. struct bigpic_identity id;
  21. char tx_buffer[45];
  22. char rx_buffer[1024];
  23. uint32_t rx_len;
  24. };
  25. #endif