1/*
2 * Copyright 2018, Data61
3 * Commonwealth Scientific and Industrial Research Organisation (CSIRO)
4 * ABN 41 687 119 230.
5 *
6 * This software may be distributed and modified according to the terms of
7 * the BSD 2-Clause license. Note that NO WARRANTY is provided.
8 * See "LICENSE_BSD2.txt" for details.
9 *
10 * @TAG(DATA61_BSD)
11 */
12#pragma once
13
14#include <platsupport/chardev.h>
15#include <platsupport/io.h>
16
17typedef void (*handle_char_fn)(uint8_t);
18
19void plat_pre_init(ps_io_ops_t *io_ops);
20/* Definition located at plat/${KernelPlatform}/plat.c */
21void plat_post_init(ps_irq_ops_t *irq_ops);
22void plat_serial_interrupt(handle_char_fn handle_char);
23void plat_serial_putchar(int c);
24ssize_t plat_serial_read(void *buf, size_t buf_size, chardev_callback_t cb, void *token);
25ssize_t plat_serial_write(void *buf, size_t buf_size, chardev_callback_t cb, void *token);
26