Skip to content

Commit

Permalink
ethernet write copy buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
mvladic committed Jul 16, 2019
1 parent e5e2c5b commit e99154e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
9 changes: 3 additions & 6 deletions src/eez/apps/psu/scpi/display.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,6 @@ scpi_result_t scpi_cmd_displayWindowTextClear(scpi_t *context) {
#endif
}

uint8_t g_line[10][480 * 3];

scpi_result_t scpi_cmd_displayDataQ(scpi_t *context) {
// TODO migrate to generic firmware
#if OPTION_DISPLAY
Expand Down Expand Up @@ -223,10 +221,9 @@ scpi_result_t scpi_cmd_displayDataQ(scpi_t *context) {

mcu::display::screanshotBegin();

int i = 0;
while (mcu::display::screanshotGetLine(g_line[i])) {
SCPI_ResultArbitraryBlockData(context, g_line[i], sizeof(g_line[i]));
i = (i + 1) % 10;
uint8_t line[480 * 3];
while (mcu::display::screanshotGetLine(line)) {
SCPI_ResultArbitraryBlockData(context, line, sizeof(line));
}

mcu::display::screanshotEnd();
Expand Down
2 changes: 1 addition & 1 deletion src/eez/modules/mcu/stm32/ethernet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ void releaseInputBuffer() {
}

int writeBuffer(const char *buffer, uint32_t length) {
netconn_write(g_tcpClientConnection, (void *)buffer, (uint16_t)length, NETCONN_NOCOPY);
netconn_write(g_tcpClientConnection, (void *)buffer, (uint16_t)length, NETCONN_COPY);
return length;
}

Expand Down

0 comments on commit e99154e

Please sign in to comment.