driver-bigpic.h 916 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * Copyright 2013 DI Andreas Auer
  3. *
  4. * This program is free software; you can redistribute it and/or modify it
  5. * under the terms of the GNU General Public License as published by the Free
  6. * Software Foundation; either version 3 of the License, or (at your option)
  7. * any later version. See COPYING for more details.
  8. *
  9. * Created on: 09.10.2013
  10. * Author: DI Andreas Auer
  11. * Mail: aauer1@gmail.com
  12. */
  13. #ifndef BFG_DRIVER_BIGPIC_H
  14. #define BFG_DRIVER_BIGPIC_H
  15. #define BPM_BAUD 115200
  16. struct bigpic_identity
  17. {
  18. uint8_t version;
  19. char product[8];
  20. uint32_t serial;
  21. } __attribute__((packed));
  22. struct bigpic_state
  23. {
  24. uint8_t state;
  25. uint8_t switched;
  26. uint32_t nonce;
  27. } __attribute__((packed));
  28. struct bigpic_info
  29. {
  30. uint32_t baud;
  31. struct bigpic_identity id;
  32. struct work *work;
  33. struct work *prev_work[2];
  34. char rx_buffer[1024];
  35. uint32_t rx_len;
  36. };
  37. #endif /* DRIVER_S6LX75_H_ */