modifies initcode and libwrap for new mnrs/ehrenberg vp

This commit is contained in:
2024-02-22 17:10:49 +01:00
parent 98760929c6
commit 96fa7db587
5 changed files with 16 additions and 23 deletions

View File

@@ -8,17 +8,16 @@
#include "platform.h"
#include "stub.h"
#include "weak_under_alias.h"
ssize_t __wrap_write(int fd, const void* ptr, size_t len)
{
const uint8_t * current = (const uint8_t *)ptr;
if (isatty(fd)) {
for (size_t jj = 0; jj < len; jj++) {
#if defined(BOARD_ehrenberg)
while (uart_get_tx_free(uart)==0) ;
while (get_uart_rx_tx_reg_tx_free(uart)==0) ;
uart_write(uart, current[jj]);
if (current[jj] == '\n') {
while (uart_get_tx_free(uart)==0) ;
while (get_uart_rx_tx_reg_tx_free(uart)==0) ;
uart_write(uart, '\r');
}
#elif defined(BOARD_iss)