helge
2021-11-04 ab7afae2a81c35d61d7c9cb6c6cc216180bb4524
move port number definitions to header
2个文件已修改
13 ■■■■ 已修改文件
examples/test-LwIP-netconn/scpi_server.c 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
examples/test-LwIP-netconn/scpi_server.h 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
examples/test-LwIP-netconn/scpi_server.c
@@ -49,10 +49,6 @@
#include "lwip/tcp.h"
#include "lwip/inet.h"
#define DEVICE_PORT 5025
#define CONTROL_PORT 5026
#define SCPI_THREAD_PRIO (tskIDLE_PRIORITY + 2)
#define SCPI_MSG_TIMEOUT                0
@@ -152,7 +148,7 @@
}
scpi_result_t SCPI_SystemCommTcpipControlQ(scpi_t * context) {
    SCPI_ResultInt(context, CONTROL_PORT);
    SCPI_ResultInt(context, SCPI_CONTROL_PORT);
    return SCPI_RES_OK;
}
@@ -379,10 +375,10 @@
    scpi_context.user_context = &user_data;
    user_data.io_listen = createServer(DEVICE_PORT);
    user_data.io_listen = createServer(SCPI_DEVICE_PORT);
    LWIP_ASSERT("user_data.io_listen != NULL", user_data.io_listen != NULL);
    user_data.control_io_listen = createServer(CONTROL_PORT);
    user_data.control_io_listen = createServer(SCPI_CONTROL_PORT);
    LWIP_ASSERT("user_data.control_io_listen != NULL", user_data.control_io_listen != NULL);
    while (1) {
examples/test-LwIP-netconn/scpi_server.h
@@ -32,6 +32,9 @@
extern "C" {
#endif
#define SCPI_DEVICE_PORT  5025 // scpi-raw standard port
#define SCPI_CONTROL_PORT 5026 // libscpi control port (not part of the standard)
#include <stdint.h>
void scpi_server_init(void);