driver-bf1.h 609 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * driver-s6lx75.h
  3. *
  4. * Created on: 09.06.2013
  5. * Author: andreas
  6. */
  7. #ifndef DRIVER_BF1_H_
  8. #define DRIVER_BF1_H_
  9. #define BF1_BAUD 115200
  10. struct BF1Identity
  11. {
  12. uint8_t version;
  13. char product[8];
  14. uint32_t serial;
  15. } __attribute__((packed));
  16. struct BF1State
  17. {
  18. uint8_t state;
  19. uint8_t switched;
  20. uint32_t nonce;
  21. } __attribute__((packed));
  22. struct BF1HashData
  23. {
  24. uint32_t golden_nonce;
  25. uint32_t nonce;
  26. };
  27. struct BF1Info
  28. {
  29. uint32_t baud;
  30. struct BF1Identity id;
  31. struct work *work;
  32. struct work *prev_work;
  33. char rx_buffer[1024];
  34. uint32_t rx_len;
  35. };
  36. #endif /* DRIVER_S6LX75_H_ */