XU XUv0.13.1
中文

#embedded/bluetooth/control

import: #embedded/bluetooth/control

counts: 1 functions, 0 methods, 1 types, 8 constants, 0 method sets

Standard library package `#embedded/bluetooth/control`.

const STATUS

XuAPI
pub const STATUS = 1

Purpose

Bounded command envelope. Identifiers and operation names are ASCII commands never contain credentials or arbitrary GATT/MMIO writes.

const ADVERTISING_START

XuAPI
pub const ADVERTISING_START = 2

Purpose

Constant ADVERTISING_START, defining protocol or algorithm parameters.

const ADVERTISING_STOP

XuAPI
pub const ADVERTISING_STOP = 3

Purpose

Constant ADVERTISING_STOP, defining protocol or algorithm parameters.

const DISCONNECT

XuAPI
pub const DISCONNECT = 4

Purpose

Constant DISCONNECT, defining protocol or algorithm parameters.

const RELEASE_ALL

XuAPI
pub const RELEASE_ALL = 5

Purpose

Constant RELEASE_ALL, defining protocol or algorithm parameters.

const KEYBOARD

XuAPI
pub const KEYBOARD = 6

Purpose

Constant KEYBOARD, defining protocol or algorithm parameters.

const MOUSE

XuAPI
pub const MOUSE = 7

Purpose

Constant MOUSE, defining protocol or algorithm parameters.

const CONSUMER

XuAPI
pub const CONSUMER = 8

Purpose

Constant CONSUMER, defining protocol or algorithm parameters.

struct Command

XuAPI
pub struct Command {
    pub valid bool
    pub id string
    pub op int
    pub report []int
}

Purpose

Structure encapsulating valid, id, op, report.

Public fields

valid bool
field (bool)
id string
field (string)
op int
field (int)
report []int
field ([]int)

parse

XuAPI
pub fn parse(bytes &string) Command

Purpose

Parse the input.

Parameters

bytes &string
bytes (read-only borrow; caller keeps the original; type &string)

Returns

Command — a value of this type