40 lines
1 KiB
Rust
40 lines
1 KiB
Rust
use servicepoint::{ClearCommand, FadeOutCommand, HardResetCommand};
|
|
|
|
macro_rules! wrap_cc_only {
|
|
($(#[$meta:meta])* $command:ident) => {
|
|
::paste::paste!{
|
|
$crate::macros::wrap!{
|
|
[< $command Command >] {
|
|
derives: $crate::commands::derive_command[$command];
|
|
functions:
|
|
$(#[$meta])*
|
|
///
|
|
#[doc = " Returns: a new [`" [< $command Command >] "`] instance."]
|
|
fn new() -> move ::core::ptr::NonNull<[< $command Command >]> {
|
|
[< $command Command >]
|
|
};
|
|
}
|
|
}
|
|
}
|
|
};
|
|
}
|
|
|
|
wrap_cc_only!(
|
|
/// Set all pixels to the off state.
|
|
///
|
|
/// Does not affect brightness.
|
|
Clear
|
|
);
|
|
|
|
wrap_cc_only!(
|
|
/// Kills the udp daemon on the display, which usually results in a restart.
|
|
///
|
|
/// Please do not send this in your normal program flow.
|
|
HardReset
|
|
);
|
|
|
|
wrap_cc_only!(
|
|
/// A yet-to-be-tested command.
|
|
FadeOut
|
|
);
|