Ns16550a
⌨️ RISC-V NS16550A UART driver
Install / Use
/learn @safinsingh/Ns16550aREADME
ns16550a
RISC-V NS16550A UART driver
Example
Example usage:
extern void uart_init(void);
extern void uart_putc(unsigned char);
extern unsigned char uart_getc(void);
void uart_puts(char* str) {
while (*str) uart_putc(*str++);
uart_putc('\n');
}
int main() {
uart_init();
uart_puts("Hello from bare-metal RISC-V!");
uart_puts("Type something and it'll show up!");
for (;;) {
// ideally, this should be handled by an interrupt.
// this library configures the UART so that it emits
// one when it's ready to read from.
char c = uart_getc();
if (c == 10 || c == 13) uart_putc('\n');
else
uart_putc(c);
}
}
Related Skills
node-connect
348.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
108.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
348.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
348.0kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
