Unit Bluetooth

From Ultibo.org
Revision as of 04:19, 10 November 2025 by Ultibo (Talk | contribs)

Jump to: navigation, search

Return to Unit Reference


Description


Ultibo Bluetooth interface unit

Constants



Bluetooth device, driver and host specific constants BLUETOOTH_*
BLUETOOTH_DEVICE_PREFIX = 'Bluetooth'; Name prefix for Bluetooth Devices
BLUETOOTH_DRIVER_PREFIX = 'Bluetooth'; Name prefix for Bluetooth Drivers
BLUETOOTH_HOST_PREFIX = 'BluetoothHost'; Name prefix for Bluetooth Hosts
BLUETOOTH_DRIVER_NAME = 'Bluetooth USB HCI Driver'; Name of Bluetooth USB driver


Bluetooth device types BLUETOOTH_TYPE_*
BLUETOOTH_TYPE_NONE = 0;  
BLUETOOTH_TYPE_MAX = 0;  
 
BLUETOOTH_TYPE_NAMES:array[BLUETOOTH_TYPE_NONE..BLUETOOTH_TYPE_MAX] of String = ('BLUETOOTH_TYPE_NONE');


Bluetooth device states BLUETOOTH_STATE_*
BLUETOOTH_STATE_DETACHED = 0;  
BLUETOOTH_STATE_DETACHING = 1;  
BLUETOOTH_STATE_ATTACHING = 2;  
BLUETOOTH_STATE_ATTACHED = 3;  
 
BLUETOOTH_STATE_MAX = 3;  
 
BLUETOOTH_STATE_NAMES:array[BLUETOOTH_STATE_DETACHED..BLUETOOTH_STATE_MAX] of String = ('BLUETOOTH_STATE_DETACHED', 'BLUETOOTH_STATE_DETACHING', 'BLUETOOTH_STATE_ATTACHING', 'BLUETOOTH_STATE_ATTACHED');


Bluetooth device status BLUETOOTH_STATUS_*
BLUETOOTH_STATUS_UNBOUND = 0;  
BLUETOOTH_STATUS_BOUND = 1;  
 
BLUETOOTH_STATUS_MAX = 1;  
 
BLUETOOTH_STATUS_NAMES:array[BLUETOOTH_STATUS_UNBOUND..BLUETOOTH_STATUS_MAX] of String = ('BLUETOOTH_STATUS_UNBOUND', 'BLUETOOTH_STATUS_BOUND');


Bluetooth device flags BLUETOOTH_FLAG_*
BLUETOOTH_FLAG_NONE = $00000000;  


Bluetooth host types BLUETOOTHHOST_TYPE_*
BLUETOOTHHOST_TYPE_NONE = 0;  
BLUETOOTHHOST_TYPE_UART = 1; Bluetooth HCI over RS232 with RTS/CTS flow control for reliable delivery
BLUETOOTHHOST_TYPE_USB = 2; Bluetooth HCI over USB
BLUETOOTHHOST_TYPE_SDIO = 3; Bluetooth HCI over SDIO
BLUETOOTHHOST_TYPE_3WIRE = 4; Bluetooth HCI over 3 wire UART (TX/RX/GND only with RTS/CTS optional)
 
BLUETOOTHHOST_TYPE_MAX = 4;  
 
BLUETOOTHHOST_TYPE_NAMES:array[BLUETOOTHHOST_TYPE_NONE..BLUETOOTHHOST_TYPE_MAX] of String = ('BLUETOOTHHOST_TYPE_NONE', 'BLUETOOTHHOST_TYPE_UART', 'BLUETOOTHHOST_TYPE_USB', 'BLUETOOTHHOST_TYPE_SDIO', 'BLUETOOTHHOST_TYPE_3WIRE');


Bluetooth host states BLUETOOTHHOST_STATE_*
BLUETOOTHHOST_STATE_DISABLED = 0;  
BLUETOOTHHOST_STATE_ENABLED = 1;  
 
BLUETOOTHHOST_STATE_MAX = 1;  
 
BLUETOOTHHOST_STATE_NAMES:array[BLUETOOTHHOST_STATE_DISABLED..BLUETOOTHHOST_STATE_MAX] of String = ('BLUETOOTHHOST_STATE_DISABLED', 'BLUETOOTHHOST_STATE_ENABLED');


Bluetooth host flags BLUETOOTHHOST_FLAG_*
BLUETOOTHHOST_FLAG_NONE = $00000000;  
BLUETOOTHHOST_FLAG_SHARED = $00000001;  
BLUETOOTHHOST_FLAG_NOCACHE = $00000002;  


Bluetooth status codes BLUETOOTH_STATUS_*
BLUETOOTH_STATUS_SUCCESS = 0; Function successful
BLUETOOTH_STATUS_DEVICE_DETACHED = 1; Bluetooth device was detached
BLUETOOTH_STATUS_DEVICE_UNSUPPORTED = 2; Bluetooth device is unsupported by the driver
BLUETOOTH_STATUS_HARDWARE_ERROR = 3; Hardware error of some form occurred
BLUETOOTH_STATUS_INVALID_DATA = 4; Invalid data was received
BLUETOOTH_STATUS_INVALID_PARAMETER = 5; An invalid parameter was passed to the function


Bluetooth logging BLUETOOTH_LOG_*
BLUETOOTH_LOG_LEVEL_DEBUG = LOG_LEVEL_DEBUG; Bluetooth debugging messages
BLUETOOTH_LOG_LEVEL_INFO = LOG_LEVEL_INFO; Bluetooth informational messages, such as a device being attached or detached
BLUETOOTH_LOG_LEVEL_WARN = LOG_LEVEL_WARN; Bluetooth warning messages
BLUETOOTH_LOG_LEVEL_ERROR = LOG_LEVEL_ERROR; Bluetooth error messages
BLUETOOTH_LOG_LEVEL_NONE = LOG_LEVEL_NONE; No Bluetooth messages


Type definitions


To be documented

Public variables


To be documented

Function declarations


To be documented


Return to Unit Reference