summaryrefslogtreecommitdiffstats
path: root/device/uart.c
blob: 5c652079dfd7c5407d6702a38aca93125fef12cd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include "device/uart.h"
#include "device/portio_uart.h"
#include "object.h"

void
uart_write(objdir_t *dir, path_byte_t *path, const char *s, size_t w)
{
    objdir_entry_t *entry = objdir_seek(dir, path, 1);
    if(entry == NULL || entry->type != KO_DEV_UART) return;

#ifdef ENABLE_PORTIO_UART
    portio_uart_write(entry->data, s, w);
#endif
}