]> wirehaze git hosting - ppos.git/blob - ppos/hardware/serial.h

wirehaze git hosting

tasks implementation (ongoing)
[ppos.git] / ppos / hardware / serial.h
1 // PingPongOS - PingPong Operating System
2 // Prof. Carlos A. Maziero, DINF UFPR
3 // Versão 2.0 -- Junho de 2025
4
5 // ATENÇÃO: ESTE ARQUIVO NÃO DEVE SER ALTERADO;
6 // ALTERAÇÕES SERÃO DESCARTADAS NA CORREÇÃO.
7
8 // Emula uma porta serial com operações de E/S de caracteres,
9 // que normalmente corresponde a um terminal de texto acessível
10 // através de uma UART.
11
12 #ifndef __HW_SERIAL__
13 #define __HW_SERIAL__
14
15 // Inicia a porta serial.
16 // Return: NOERROR or ERROR.
17 int hw_serial_init ();
18
19 // Envia um caractere à interface serial.
20 // Return: NOERROR ou ERROR.
21 int hw_serial_put (char c);
22
23 // Recebe um caractere da interface serial (não bloqueante).
24 // Return: caractere ASCII ou 0 se não há nada a ser lido.
25 char hw_serial_get ();
26
27 #endif