|
@@ -9,12 +9,14 @@
|
|
* XX.XX.XXXX 1.0.0 Telenkov D.A. First release.
|
|
* XX.XX.XXXX 1.0.0 Telenkov D.A. First release.
|
|
*******************************************************************************
|
|
*******************************************************************************
|
|
*/
|
|
*/
|
|
|
|
+#include "common_config.h"
|
|
#include "stm32f4xx.h"
|
|
#include "stm32f4xx.h"
|
|
#include "commands_api.h"
|
|
#include "commands_api.h"
|
|
#include "settings_api.h"
|
|
#include "settings_api.h"
|
|
#include "sys_api.h"
|
|
#include "sys_api.h"
|
|
#include "buttons.h"
|
|
#include "buttons.h"
|
|
#include "led.h"
|
|
#include "led.h"
|
|
|
|
+#include "usart.h"
|
|
#include "parameters.h"
|
|
#include "parameters.h"
|
|
#include "bt_6701_settings.h"
|
|
#include "bt_6701_settings.h"
|
|
#include "bt_6701_commands.h"
|
|
#include "bt_6701_commands.h"
|
|
@@ -23,6 +25,7 @@
|
|
#include "http_server.h"
|
|
#include "http_server.h"
|
|
#include "config_service.h"
|
|
#include "config_service.h"
|
|
#include "rtc.h"
|
|
#include "rtc.h"
|
|
|
|
+#include "port_microrl.h"
|
|
|
|
|
|
#include "FreeRTOS.h"
|
|
#include "FreeRTOS.h"
|
|
#include "task.h"
|
|
#include "task.h"
|
|
@@ -59,6 +62,7 @@ bool testRtc = false;
|
|
bool testSerno = false;
|
|
bool testSerno = false;
|
|
bool testT2Ready = false;
|
|
bool testT2Ready = false;
|
|
bool testSet = false;
|
|
bool testSet = false;
|
|
|
|
+bool testRS485 = false;
|
|
|
|
|
|
#define MSG_LEN 300
|
|
#define MSG_LEN 300
|
|
char msg[MSG_LEN];
|
|
char msg[MSG_LEN];
|
|
@@ -196,7 +200,22 @@ void TEST_SetTest(TEST_t state)
|
|
if (state == TEST_WAIT)
|
|
if (state == TEST_WAIT)
|
|
testState = state;
|
|
testState = state;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+#ifdef PORTGW_ENABLE
|
|
|
|
+/**
|
|
|
|
+ * @brief Отправка данных по интерфейсу RS485
|
|
|
|
+ */
|
|
|
|
+void COM_TestRS485(char *str, uint8_t len)
|
|
|
|
+{
|
|
|
|
+ if (str) {
|
|
|
|
+ uint8_t sent = rs485_send_block((uint8_t *)str, len);
|
|
|
|
+ sprintf(msg, "RS485 sent %d bytes", sent);
|
|
|
|
+ print(msg);
|
|
|
|
+ }
|
|
|
|
+ print("\r\n");
|
|
|
|
+ testRS485 = false;
|
|
|
|
+ return;
|
|
|
|
+}
|
|
|
|
+#endif
|
|
/**
|
|
/**
|
|
* @brief Считать статут тестирования (T0, T1, etc)
|
|
* @brief Считать статут тестирования (T0, T1, etc)
|
|
*/
|
|
*/
|