Make Uart driver universal

This commit is contained in:
2020-02-24 18:50:09 +01:00
parent 4bc85d474f
commit 5012b726cd
6 changed files with 208 additions and 104 deletions

View File

@@ -27,6 +27,8 @@
#include <stdlib.h>
#include <float.h>
extern struct stm_uart shell_uart;
void calibration_calculate(float low_measured, float low_setpoint, float high_measured, float high_setpoint,
float *sens_deviation, float *sens_corrected_offset)
{
@@ -110,7 +112,7 @@ static void wait_for_uart_enter()
int uart_recv_status;
do {
uart_recv_status = uart_receive_data_with_dma(&recv_data, &recv_len);
uart_recv_status = uart_receive_data_with_dma(&shell_uart, &recv_data, &recv_len);
if (uart_recv_status >= 1) {
for (iter = 0; iter < recv_len; iter++) {
if (recv_data[iter] == '\n' || recv_data[iter] == '\r')