pub const DEVICE_NAME: &str = "Chessnut Move";
pub const POSITION_SERVICE_UUID: &str = "1b7e8261-2877-41c3-b46e-cf057c562023";
pub const POSITION_NOTIFICATION_UUID: &str = "1b7e8262-2877-41c3-b46e-cf057c562023";
pub const COMMAND_SERVICE_UUID: &str = "1b7e8271-2877-41c3-b46e-cf057c562023";
pub const COMMAND_WRITE_UUID: &str = "1b7e8272-2877-41c3-b46e-cf057c562023";
pub const COMMAND_RESPONSE_UUID: &str = "1b7e8273-2877-41c3-b46e-cf057c562023";
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
pub enum Characteristic {
PositionNotification,
CommandWrite,
CommandResponse,
}
impl Characteristic {
pub const fn uuid(self) -> &'static str {
match self {
Self::PositionNotification => POSITION_NOTIFICATION_UUID,
Self::CommandWrite => COMMAND_WRITE_UUID,
Self::CommandResponse => COMMAND_RESPONSE_UUID,
}
}
pub const fn uuid_u128(self) -> u128 {
match self {
Self::PositionNotification => 0x1b7e8262_2877_41c3_b46e_cf057c562023,
Self::CommandWrite => 0x1b7e8272_2877_41c3_b46e_cf057c562023,
Self::CommandResponse => 0x1b7e8273_2877_41c3_b46e_cf057c562023,
}
}
}