Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions rmk-types/src/protocol/rynk/payload/layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
//! decodes them into its own `LayoutInfo` (defined in the host crate, not here,
//! so this `#![no_std]` crate stays alloc-free). Only [`LayoutChunk`] is a wire
//! type, so only it needs `MaxSize`.
//!
//! The blob carries no version byte of its own: its postcard schema (the host
//! `LayoutInfo` and its `rmk-config` mirror) is part of the wire contract, so
//! reshaping it — including appending a field — is a protocol **major** bump,
//! exactly like reshaping any response payload.

use heapless::Vec;
use postcard::experimental::max_size::MaxSize;
Expand Down
8 changes: 4 additions & 4 deletions rmk/src/ble/ble_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use rmk_types::protocol::rynk::{
pub(crate) struct Server {
pub(crate) battery_service: BatteryService,
pub(crate) hid_service: HidService,
pub(crate) vial_service: VialService,
pub(crate) vial_service: VialGattService,
pub(crate) composite_service: CompositeService,
pub(crate) device_config_service: DeviceConfigurationService,
}
Expand All @@ -33,7 +33,7 @@ pub(crate) struct Server {
pub(crate) struct Server {
pub(crate) battery_service: BatteryService,
pub(crate) hid_service: HidService,
pub(crate) rynk_service: RynkService,
pub(crate) rynk_service: RynkGattService,
pub(crate) rynk_hid_service: RynkHidService,
pub(crate) composite_service: CompositeService,
pub(crate) device_config_service: DeviceConfigurationService,
Expand All @@ -57,7 +57,7 @@ pub(crate) struct Server {
/// [`crate::channel::RYNK_BLE_RX_PIPE`] for [`crate::ble::host::HostGattHandler::run`] to drain.
#[cfg(feature = "rynk")]
#[gatt_service(uuid = RYNK_SERVICE_UUID)]
pub(crate) struct RynkService {
pub(crate) struct RynkGattService {
// ATT enforces encryption; the event loop still filters the data path.
#[descriptor(uuid = "2908", read, value = [0u8, 1u8])]
#[characteristic(uuid = RYNK_INPUT_CHAR_UUID, read, notify, permissions(encrypted))]
Expand Down Expand Up @@ -96,7 +96,7 @@ pub(crate) struct RynkHidService {
/// [`crate::ble::host::HostGattHandler::run`] to drain.
#[cfg(feature = "vial")]
#[gatt_service(uuid = service::HUMAN_INTERFACE_DEVICE)]
pub(crate) struct VialService {
pub(crate) struct VialGattService {
#[characteristic(uuid = "2a4a", read, value = [0x01, 0x01, 0x00, 0x03])]
pub(crate) hid_info: [u8; 4],
#[characteristic(uuid = "2a4b", read, value = ViaReport::desc().try_into().expect("Failed to convert ViaReport to [u8; 27]"))]
Expand Down
4 changes: 2 additions & 2 deletions rmk/src/ble/host/rynk.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//! Rynk config over BLE GATT — a single per-connection session shared by both
//! transports: the custom 128-bit GATT [`RynkService`] (native bluest hosts) and
//! transports: the custom 128-bit `RynkGattService` (native bluest hosts) and
//! the vendor HID-over-GATT `RynkHidService` (browsers via WebHID).
//!
//! A connection is one host on one transport, so [`HostGattHandler::run`] runs ONE
Expand Down Expand Up @@ -120,7 +120,7 @@ impl HostGattHandler {
pub(crate) enum RynkBleSource {
/// No transport yet — drop topic pushes (no subscriber).
None,
/// Custom 128-bit GATT `RynkService` (native hosts).
/// Custom 128-bit `RynkGattService` (native hosts).
Custom,
/// Vendor HID-over-GATT `RynkHidService` (browsers over WebHID).
Hid,
Expand Down