rmk 0.9.0

Keyboard firmware written in Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//! Connection related events
//!
//! Single event published whenever the `ConnectionStatus` changes

use rmk_macro::event;
pub use rmk_types::connection::{ConnectionStatus, ConnectionType};

/// `ConnectionStatus` changed event. Fires from `state::update_status` whenever
/// the connection status updates
#[event(channel_size = crate::CONNECTION_STATUS_CHANGE_EVENT_CHANNEL_SIZE, pubs = crate::CONNECTION_STATUS_CHANGE_EVENT_PUB_SIZE, subs = crate::CONNECTION_STATUS_CHANGE_EVENT_SUB_SIZE)]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub struct ConnectionStatusChangeEvent(pub ConnectionStatus);

impl_payload_wrapper!(ConnectionStatusChangeEvent, ConnectionStatus);