{"id":22911258,"url":"https://github.com/rust-osdev/uart_16550","last_synced_at":"2025-04-12T20:42:24.701Z","repository":{"id":34635398,"uuid":"180991523","full_name":"rust-osdev/uart_16550","owner":"rust-osdev","description":"Minimal support for uart_16550 serial output.","archived":false,"fork":false,"pushed_at":"2024-11-13T13:58:26.000Z","size":97,"stargazers_count":36,"open_issues_count":8,"forks_count":26,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-04T00:08:21.790Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rust-osdev.png","metadata":{"files":{"readme":"README.md","changelog":"Changelog.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-04-12T11:06:47.000Z","updated_at":"2025-02-28T12:22:48.000Z","dependencies_parsed_at":"2024-06-20T00:08:22.717Z","dependency_job_id":"6ec16eef-ee03-46ba-8086-f4fca522ccfb","html_url":"https://github.com/rust-osdev/uart_16550","commit_stats":{"total_commits":104,"total_committers":13,"mean_commits":8.0,"dds":0.25,"last_synced_commit":"378d468b5f80effc0b53f537fabc2fd73d16449e"},"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-osdev%2Fuart_16550","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-osdev%2Fuart_16550/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-osdev%2Fuart_16550/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-osdev%2Fuart_16550/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rust-osdev","download_url":"https://codeload.github.com/rust-osdev/uart_16550/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248631669,"owners_count":21136554,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-14T04:15:55.063Z","updated_at":"2025-04-12T20:42:24.673Z","avatar_url":"https://github.com/rust-osdev.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"# uart_16550\n\n[![Build Status](https://github.com/rust-osdev/uart_16550/workflows/Build/badge.svg)](https://github.com/rust-osdev/uart_16550/actions?query=workflow%3ABuild) [![Docs.rs Badge](https://docs.rs/uart_16550/badge.svg)](https://docs.rs/uart_16550/)\n\nMinimal support for [serial communication](https://en.wikipedia.org/wiki/Asynchronous_serial_communication) through [UART](https://en.wikipedia.org/wiki/Universal_asynchronous_receiver-transmitter) devices, which are compatible to the [16550 UART](https://en.wikipedia.org/wiki/16550_UART). This crate supports I/O port-mapped (x86 only) and memory-mapped UARTS.\n\n## Usage\n\nDepending on the system architecture, the UART can be either accessed through [port-mapped I/O](https://wiki.osdev.org/Port_IO) or [memory-mapped I/O](https://en.wikipedia.org/wiki/Memory-mapped_I/O).\n\n### With port-mappd I/O\n\nThe UART is accessed through port-mapped I/O on architectures such as `x86_64`. On these architectures, the [`SerialPort`](https://docs.rs/uart_16550/~0.2/uart_16550/struct.SerialPort.html) type can be used:\n\n\n```rust\nuse uart_16550::SerialPort;\n\nconst SERIAL_IO_PORT: u16 = 0x3F8;\n\nlet mut serial_port = unsafe { SerialPort::new(SERIAL_IO_PORT) };\nserial_port.init();\n\n// Now the serial port is ready to be used. To send a byte:\nserial_port.send(42);\n\n// To receive a byte:\nlet data = serial_port.receive();\n```\n\n### With memory mapped serial port\n\nMost other architectures, such as [RISC-V](https://en.wikipedia.org/wiki/RISC-V), use memory-mapped I/O for accessing the UARTs. On these architectures, the [`MmioSerialPort`](https://docs.rs/uart_16550/~0.2/uart_16550/struct.MmioSerialPort.html) type can be used:\n\n```rust\nuse uart_16550::MmioSerialPort;\n\nconst SERIAL_PORT_BASE_ADDRESS: usize = 0x1000_0000;\n\nlet mut serial_port = unsafe { MmioSerialPort::new(SERIAL_PORT_BASE_ADDRESS) };\nserial_port.init();\n\n// Now the serial port is ready to be used. To send a byte:\nserial_port.send(42);\n\n// To receive a byte:\nlet data = serial_port.receive();\n```\n\n## Building with stable rust\n\nThis needs to have the [compile-time requirements](https://github.com/alexcrichton/cc-rs#compile-time-requirements) of the `cc` crate installed on your system.\nIt was currently only tested on Linux and MacOS.\n\n## License\n\nLicensed under the MIT license ([LICENSE](LICENSE) or \u003chttp://opensource.org/licenses/MIT\u003e).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frust-osdev%2Fuart_16550","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frust-osdev%2Fuart_16550","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frust-osdev%2Fuart_16550/lists"}