esplink.h 641 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * Common header file for ESP32 and RV32 sides of link
  3. */
  4. #ifndef ESPLINK_H
  5. #define ESPLINK_H 1
  6. #include <inttypes.h>
  7. #include <stddef.h>
  8. #define FPGA_HDR_ADDR 0x40000000
  9. #define DRAM_IO_MAGIC 0x3648dec4
  10. struct dram_io_head {
  11. uint32_t magic;
  12. size_t hlen;
  13. void *dptr;
  14. size_t dlen;
  15. struct {
  16. union {
  17. uint32_t cfg;
  18. struct {
  19. uint8_t fixes;
  20. uint8_t minor;
  21. uint8_t major;
  22. uint8_t fpga;
  23. };
  24. };
  25. } board;
  26. const char *signature;
  27. size_t signature_len;
  28. uint32_t resv[9];
  29. };
  30. #define RV_IRQ_UNDERRUN 0
  31. #define RV_IRQ_HELLO 1
  32. #define ESP_IRQ_READY 1
  33. #endif