|
|
@ -20,8 +20,8 @@ void fpga_if_init() { // |
|
|
|
*/ |
|
|
|
|
|
|
|
/** |
|
|
|
* @brief |
|
|
|
* |
|
|
|
* @brief |
|
|
|
* |
|
|
|
* CPOL:1 |
|
|
|
* CPHA:1 |
|
|
|
* LSB-FIRST |
|
|
@ -48,6 +48,16 @@ void fpga_if_init() { // |
|
|
|
xs_delay_ms(10); |
|
|
|
xs_gpio_write(&fpga_if.reset_pin_io, true); |
|
|
|
#endif |
|
|
|
|
|
|
|
while (true) { |
|
|
|
ZLOGI(TAG, "waiting for fpga init....."); |
|
|
|
uint32_t rxdata =0; |
|
|
|
fpga_if_spi_read_data_02(REGADDOFF__FPGA_INFO, &rxdata); |
|
|
|
if (rxdata == REGADDOFF__FPGA_INFO) { |
|
|
|
break; |
|
|
|
} |
|
|
|
osDelay(100); |
|
|
|
} |
|
|
|
} |
|
|
|
void fpga_if_get_timecode(uint32_t *timecode0, uint32_t *timecode1) { |
|
|
|
fpga_if_spi_read_data_02(sys_timecode_data0, timecode0); |
|
|
|