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.
|
|
#pragma once
#include <stdint.h>
#include "project_dep.h"
#ifdef __cplusplus
extern "C" { #endif
typedef struct { /**
* @brief ָ��SPI �ӿ� */ SPI_HandleTypeDef *spi1; SPI_HandleTypeDef *spi2;
/**
* @brief timecode���� */
xs_gpio_t timecode_add[4]; xs_gpio_t timecode_data[8];
Pin_t timecode_add_pin[4]; Pin_t timecode_data_pin[8];
Pin_t timecode_irq_pin; Pin_t camera_sync_code_irq_pin;
xs_gpio_t timecode_irq_io; xs_gpio_t camera_sync_code_irq_io;
} fpga_if_t; /**
* @brief fpga_if��ʼ�� * */ void fpga_if_init(); /**
* @brief ��ȡ��ǰtimecode * * @param timecode0 * @param timecode1 */ void fpga_if_get_timecode(uint32_t *timecode0, uint32_t *timecode1); /**
* @brief SPI�Ĵ���дָ��_01 FPGA�Ĵ�����дSPI * * @param add * @param txdata * @param rxdata */ void fpga_if_spi_write_data_01(uint32_t add, uint32_t txdata, uint32_t *rxdata); /**
* @brief SPI�Ĵ�����ָ�� FPGA�Ĵ�����дSPI * * @param add * @param rxdata */ void fpga_if_spi_read_data_01(uint32_t add, uint32_t *rxdata);
/**
* @brief SPI�Ĵ���дָ�� FPGA����SPI * * @param add * @param txdata * @param rxdata */ void fpga_if_spi_write_data_02(uint32_t add, uint32_t txdata, uint32_t *rxdata); /**
* @brief SPI�Ĵ�����ָ�� FPGA����SPI * * @param add * @param rxdata */ void fpga_if_spi_read_data_02(uint32_t add, uint32_t *rxdata);
fpga_if_t *fpga_if_get_instance();
#ifdef __cplusplus
} #endif
|