You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

72 lines
1.2 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
11 months ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. #pragma once
  2. #include <stdint.h>
  3. #include "project_dep.h"
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7. typedef struct {
  8. /**
  9. * @brief ָSPI ӿ
  10. */
  11. SPI_HandleTypeDef *spi2;
  12. /**
  13. * @brief timecode
  14. */
  15. xs_gpio_t timecode_add[4];
  16. xs_gpio_t timecode_data[8];
  17. Pin_t timecode_add_pin[4];
  18. Pin_t timecode_data_pin[8];
  19. Pin_t timecode_irq_pin;
  20. Pin_t camera_sync_code_irq_pin;
  21. Pin_t xsync_workstate_start_sig_irq_io_pin;
  22. Pin_t reset_pin;
  23. xs_gpio_t timecode_irq_io;
  24. xs_gpio_t camera_sync_code_irq_io;
  25. xs_gpio_t xsync_workstate_start_sig_irq_io;
  26. xs_gpio_t reset_pin_io;
  27. } fpga_if_t;
  28. /**
  29. * @brief fpga_ifʼ
  30. *
  31. */
  32. void fpga_if_init();
  33. /**
  34. * @brief ȡǰtimecode
  35. *
  36. * @param timecode0
  37. * @param timecode1
  38. */
  39. void fpga_if_get_timecode(uint32_t *timecode0, uint32_t *timecode1);
  40. /**
  41. * @brief SPIĴдָ FPGASPI
  42. *
  43. * @param add
  44. * @param txdata
  45. * @param rxdata
  46. */
  47. void fpga_if_spi_write_data_02(uint32_t add, uint32_t txdata, uint32_t *rxdata);
  48. /**
  49. * @brief SPIĴָ FPGASPI
  50. *
  51. * @param add
  52. * @param rxdata
  53. */
  54. void fpga_if_spi_read_data_02(uint32_t add, uint32_t *rxdata);
  55. void fpga_if_get_record_state(uint32_t *workstate);
  56. fpga_if_t *fpga_if_get_instance();
  57. #ifdef __cplusplus
  58. }
  59. #endif