Implement full SSD1306 OLED display support: - Splash screen on boot (1.5s) with project name, version, board - Dashboard showing radio state, config, counters, RSSI/SNR - RSSI history sparkline (64-sample ring buffer, 2px-wide bars) - DisplayOn/DisplayOff host commands routed via dedicated channel - Pure render functions against generic DrawTarget (no hardware coupling) - Display on/off control bypasses radio task entirely Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
27 lines
946 B
Markdown
27 lines
946 B
Markdown
## Linking for Windows
|
|
|
|
The [windows-link](https://crates.io/crates/windows-link) crate provides the `link` macro that simplifies linking. The `link` macro is much the same as the one provided by [windows-targets](https://crates.io/crates/windows-targets) but uses `raw-dylib` and thus does not require import lib files.
|
|
|
|
* [Getting started](https://kennykerr.ca/rust-getting-started/)
|
|
* [Samples](https://github.com/microsoft/windows-rs/tree/master/crates/samples)
|
|
* [Releases](https://github.com/microsoft/windows-rs/releases)
|
|
|
|
Start by adding the following to your Cargo.toml file:
|
|
|
|
```toml
|
|
[dependencies.windows-link]
|
|
version = "0.2"
|
|
```
|
|
|
|
Use the `link` macro to define the external functions you wish to call:
|
|
|
|
```rust
|
|
windows_link::link!("kernel32.dll" "system" fn SetLastError(code: u32));
|
|
windows_link::link!("kernel32.dll" "system" fn GetLastError() -> u32);
|
|
|
|
unsafe {
|
|
SetLastError(1234);
|
|
assert_eq!(GetLastError(), 1234);
|
|
}
|
|
```
|