Succesfully transmits adc data to PC

This commit is contained in:
2025-07-02 18:53:27 +03:00
parent 9f7a38581f
commit 25742203e9
6 changed files with 2186 additions and 2193 deletions

View File

@ -57,14 +57,15 @@ uint32_t usr_in_proc_data(uint32_t* data, uint32_t size) {
/* если есть свободные дескрипторы на передачу по HDMA - ставим блок на
передачу. Иначе возвращаем 0, чтобы на обработку этих данных функцию
вызвали бы позже */
++streams_cnt[0];
for (int i = 0; i < 1024; ++i){
sport_rx_copy[i] = data[i];
}
if (hdma_send_req_rdy()) {
hdma_send_req_start(data, size, 0);
streams_cnt[0] = hdma_send_req_start(data, size, 0);
return size;
}
return 0;
@ -250,6 +251,7 @@ void usr_cmd_process(t_l502_bf_cmd *cmd) {
err_codes[0] = stream_enable(L502_STREAM_ADC | L502_STREAM_DIN); //bitmask
err_codes[1] = stream_out_preload();
err_codes[2] = streams_start();
//hdma_send_start();
l502_cmd_done(0, err_codes, 5);
break;
}