sp_cmd_brightness_global_get returns value
This commit is contained in:
parent
c9d2479f5e
commit
01b3169020
5 changed files with 161 additions and 29 deletions
|
@ -52,6 +52,6 @@ pub unsafe extern "C" fn sp_cmd_brightness_global_set(
|
|||
#[no_mangle]
|
||||
pub unsafe extern "C" fn sp_cmd_brightness_global_get(
|
||||
mut command: NonNull<GlobalBrightnessCommand>,
|
||||
) -> *mut Brightness {
|
||||
unsafe { &mut command.as_mut().brightness }
|
||||
) -> Brightness {
|
||||
unsafe { command.as_mut().brightness }
|
||||
}
|
||||
|
|
|
@ -45,7 +45,9 @@ pub struct UdpSocket;
|
|||
pub struct DisplayBitVec;
|
||||
|
||||
#[cfg(feature = "env_logger")]
|
||||
pub mod feature_env_logger {
|
||||
mod feature_env_logger {
|
||||
/// Call this function at the beginning of main to enable rust logging controlled by the
|
||||
/// `RUST_LOG` environment variable. See [env_logger](https://docs.rs/env_logger/latest/env_logger/).
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn init_env_logger() {
|
||||
env_logger::init();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue