blob: 299efc50b720cb41d8aa9599ec160280b1cf82bf [file] [log] [blame]
// Copyright 2019 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
library fuchsia.bluetooth;
/// The "Class of Device/Service" is a variable-format field that defines the category of a
/// Bluetooth device. The bitfield is divided into segments called "major service class",
/// "major device class", and "minor device class".
///
/// No assumptions about the specific functionality or characteristics of any application should be
/// based solely on its inclusion within a Major or Minor device class. For more information, see
/// https://www.bluetooth.com/specifications/assigned-numbers/baseband.
type DeviceClass = struct {
value uint32;
};
/// Constants for the major device class field. The major device class is defined by bits 12-8.
const MAJOR_DEVICE_CLASS_MASK uint32 = 0x1f00;
const MAJOR_DEVICE_CLASS_MISCELLANEOUS uint32 = 0x0000;
const MAJOR_DEVICE_CLASS_COMPUTER uint32 = 0x0100;
const MAJOR_DEVICE_CLASS_PHONE uint32 = 0x0200;
const MAJOR_DEVICE_CLASS_LAN uint32 = 0x0300;
const MAJOR_DEVICE_CLASS_AUDIO_VIDEO uint32 = 0x0400;
const MAJOR_DEVICE_CLASS_PERIPHERAL uint32 = 0x0500;
const MAJOR_DEVICE_CLASS_IMAGING uint32 = 0x0600;
const MAJOR_DEVICE_CLASS_WEARABLE uint32 = 0x0700;
const MAJOR_DEVICE_CLASS_TOY uint32 = 0x0800;
const MAJOR_DEVICE_CLASS_HEALTH uint32 = 0x0900;
const MAJOR_DEVICE_CLASS_UNCATEGORIZED uint32 = 0x1f00;