Skip to content

Commit e99154e

Browse files
committed
ethernet write copy buffer
1 parent e5e2c5b commit e99154e

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

src/eez/apps/psu/scpi/display.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,6 @@ scpi_result_t scpi_cmd_displayWindowTextClear(scpi_t *context) {
173173
#endif
174174
}
175175

176-
uint8_t g_line[10][480 * 3];
177-
178176
scpi_result_t scpi_cmd_displayDataQ(scpi_t *context) {
179177
// TODO migrate to generic firmware
180178
#if OPTION_DISPLAY
@@ -223,10 +221,9 @@ scpi_result_t scpi_cmd_displayDataQ(scpi_t *context) {
223221

224222
mcu::display::screanshotBegin();
225223

226-
int i = 0;
227-
while (mcu::display::screanshotGetLine(g_line[i])) {
228-
SCPI_ResultArbitraryBlockData(context, g_line[i], sizeof(g_line[i]));
229-
i = (i + 1) % 10;
224+
uint8_t line[480 * 3];
225+
while (mcu::display::screanshotGetLine(line)) {
226+
SCPI_ResultArbitraryBlockData(context, line, sizeof(line));
230227
}
231228

232229
mcu::display::screanshotEnd();

src/eez/modules/mcu/stm32/ethernet.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ void releaseInputBuffer() {
251251
}
252252

253253
int writeBuffer(const char *buffer, uint32_t length) {
254-
netconn_write(g_tcpClientConnection, (void *)buffer, (uint16_t)length, NETCONN_NOCOPY);
254+
netconn_write(g_tcpClientConnection, (void *)buffer, (uint16_t)length, NETCONN_COPY);
255255
return length;
256256
}
257257

0 commit comments

Comments
 (0)