copy from dualboots_Gai_youhua_anbang_tag/keil/customboot/include/drivers/mk_radar.c
copy to dualboots_Gai_youhua/keil/secondboot/include/drivers/mk_radar.c
文件从 dualboots_Gai_youhua_anbang_tag/keil/customboot/include/drivers/mk_radar.c 复制 |
| | |
| | | for (uint32_t i = 0; i < pulse_period_points; i++) |
| | | { |
| | | uint32_t idx = ((pulse_period_points - calibration_peak_idx + i) > (pulse_period_points - 1)) ? (i - calibration_peak_idx) |
| | | : (pulse_period_points - calibration_peak_idx + i); |
| | | : (pulse_period_points - calibration_peak_idx + i); |
| | | |
| | | data_out[idx * 2] = period_samples_out[i * 2]; |
| | | data_out[idx * 2 + 1] = period_samples_out[i * 2 + 1]; |
| | |
| | | for (uint32_t i = 0; i < pulse_period_points; i++) |
| | | { |
| | | uint32_t idx = ((pulse_period_points - calibration_peak_idx + i) > (pulse_period_points - 1)) ? (i - calibration_peak_idx) |
| | | : (pulse_period_points - calibration_peak_idx + i); |
| | | : (pulse_period_points - calibration_peak_idx + i); |
| | | |
| | | data_out[idx * 2] = period_samples_out[i * 2]; |
| | | data_out[idx * 2 + 1] = period_samples_out[i * 2 + 1]; |
| | |
| | | |
| | | switch (default_radar_cfg.pulse_period) |
| | | { |
| | | case UWB_RADAR_PULSE_PERIOD_16NS: |
| | | sts_key = 0x00000000; |
| | | break; |
| | | case UWB_RADAR_PULSE_PERIOD_16NS: |
| | | sts_key = 0x00000000; |
| | | break; |
| | | |
| | | case UWB_RADAR_PULSE_PERIOD_32NS: |
| | | sts_key = 0x55555555; |
| | | break; |
| | | case UWB_RADAR_PULSE_PERIOD_32NS: |
| | | sts_key = 0x55555555; |
| | | break; |
| | | |
| | | case UWB_RADAR_PULSE_PERIOD_64NS: |
| | | sts_key = 0xEEEEEEEE; |
| | | break; |
| | | case UWB_RADAR_PULSE_PERIOD_64NS: |
| | | sts_key = 0xEEEEEEEE; |
| | | break; |
| | | |
| | | case UWB_RADAR_PULSE_PERIOD_128NS: |
| | | sts_key = 0xFEFEFEFE; |
| | | break; |
| | | case UWB_RADAR_PULSE_PERIOD_128NS: |
| | | sts_key = 0xFEFEFEFE; |
| | | break; |
| | | |
| | | case UWB_RADAR_PULSE_PERIOD_256NS: |
| | | sts_key = 0xFFFEFFFE; |
| | | break; |
| | | case UWB_RADAR_PULSE_PERIOD_256NS: |
| | | sts_key = 0xFFFEFFFE; |
| | | break; |
| | | } |
| | | |
| | | /**************************************SYS RADIO REG*********************************************/ |