Difference between revisions of "Unit Bluetooth"
| Line 9: | Line 9: | ||
=== Constants === | === Constants === | ||
---- | ---- | ||
| + | |||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
| Line 235: | Line 236: | ||
=== Type definitions === | === Type definitions === | ||
---- | ---- | ||
| + | |||
'''Bluetooth device''' | '''Bluetooth device''' | ||
| Line 383: | Line 385: | ||
|} | |} | ||
</div></div> | </div></div> | ||
| − | + | ||
'''Bluetooth host enumeration callback''' | '''Bluetooth host enumeration callback''' | ||
| Line 475: | Line 477: | ||
|} | |} | ||
</div></div> | </div></div> | ||
| − | + | ||
'''Bluetooth log output''' | '''Bluetooth log output''' | ||
| Line 517: | Line 519: | ||
---- | ---- | ||
| − | ''To be documented'' | + | |
| + | '''Initialization functions''' | ||
| + | |||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
| + | <pre style="border: 0; padding-bottom:0px;">procedure BluetoothInit;</pre> | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Performs basic initialization of the Bluetooth core driver, after this devices, hosts and drivers can be registered however nothing will work until BluetoothStart is called</div> | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;" | ||
| + | |- | ||
| + | ! Note | ||
| + | | Called only during system startup | ||
| + | |- | ||
| + | |} | ||
| + | </div></div> | ||
| + | <br /> | ||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
| + | <pre style="border: 0; padding-bottom:0px;">function BluetoothStart:LongWord;</pre> | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Starts all registered Bluetooth hosts and begins the Bluetooth discovery process</div> | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;" | ||
| + | |- | ||
| + | ! Note | ||
| + | | None documented | ||
| + | |- | ||
| + | |} | ||
| + | </div></div> | ||
| + | <br /> | ||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
| + | <pre style="border: 0; padding-bottom:0px;">function BluetoothStop:LongWord;</pre> | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;" | ||
| + | |- | ||
| + | ! Note | ||
| + | | None documented | ||
| + | |- | ||
| + | |} | ||
| + | </div></div> | ||
| + | <br /> | ||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
| + | <pre style="border: 0; padding-bottom:0px;">procedure BluetoothAsyncStart(Host:PBluetoothHost);</pre> | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;" | ||
| + | |- | ||
| + | ! Note | ||
| + | | None documented | ||
| + | |- | ||
| + | |} | ||
| + | </div></div> | ||
| + | <br /> | ||
| + | |||
| + | '''Bluetooth device, driver and host functions''' | ||
| + | |||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
| + | <pre style="border: 0; padding-bottom:0px;">function BluetoothDeviceAllocate(Host:PBluetoothHost):PBluetoothDevice;</pre> | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Create and Register a new Device entry in the Device table</div> | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;" | ||
| + | |- | ||
| + | ! Host | ||
| + | | The Host this device is attached to | ||
| + | |- | ||
| + | ! Parent | ||
| + | | The Parent device this device is attached to (nil if this device has no parent) | ||
| + | |- | ||
| + | ! Return | ||
| + | | Pointer to new Device entry or nil if device could not be created | ||
| + | |- | ||
| + | |} | ||
| + | </div></div> | ||
| + | <br /> | ||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
| + | <pre style="border: 0; padding-bottom:0px;">function BluetoothDeviceRelease(Device:PBluetoothDevice):LongWord;</pre> | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Deregister and Destroy a Device from the Device table</div> | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;" | ||
| + | |- | ||
| + | ! Device | ||
| + | | The device to deregister and destroy | ||
| + | |- | ||
| + | ! Return | ||
| + | | ERROR_SUCCESS if completed or another error code on failure | ||
| + | |- | ||
| + | |} | ||
| + | </div></div> | ||
| + | <br /> | ||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
| + | <pre style="border: 0; padding-bottom:0px;">function BluetoothDeviceFind(BluetoothId:LongWord):PBluetoothDevice;</pre> | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;" | ||
| + | |- | ||
| + | ! Note | ||
| + | | None documented | ||
| + | |- | ||
| + | |} | ||
| + | </div></div> | ||
| + | <br /> | ||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
| + | <pre style="border: 0; padding-bottom:0px;">function BluetoothDeviceFindByName(const Name:String):PBluetoothDevice; inline;</pre> | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;" | ||
| + | |- | ||
| + | ! Note | ||
| + | | None documented | ||
| + | |- | ||
| + | |} | ||
| + | </div></div> | ||
| + | <br /> | ||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
| + | <pre style="border: 0; padding-bottom:0px;">function BluetoothDeviceFindByDescription(const Description:String):PBluetoothDevice; inline;</pre> | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;" | ||
| + | |- | ||
| + | ! Note | ||
| + | | None documented | ||
| + | |- | ||
| + | |} | ||
| + | </div></div> | ||
| + | <br /> | ||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
| + | <pre style="border: 0; padding-bottom:0px;">function BluetoothDeviceEnumerate(Callback:TBluetoothDeviceEnumerate; Data:Pointer):LongWord;</pre> | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;" | ||
| + | |- | ||
| + | ! Note | ||
| + | | None documented | ||
| + | |- | ||
| + | |} | ||
| + | </div></div> | ||
| + | <br /> | ||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
| + | <pre style="border: 0; padding-bottom:0px;">function BluetoothDeviceNotification(Device:PBluetoothDevice; Callback:TBluetoothDeviceNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;</pre> | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;" | ||
| + | |- | ||
| + | ! Note | ||
| + | | None documented | ||
| + | |- | ||
| + | |} | ||
| + | </div></div> | ||
| + | <br /> | ||
| + | |||
| + | |||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
| + | <pre style="border: 0; padding-bottom:0px;">function BluetoothDriverCreate:PBluetoothDriver;</pre> | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Create a new Bluetooth Driver entry</div> | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;" | ||
| + | |- | ||
| + | ! Return | ||
| + | | Pointer to new Driver entry or nil if driver could not be created | ||
| + | |- | ||
| + | |} | ||
| + | </div></div> | ||
| + | <br /> | ||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
| + | <pre style="border: 0; padding-bottom:0px;">function BluetoothDriverCreateEx(Size:LongWord):PBluetoothDriver;</pre> | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Create a new Bluetooth Driver entry</div> | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;" | ||
| + | |- | ||
| + | ! Size | ||
| + | | Size in bytes to allocate for new driver (Including the driver entry) | ||
| + | |- | ||
| + | ! Return | ||
| + | | Pointer to new Driver entry or nil if driver could not be created | ||
| + | |- | ||
| + | |} | ||
| + | </div></div> | ||
| + | <br /> | ||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
| + | <pre style="border: 0; padding-bottom:0px;">function BluetoothDriverDestroy(Driver:PBluetoothDriver):LongWord;</pre> | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Destroy an existing Bluetooth Driver entry</div> | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;" | ||
| + | |- | ||
| + | ! Note | ||
| + | | None documented | ||
| + | |- | ||
| + | |} | ||
| + | </div></div> | ||
| + | <br /> | ||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
| + | <pre style="border: 0; padding-bottom:0px;">function BluetoothDriverRegister(Driver:PBluetoothDriver):LongWord;</pre> | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Register a new Driver in the Bluetooth Driver table</div> | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;" | ||
| + | |- | ||
| + | ! Note | ||
| + | | None documented | ||
| + | |- | ||
| + | |} | ||
| + | </div></div> | ||
| + | <br /> | ||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
| + | <pre style="border: 0; padding-bottom:0px;">function BluetoothDriverDeregister(Driver:PBluetoothDriver):LongWord;</pre> | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Deregister a Driver from the Bluetooth Driver table</div> | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;" | ||
| + | |- | ||
| + | ! Note | ||
| + | | None documented | ||
| + | |- | ||
| + | |} | ||
| + | </div></div> | ||
| + | <br /> | ||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
| + | <pre style="border: 0; padding-bottom:0px;">function BluetoothDriverFind(DriverId:LongWord):PBluetoothDriver;</pre> | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Find a driver by Id in the Bluetooth Driver table</div> | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;" | ||
| + | |- | ||
| + | ! Note | ||
| + | | None documented | ||
| + | |- | ||
| + | |} | ||
| + | </div></div> | ||
| + | <br /> | ||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
| + | <pre style="border: 0; padding-bottom:0px;">function BluetoothDriverFindByName(const Name:String):PBluetoothDriver; inline;</pre> | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Find a driver by name in the Driver table</div> | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;" | ||
| + | |- | ||
| + | ! Note | ||
| + | | None documented | ||
| + | |- | ||
| + | |} | ||
| + | </div></div> | ||
| + | <br /> | ||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
| + | <pre style="border: 0; padding-bottom:0px;">function BluetoothDriverEnumerate(Callback:TBluetoothDriverEnumerate; Data:Pointer):LongWord;</pre> | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Enumerate all drivers in the Bluetooth Driver table</div> | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;" | ||
| + | |- | ||
| + | ! Note | ||
| + | | None documented | ||
| + | |- | ||
| + | |} | ||
| + | </div></div> | ||
| + | <br /> | ||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
| + | <pre style="border: 0; padding-bottom:0px;">function BluetoothHostCreate:PBluetoothHost;</pre> | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Create a new Host entry</div> | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;" | ||
| + | |- | ||
| + | ! Return | ||
| + | | Pointer to new Host entry or nil if host could not be created | ||
| + | |- | ||
| + | |} | ||
| + | </div></div> | ||
| + | <br /> | ||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
| + | <pre style="border: 0; padding-bottom:0px;">function BluetoothHostCreateEx(Size:LongWord):PBluetoothHost;</pre> | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Create a new Host entry</div> | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;" | ||
| + | |- | ||
| + | ! Size | ||
| + | | Size in bytes to allocate for new host (Including the host entry) | ||
| + | |- | ||
| + | ! Return | ||
| + | | Pointer to new Host entry or nil if host could not be created | ||
| + | |- | ||
| + | |} | ||
| + | </div></div> | ||
| + | <br /> | ||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
| + | <pre style="border: 0; padding-bottom:0px;">function BluetoothHostDestroy(Host:PBluetoothHost):LongWord;</pre> | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Destroy an existing Host entry</div> | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;" | ||
| + | |- | ||
| + | ! Note | ||
| + | | None documented | ||
| + | |- | ||
| + | |} | ||
| + | </div></div> | ||
| + | <br /> | ||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
| + | <pre style="border: 0; padding-bottom:0px;">function BluetoothHostRegister(Host:PBluetoothHost):LongWord;</pre> | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Register a new Host in the Host table</div> | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;" | ||
| + | |- | ||
| + | ! Note | ||
| + | | None documented | ||
| + | |- | ||
| + | |} | ||
| + | </div></div> | ||
| + | <br /> | ||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
| + | <pre style="border: 0; padding-bottom:0px;">function BluetoothHostDeregister(Host:PBluetoothHost):LongWord;</pre> | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Deregister a Host from the Host table</div> | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;" | ||
| + | |- | ||
| + | ! Note | ||
| + | | None documented | ||
| + | |- | ||
| + | |} | ||
| + | </div></div> | ||
| + | <br /> | ||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
| + | <pre style="border: 0; padding-bottom:0px;">function BluetoothHostFind(HostId:LongWord):PBluetoothHost;</pre> | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;" | ||
| + | |- | ||
| + | ! Note | ||
| + | | None documented | ||
| + | |- | ||
| + | |} | ||
| + | </div></div> | ||
| + | <br /> | ||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
| + | <pre style="border: 0; padding-bottom:0px;">function BluetoothHostFindByName(const Name:String):PBluetoothHost; inline;</pre> | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;" | ||
| + | |- | ||
| + | ! Note | ||
| + | | None documented | ||
| + | |- | ||
| + | |} | ||
| + | </div></div> | ||
| + | <br /> | ||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
| + | <pre style="border: 0; padding-bottom:0px;">function BluetoothHostFindByDescription(const Description:String):PBluetoothHost; inline;</pre> | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;" | ||
| + | |- | ||
| + | ! Note | ||
| + | | None documented | ||
| + | |- | ||
| + | |} | ||
| + | </div></div> | ||
| + | <br /> | ||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
| + | <pre style="border: 0; padding-bottom:0px;">function BluetoothHostEnumerate(Callback:TBluetoothHostEnumerate; Data:Pointer):LongWord;</pre> | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;" | ||
| + | |- | ||
| + | ! Note | ||
| + | | None documented | ||
| + | |- | ||
| + | |} | ||
| + | </div></div> | ||
| + | <br /> | ||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
| + | <pre style="border: 0; padding-bottom:0px;">function BluetoothHostNotification(Host:PBluetoothHost; Callback:TBluetoothHostNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;</pre> | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;" | ||
| + | |- | ||
| + | ! Note | ||
| + | | None documented | ||
| + | |- | ||
| + | |} | ||
| + | </div></div> | ||
| + | <br /> | ||
| + | |||
| + | '''Bluetooth device, driver and host helper functions''' | ||
| + | |||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
| + | <pre style="border: 0; padding-bottom:0px;">function BluetoothDeviceGetCount:LongWord;</pre> | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current device count</div> | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;" | ||
| + | |- | ||
| + | ! Note | ||
| + | | None documented | ||
| + | |- | ||
| + | |} | ||
| + | </div></div> | ||
| + | <br /> | ||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
| + | <pre style="border: 0; padding-bottom:0px;">function BluetoothDeviceCheck(Device:PBluetoothDevice):PBluetoothDevice;</pre> | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Check if the supplied Device is in the device table</div> | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;" | ||
| + | |- | ||
| + | ! Note | ||
| + | | None documented | ||
| + | |- | ||
| + | |} | ||
| + | </div></div> | ||
| + | <br /> | ||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
| + | <pre style="border: 0; padding-bottom:0px;">function BluetoothDriverGetCount:LongWord;</pre> | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current Bluetooth driver count</div> | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;" | ||
| + | |- | ||
| + | ! Note | ||
| + | | None documented | ||
| + | |- | ||
| + | |} | ||
| + | </div></div> | ||
| + | <br /> | ||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
| + | <pre style="border: 0; padding-bottom:0px;">function BluetoothDriverCheck(Driver:PBluetoothDriver):PBluetoothDriver;</pre> | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Check if the supplied Bluetooth Driver is in the driver table</div> | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;" | ||
| + | |- | ||
| + | ! Note | ||
| + | | None documented | ||
| + | |- | ||
| + | |} | ||
| + | </div></div> | ||
| + | <br /> | ||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
| + | <pre style="border: 0; padding-bottom:0px;">function BluetoothHostGetCount:LongWord;</pre> | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current host count</div> | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;" | ||
| + | |- | ||
| + | ! Note | ||
| + | | None documented | ||
| + | |- | ||
| + | |} | ||
| + | </div></div> | ||
| + | <br /> | ||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
| + | <pre style="border: 0; padding-bottom:0px;">function BluetoothHostCheck(Host:PBluetoothHost):PBluetoothHost;</pre> | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Check if the supplied Host is in the host table</div> | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;" | ||
| + | |- | ||
| + | ! Note | ||
| + | | None documented | ||
| + | |- | ||
| + | |} | ||
| + | </div></div> | ||
| + | <br /> | ||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
| + | <pre style="border: 0; padding-bottom:0px;">function BluetoothStatusToString(Status:LongWord):String;</pre> | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Translates a Bluetooth status code into a string</div> | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;" | ||
| + | |- | ||
| + | ! Note | ||
| + | | None documented | ||
| + | |- | ||
| + | |} | ||
| + | </div></div> | ||
| + | <br /> | ||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
| + | <pre style="border: 0; padding-bottom:0px;">function BluetoothDeviceTypeToString(BluetoothType:LongWord):String;</pre> | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;" | ||
| + | |- | ||
| + | ! Note | ||
| + | | None documented | ||
| + | |- | ||
| + | |} | ||
| + | </div></div> | ||
| + | <br /> | ||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
| + | <pre style="border: 0; padding-bottom:0px;">function BluetoothDeviceStateToString(BluetoothState:LongWord):String;</pre> | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;" | ||
| + | |- | ||
| + | ! Note | ||
| + | | None documented | ||
| + | |- | ||
| + | |} | ||
| + | </div></div> | ||
| + | <br /> | ||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
| + | <pre style="border: 0; padding-bottom:0px;">function BluetoothDeviceStatusToString(BluetoothStatus:LongWord):String;</pre> | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;" | ||
| + | |- | ||
| + | ! Note | ||
| + | | None documented | ||
| + | |- | ||
| + | |} | ||
| + | </div></div> | ||
| + | <br /> | ||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
| + | <pre style="border: 0; padding-bottom:0px;">function BluetoothDeviceStateToNotification(State:LongWord):LongWord;</pre> | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Convert a Device state value into the notification code for device notifications</div> | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;" | ||
| + | |- | ||
| + | ! Note | ||
| + | | None documented | ||
| + | |- | ||
| + | |} | ||
| + | </div></div> | ||
| + | <br /> | ||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
| + | <pre style="border: 0; padding-bottom:0px;">function BluetoothDeviceStatusToNotification(Status:LongWord):LongWord;</pre> | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Convert a Device status value into the notification code for device notifications</div> | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;" | ||
| + | |- | ||
| + | ! Note | ||
| + | | None documented | ||
| + | |- | ||
| + | |} | ||
| + | </div></div> | ||
| + | <br /> | ||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
| + | <pre style="border: 0; padding-bottom:0px;">function BluetoothHostTypeToString(HostType:LongWord):String;</pre> | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;" | ||
| + | |- | ||
| + | ! Note | ||
| + | | None documented | ||
| + | |- | ||
| + | |} | ||
| + | </div></div> | ||
| + | <br /> | ||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
| + | <pre style="border: 0; padding-bottom:0px;">function BluetoothHostStateToString(HostState:LongWord):String;</pre> | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;" | ||
| + | |- | ||
| + | ! Note | ||
| + | | None documented | ||
| + | |- | ||
| + | |} | ||
| + | </div></div> | ||
| + | <br /> | ||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
| + | <pre style="border: 0; padding-bottom:0px;">function BluetoothHostStateToNotification(State:LongWord):LongWord;</pre> | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Convert a Host state value into the notification code for device notifications</div> | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;" | ||
| + | |- | ||
| + | ! Note | ||
| + | | None documented | ||
| + | |- | ||
| + | |} | ||
| + | </div></div> | ||
| + | <br /> | ||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
| + | <pre style="border: 0; padding-bottom:0px;">procedure BluetoothLog(Level:LongWord; Device:PBluetoothDevice; const AText:String);</pre> | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;" | ||
| + | |- | ||
| + | ! Note | ||
| + | | None documented | ||
| + | |- | ||
| + | |} | ||
| + | </div></div> | ||
| + | <br /> | ||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
| + | <pre style="border: 0; padding-bottom:0px;">procedure BluetoothLogInfo(Device:PBluetoothDevice; const AText:String); inline;</pre> | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;" | ||
| + | |- | ||
| + | ! Note | ||
| + | | None documented | ||
| + | |- | ||
| + | |} | ||
| + | </div></div> | ||
| + | <br /> | ||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
| + | <pre style="border: 0; padding-bottom:0px;">procedure BluetoothLogWarn(Device:PBluetoothDevice; const AText:String); inline;</pre> | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;" | ||
| + | |- | ||
| + | ! Note | ||
| + | | None documented | ||
| + | |- | ||
| + | |} | ||
| + | </div></div> | ||
| + | <br /> | ||
| + | |||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
| + | <pre style="border: 0; padding-bottom:0px;">procedure BluetoothLogError(Device:PBluetoothDevice; const AText:String); inline;</pre> | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;" | ||
| + | |- | ||
| + | ! Note | ||
| + | | None documented | ||
| + | |- | ||
| + | |} | ||
| + | </div></div> | ||
| + | <br /> | ||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
| + | <pre style="border: 0; padding-bottom:0px;">procedure BluetoothLogDebug(Device:PBluetoothDevice; const AText:String); inline;</pre> | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;" | ||
| + | |- | ||
| + | ! Note | ||
| + | | None documented | ||
| + | |- | ||
| + | |} | ||
| + | </div></div> | ||
| + | <br /> | ||
Return to [[Unit_Reference|Unit Reference]] | Return to [[Unit_Reference|Unit Reference]] | ||
Revision as of 04:29, 10 November 2025
Return to Unit Reference
Description
Ultibo Bluetooth interface unit
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_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_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_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_FLAG_* BLUETOOTH_FLAG_NONE = $00000000;
|
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');
| |
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');
| |
BLUETOOTHHOST_FLAG_* BLUETOOTHHOST_FLAG_NONE = $00000000;
|
|
BLUETOOTHHOST_FLAG_SHARED = $00000001;
|
|
BLUETOOTHHOST_FLAG_NOCACHE = $00000002;
|
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_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
Bluetooth device
PBluetoothDevice = ^TBluetoothDevice;
TBluetoothDevice = record
| Device Properties | |
Device:TDevice;
|
The Device entry for this Bluetooth device |
| Bluetooth Properties | |
BluetoothId:LongWord;
|
Unique Id of this Bluetooth in the Bluetooth device table |
BluetoothState:LongWord;
|
Bluetooth device state (eg BLUETOOTH_STATE_ATTACHED) |
BluetoothStatus:LongWord;
|
Bluetooth device status (eg BLUETOOTH_STATUS_BOUND) |
Host:PBluetoothHost;
|
Host controller this Bluetooth device is connected to (Set by Bluetooth core) |
Driver:PBluetoothDriver;
|
Driver this Bluetooth device is bound to, if any (Set by Bluetooth core) |
| Driver Properties | |
Lock:TMutexHandle;
|
Bluetooth device lock |
| Internal Properties | |
Prev:PBluetoothDevice;
|
Previous entry in Bluetooth device table |
Next:PBluetoothDevice;
|
Next entry in Bluetooth device table |
Bluetooth device bind callback
TBluetoothDeviceBind = function(Device:PBluetoothDevice):LongWord;
|
Bluetooth device unbind callback
TBluetoothDeviceUnbind = function(Device:PBluetoothDevice; Driver:PBluetoothDriver):LongWord;
|
Bluetooth device enumeration callback
TBluetoothDeviceEnumerate = function(Device:PBluetoothDevice; Data:Pointer):LongWord;
|
Bluetooth device notification callback
TBluetoothDeviceNotification = function(Device:PDevice; Data:Pointer; Notification:LongWord):LongWord;
|
Bluetooth driver enumeration callback
TBluetoothDriverEnumerate = function(Driver:PBluetoothDriver; Data:Pointer):LongWord;
|
Bluetooth driver bind callback
TBluetoothDriverBind = function(Device:PBluetoothDevice):LongWord;
|
Bluetooth driver unbind callback
TBluetoothDriverUnbind = function(Device:PBluetoothDevice):LongWord;
|
Bluetooth driver
PBluetoothDriver = ^TBluetoothDriver;
TBluetoothDriver = record
| Driver Properties | |
Driver:TDriver;
|
The Driver entry for this Bluetooth Driver |
| Bluetooth Properties | |
DriverBind:TBluetoothDriverBind;
|
A Driver specific DriverBind method implementing the standard Bluetooth driver interface |
DriverUnbind:TBluetoothDriverUnbind;
|
A Driver specific DriverUnbind method implementing the standard Bluetooth driver interface |
| Interface Properties | |
Lock:TMutexHandle;
|
Driver lock |
| Internal Properties | |
Prev:PBluetoothDriver;
|
Previous entry in Driver table |
Next:PBluetoothDriver;
|
Next entry in Driver table |
Bluetooth host enumeration callback
TBluetoothHostEnumerate = function(Host:PBluetoothHost; Data:Pointer):LongWord;
|
Bluetooth host notification callback
TBluetoothHostNotification = function(Device:PDevice; Data:Pointer; Notification:LongWord):LongWord;
|
Bluetooth host start
TBluetoothHostStart = function(Host:PBluetoothHost):LongWord;
|
Bluetooth host stop
TBluetoothHostStop = function(Host:PBluetoothHost):LongWord;
|
Bluetooth host reset
TBluetoothHostReset = function(Host:PBluetoothHost):LongWord;
|
Bluetooth host
PBluetoothHost = ^TBluetoothHost;
TBluetoothHost = record
| Device Properties | |
Device:TDevice;
|
The Device entry for this Bluetooth Host |
| Bluetooth Properties | |
HostId:LongWord;
|
Unique Id of this Host in the Host table |
HostState:LongWord;
|
Host state (eg BLUETOOTHHOST_STATE_ENABLED) |
HostStart:TBluetoothHostStart;
|
A Host specific HostStart method implementing the standard Bluetooth host interface |
HostStop:TBluetoothHostStop;
|
A Host specific HostStop method implementing the standard Bluetooth host interface |
HostReset:TBluetoothHostReset;
|
A Host specific HostReset method implementing the standard Bluetooth host interface |
| Driver Properties | |
Lock:TMutexHandle;
|
Host lock |
| Internal Properties | |
Prev:PBluetoothHost;
|
Previous entry in Host table |
Next:PBluetoothHost;
|
Next entry in Host table |
Bluetooth log output
TBluetoothLogOutput = procedure(const AText:String; Data:Pointer);
|
Public variables
Bluetooth specific variables
BluetoothInitialized:Boolean;
|
Bluetooth logging
BLUETOOTH_DEFAULT_LOG_LEVEL:LongWord = BLUETOOTH_LOG_LEVEL_DEBUG;
|
Minimum level for Bluetooth messages. Only messages with level greater than or equal to this will be printed. |
BLUETOOTH_LOG_ENABLED:Boolean;
|
Function declarations
Initialization functions
procedure BluetoothInit;
| Note | Called only during system startup |
|---|
function BluetoothStart:LongWord;
| Note | None documented |
|---|
function BluetoothStop:LongWord;
| Note | None documented |
|---|
procedure BluetoothAsyncStart(Host:PBluetoothHost);
| Note | None documented |
|---|
Bluetooth device, driver and host functions
function BluetoothDeviceAllocate(Host:PBluetoothHost):PBluetoothDevice;
| Host | The Host this device is attached to |
|---|---|
| Parent | The Parent device this device is attached to (nil if this device has no parent) |
| Return | Pointer to new Device entry or nil if device could not be created |
function BluetoothDeviceRelease(Device:PBluetoothDevice):LongWord;
| Device | The device to deregister and destroy |
|---|---|
| Return | ERROR_SUCCESS if completed or another error code on failure |
function BluetoothDeviceFind(BluetoothId:LongWord):PBluetoothDevice;
| Note | None documented |
|---|
function BluetoothDeviceFindByName(const Name:String):PBluetoothDevice; inline;
| Note | None documented |
|---|
function BluetoothDeviceFindByDescription(const Description:String):PBluetoothDevice; inline;
| Note | None documented |
|---|
function BluetoothDeviceEnumerate(Callback:TBluetoothDeviceEnumerate; Data:Pointer):LongWord;
| Note | None documented |
|---|
function BluetoothDeviceNotification(Device:PBluetoothDevice; Callback:TBluetoothDeviceNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;
| Note | None documented |
|---|
function BluetoothDriverCreate:PBluetoothDriver;
| Return | Pointer to new Driver entry or nil if driver could not be created |
|---|
function BluetoothDriverCreateEx(Size:LongWord):PBluetoothDriver;
| Size | Size in bytes to allocate for new driver (Including the driver entry) |
|---|---|
| Return | Pointer to new Driver entry or nil if driver could not be created |
function BluetoothDriverDestroy(Driver:PBluetoothDriver):LongWord;
| Note | None documented |
|---|
function BluetoothDriverRegister(Driver:PBluetoothDriver):LongWord;
| Note | None documented |
|---|
function BluetoothDriverDeregister(Driver:PBluetoothDriver):LongWord;
| Note | None documented |
|---|
function BluetoothDriverFind(DriverId:LongWord):PBluetoothDriver;
| Note | None documented |
|---|
function BluetoothDriverFindByName(const Name:String):PBluetoothDriver; inline;
| Note | None documented |
|---|
function BluetoothDriverEnumerate(Callback:TBluetoothDriverEnumerate; Data:Pointer):LongWord;
| Note | None documented |
|---|
function BluetoothHostCreate:PBluetoothHost;
| Return | Pointer to new Host entry or nil if host could not be created |
|---|
function BluetoothHostCreateEx(Size:LongWord):PBluetoothHost;
| Size | Size in bytes to allocate for new host (Including the host entry) |
|---|---|
| Return | Pointer to new Host entry or nil if host could not be created |
function BluetoothHostDestroy(Host:PBluetoothHost):LongWord;
| Note | None documented |
|---|
function BluetoothHostRegister(Host:PBluetoothHost):LongWord;
| Note | None documented |
|---|
function BluetoothHostDeregister(Host:PBluetoothHost):LongWord;
| Note | None documented |
|---|
function BluetoothHostFind(HostId:LongWord):PBluetoothHost;
| Note | None documented |
|---|
function BluetoothHostFindByName(const Name:String):PBluetoothHost; inline;
| Note | None documented |
|---|
function BluetoothHostFindByDescription(const Description:String):PBluetoothHost; inline;
| Note | None documented |
|---|
function BluetoothHostEnumerate(Callback:TBluetoothHostEnumerate; Data:Pointer):LongWord;
| Note | None documented |
|---|
function BluetoothHostNotification(Host:PBluetoothHost; Callback:TBluetoothHostNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;
| Note | None documented |
|---|
Bluetooth device, driver and host helper functions
function BluetoothDeviceGetCount:LongWord;
| Note | None documented |
|---|
function BluetoothDeviceCheck(Device:PBluetoothDevice):PBluetoothDevice;
| Note | None documented |
|---|
function BluetoothDriverGetCount:LongWord;
| Note | None documented |
|---|
function BluetoothDriverCheck(Driver:PBluetoothDriver):PBluetoothDriver;
| Note | None documented |
|---|
function BluetoothHostGetCount:LongWord;
| Note | None documented |
|---|
function BluetoothHostCheck(Host:PBluetoothHost):PBluetoothHost;
| Note | None documented |
|---|
function BluetoothStatusToString(Status:LongWord):String;
| Note | None documented |
|---|
function BluetoothDeviceTypeToString(BluetoothType:LongWord):String;
| Note | None documented |
|---|
function BluetoothDeviceStateToString(BluetoothState:LongWord):String;
| Note | None documented |
|---|
function BluetoothDeviceStatusToString(BluetoothStatus:LongWord):String;
| Note | None documented |
|---|
function BluetoothDeviceStateToNotification(State:LongWord):LongWord;
| Note | None documented |
|---|
function BluetoothDeviceStatusToNotification(Status:LongWord):LongWord;
| Note | None documented |
|---|
function BluetoothHostTypeToString(HostType:LongWord):String;
| Note | None documented |
|---|
function BluetoothHostStateToString(HostState:LongWord):String;
| Note | None documented |
|---|
function BluetoothHostStateToNotification(State:LongWord):LongWord;
| Note | None documented |
|---|
procedure BluetoothLog(Level:LongWord; Device:PBluetoothDevice; const AText:String);
| Note | None documented |
|---|
procedure BluetoothLogInfo(Device:PBluetoothDevice; const AText:String); inline;
| Note | None documented |
|---|
procedure BluetoothLogWarn(Device:PBluetoothDevice; const AText:String); inline;
| Note | None documented |
|---|
procedure BluetoothLogError(Device:PBluetoothDevice; const AText:String); inline;
| Note | None documented |
|---|
procedure BluetoothLogDebug(Device:PBluetoothDevice; const AText:String); inline;
| Note | None documented |
|---|
Return to Unit Reference