Skip to content
Open
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
10 changes: 5 additions & 5 deletions nx/include/switch/services/btdrv.h
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ typedef struct {

struct {
u32 result; ///< 0 for success, non-zero for error.
u8 status; ///< Connection status. 0 = Connected, 2 = Disconnected
u8 status; ///< \ref BtdrvBleConnectionStatus
u8 client_if; ///< Client interface handle
u8 pad[2]; ///< Padding
u32 conn_id; ///< Connection ID
Expand All @@ -371,7 +371,7 @@ typedef struct {

struct {
u32 result; ///< 0 for success, non-zero for error.
u8 status; ///< Connection status. 0 = Connected, 2 = Disconnected
u8 status; ///< \ref BtdrvBleConnectionStatus
u8 server_if; ///< Server interface handle
u8 pad[2]; ///< Padding
u32 conn_id; ///< Connection ID
Expand All @@ -381,9 +381,9 @@ typedef struct {

struct {
u32 result; ///< 0 for success, non-zero for error.
u8 status; ///< BLE scan status. 1 = Scan complete, 2 = New device found, 0xFF = Scan started
u8 device_type; ///< Device type. 0 = BD/EDR, 1 = BLE, 2 = Dual Mode
u8 ble_addr_type; ///< BLE address type. 0 = Public, 1 = Random, 2 = Public ID, 3 = Random ID
u8 status; ///< \ref BtdrvBleScanStatus
u8 device_type; ///< \ref BtdrvBluetoothDeviceType
u8 ble_addr_type; ///< \ref BtdrvBleAddressType
BtdrvAddress address; ///< Device address
BtdrvBleAdvertisement ad_list[10]; ///< BLE Advertisement list \ref BtdrvBleAdvertisement
u8 count; ///< Number of entries above
Expand Down
29 changes: 29 additions & 0 deletions nx/include/switch/services/btdrv_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,13 @@ typedef enum {
BtdrvConnectionEventType_Suspended = 2, ///< ACL Link is now Suspended.
} BtdrvConnectionEventType;

/// BluetoothDeviceType
typedef enum {
BtdrvBluetoothDeviceType_BdEdr = 0, ///< BD/EDR device.
BtdrvBluetoothDeviceType_Ble = 1, ///< BLE device.
BtdrvBluetoothDeviceType_DualMode = 2, ///< Dual mode device.
} BtdrvBluetoothDeviceType;

/// ExtEventType [1.0.0-11.0.1]
typedef enum {
BtdrvExtEventType_SetTsi = 0, ///< SetTsi (\ref btdrvSetTsi)
Expand Down Expand Up @@ -141,6 +148,28 @@ typedef enum {
BtdrvBleEventType_ServerAttributeOperation = 13, ///< GATT server attribute operation.
} BtdrvBleEventType;

/// BleConnectionStatus
typedef enum {
BtdrvBleConnectionStatus_Opened = 0, ///< Connection opened.
BtdrvBleConnectionStatus_Cancelled = 1, ///< Connection cancelled.
BtdrvBleConnectionStatus_Closed = 2, ///< Connection closed.
} BtdrvBleConnectionStatus;

/// BleScanStatus
typedef enum {
BtdrvBleScanStatus_ScanCompleted = 1, ///< Scan completed.
BtdrvBleScanStatus_DeviceFound = 2, ///< New device found.
BtdrvBleScanStatus_ScanStarted = 255, ///< Scan started.
} BtdrvBleScanStatus;

/// BleAddressType
typedef enum {
BtdrvBleAddressType_Public = 0, ///< Public address.
BtdrvBleAddressType_Random = 1, ///< Random address.
BtdrvBleAddressType_PublicId = 2, ///< Public identity.
BtdrvBleAddressType_RandomId = 3, ///< Random identity.
} BtdrvBleAddressType;

/// BleScanFilterAction
typedef enum {
BtdrvBleScanFilterAction_Add = 0,
Expand Down
Loading