Zephyr API Documentation 4.0.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
gap.h
Go to the documentation of this file.
1
5/*
6 * Copyright (c) 2019 Nordic Semiconductor ASA
7 *
8 * SPDX-License-Identifier: Apache-2.0
9 */
10
11#ifndef ZEPHYR_INCLUDE_BLUETOOTH_GAP_H_
12#define ZEPHYR_INCLUDE_BLUETOOTH_GAP_H_
13
16
17#ifdef __cplusplus
18extern "C" {
19#endif
20
32#define BT_COMP_ID_LF 0x05f1
41#define BT_DATA_FLAGS 0x01
42#define BT_DATA_UUID16_SOME 0x02
43#define BT_DATA_UUID16_ALL 0x03
44#define BT_DATA_UUID32_SOME 0x04
45#define BT_DATA_UUID32_ALL 0x05
46#define BT_DATA_UUID128_SOME 0x06
47#define BT_DATA_UUID128_ALL 0x07
48#define BT_DATA_NAME_SHORTENED 0x08
49#define BT_DATA_NAME_COMPLETE 0x09
50#define BT_DATA_TX_POWER 0x0a
51#define BT_DATA_DEVICE_CLASS 0x0d
52#define BT_DATA_SIMPLE_PAIRING_HASH_C192 0x0e
53#define BT_DATA_SIMPLE_PAIRING_RAND_C192 0x0f
54#define BT_DATA_DEVICE_ID 0x10
55#define BT_DATA_SM_TK_VALUE 0x10
56#define BT_DATA_SM_OOB_FLAGS 0x11
57#define BT_DATA_PERIPHERAL_INT_RANGE 0x12
58#define BT_DATA_SOLICIT16 0x14
59#define BT_DATA_SOLICIT128 0x15
60#define BT_DATA_SVC_DATA16 0x16
61#define BT_DATA_PUB_TARGET_ADDR 0x17
62#define BT_DATA_RAND_TARGET_ADDR 0x18
63#define BT_DATA_GAP_APPEARANCE 0x19
64#define BT_DATA_ADV_INT 0x1a
65#define BT_DATA_LE_BT_DEVICE_ADDRESS 0x1b
66#define BT_DATA_LE_ROLE 0x1c
67#define BT_DATA_SIMPLE_PAIRING_HASH 0x1d
68#define BT_DATA_SIMPLE_PAIRING_RAND 0x1e
69#define BT_DATA_SOLICIT32 0x1f
70#define BT_DATA_SVC_DATA32 0x20
71#define BT_DATA_SVC_DATA128 0x21
72#define BT_DATA_LE_SC_CONFIRM_VALUE 0x22
73#define BT_DATA_LE_SC_RANDOM_VALUE 0x23
74#define BT_DATA_URI 0x24
75#define BT_DATA_INDOOR_POS 0x25
76#define BT_DATA_TRANS_DISCOVER_DATA 0x26
77#define BT_DATA_LE_SUPPORTED_FEATURES 0x27
78#define BT_DATA_CHANNEL_MAP_UPDATE_IND 0x28
79#define BT_DATA_MESH_PROV 0x29
80#define BT_DATA_MESH_MESSAGE 0x2a
81#define BT_DATA_MESH_BEACON 0x2b
82#define BT_DATA_BIG_INFO 0x2c
83#define BT_DATA_BROADCAST_CODE 0x2d
84#define BT_DATA_CSIS_RSI 0x2e
85#define BT_DATA_ADV_INT_LONG 0x2f
86#define BT_DATA_BROADCAST_NAME 0x30
87#define BT_DATA_ENCRYPTED_AD_DATA 0x31
88#define BT_DATA_PAWR_TIMING_INFO 0x32
89#define BT_DATA_ESL 0x34
90#define BT_DATA_3D_INFO 0x3D
92#define BT_DATA_MANUFACTURER_DATA 0xff
94#define BT_LE_AD_LIMITED 0x01
95#define BT_LE_AD_GENERAL 0x02
96#define BT_LE_AD_NO_BREDR 0x04
108#define BT_APPEARANCE_UNKNOWN 0x0000
110#define BT_APPEARANCE_GENERIC_PHONE 0x0040
112#define BT_APPEARANCE_GENERIC_COMPUTER 0x0080
114#define BT_APPEARANCE_COMPUTER_DESKTOP_WORKSTATION 0x0081
116#define BT_APPEARANCE_COMPUTER_SERVER_CLASS 0x0082
118#define BT_APPEARANCE_COMPUTER_LAPTOP 0x0083
120#define BT_APPEARANCE_COMPUTER_HANDHELD_PCPDA 0x0084
122#define BT_APPEARANCE_COMPUTER_PALMSIZE_PCPDA 0x0085
124#define BT_APPEARANCE_COMPUTER_WEARABLE_COMPUTER 0x0086
126#define BT_APPEARANCE_COMPUTER_TABLET 0x0087
128#define BT_APPEARANCE_COMPUTER_DOCKING_STATION 0x0088
130#define BT_APPEARANCE_COMPUTER_ALL_IN_ONE 0x0089
132#define BT_APPEARANCE_COMPUTER_BLADE_SERVER 0x008A
134#define BT_APPEARANCE_COMPUTER_CONVERTIBLE 0x008B
136#define BT_APPEARANCE_COMPUTER_DETACHABLE 0x008C
138#define BT_APPEARANCE_COMPUTER_IOT_GATEWAY 0x008D
140#define BT_APPEARANCE_COMPUTER_MINI_PC 0x008E
142#define BT_APPEARANCE_COMPUTER_STICK_PC 0x008F
144#define BT_APPEARANCE_GENERIC_WATCH 0x00C0
146#define BT_APPEARANCE_SPORTS_WATCH 0x00C1
148#define BT_APPEARANCE_SMARTWATCH 0x00C2
150#define BT_APPEARANCE_GENERIC_CLOCK 0x0100
152#define BT_APPEARANCE_GENERIC_DISPLAY 0x0140
154#define BT_APPEARANCE_GENERIC_REMOTE 0x0180
156#define BT_APPEARANCE_GENERIC_EYEGLASSES 0x01C0
158#define BT_APPEARANCE_GENERIC_TAG 0x0200
160#define BT_APPEARANCE_GENERIC_KEYRING 0x0240
162#define BT_APPEARANCE_GENERIC_MEDIA_PLAYER 0x0280
164#define BT_APPEARANCE_GENERIC_BARCODE_SCANNER 0x02C0
166#define BT_APPEARANCE_GENERIC_THERMOMETER 0x0300
168#define BT_APPEARANCE_THERMOMETER_EAR 0x0301
170#define BT_APPEARANCE_GENERIC_HEART_RATE 0x0340
172#define BT_APPEARANCE_HEART_RATE_BELT 0x0341
174#define BT_APPEARANCE_GENERIC_BLOOD_PRESSURE 0x0380
176#define BT_APPEARANCE_BLOOD_PRESSURE_ARM 0x0381
178#define BT_APPEARANCE_BLOOD_PRESSURE_WRIST 0x0382
180#define BT_APPEARANCE_GENERIC_HID 0x03C0
182#define BT_APPEARANCE_HID_KEYBOARD 0x03C1
184#define BT_APPEARANCE_HID_MOUSE 0x03C2
186#define BT_APPEARANCE_HID_JOYSTICK 0x03C3
188#define BT_APPEARANCE_HID_GAMEPAD 0x03C4
190#define BT_APPEARANCE_HID_DIGITIZER_TABLET 0x03C5
192#define BT_APPEARANCE_HID_CARD_READER 0x03C6
194#define BT_APPEARANCE_HID_DIGITAL_PEN 0x03C7
196#define BT_APPEARANCE_HID_BARCODE_SCANNER 0x03C8
198#define BT_APPEARANCE_HID_TOUCHPAD 0x03C9
200#define BT_APPEARANCE_HID_PRESENTATION_REMOTE 0x03CA
202#define BT_APPEARANCE_GENERIC_GLUCOSE 0x0400
204#define BT_APPEARANCE_GENERIC_WALKING 0x0440
206#define BT_APPEARANCE_WALKING_IN_SHOE 0x0441
208#define BT_APPEARANCE_WALKING_ON_SHOE 0x0442
210#define BT_APPEARANCE_WALKING_ON_HIP 0x0443
212#define BT_APPEARANCE_GENERIC_CYCLING 0x0480
214#define BT_APPEARANCE_CYCLING_COMPUTER 0x0481
216#define BT_APPEARANCE_CYCLING_SPEED 0x0482
218#define BT_APPEARANCE_CYCLING_CADENCE 0x0483
220#define BT_APPEARANCE_CYCLING_POWER 0x0484
222#define BT_APPEARANCE_CYCLING_SPEED_CADENCE 0x0485
224#define BT_APPEARANCE_GENERIC_CONTROL_DEVICE 0x04C0
226#define BT_APPEARANCE_CONTROL_SWITCH 0x04C1
228#define BT_APPEARANCE_CONTROL_MULTI_SWITCH 0x04C2
230#define BT_APPEARANCE_CONTROL_BUTTON 0x04C3
232#define BT_APPEARANCE_CONTROL_SLIDER 0x04C4
234#define BT_APPEARANCE_CONTROL_ROTARY_SWITCH 0x04C5
236#define BT_APPEARANCE_CONTROL_TOUCH_PANEL 0x04C6
238#define BT_APPEARANCE_CONTROL_SINGLE_SWITCH 0x04C7
240#define BT_APPEARANCE_CONTROL_DOUBLE_SWITCH 0x04C8
242#define BT_APPEARANCE_CONTROL_TRIPLE_SWITCH 0x04C9
244#define BT_APPEARANCE_CONTROL_BATTERY_SWITCH 0x04CA
246#define BT_APPEARANCE_CONTROL_ENERGY_HARVESTING_SWITCH 0x04CB
248#define BT_APPEARANCE_CONTROL_PUSH_BUTTON 0x04CC
250#define BT_APPEARANCE_GENERIC_NETWORK_DEVICE 0x0500
252#define BT_APPEARANCE_NETWORK_ACCESS_POINT 0x0501
254#define BT_APPEARANCE_NETWORK_MESH_DEVICE 0x0502
256#define BT_APPEARANCE_NETWORK_MESH_PROXY 0x0503
258#define BT_APPEARANCE_GENERIC_SENSOR 0x0540
260#define BT_APPEARANCE_SENSOR_MOTION 0x0541
262#define BT_APPEARANCE_SENSOR_AIR_QUALITY 0x0542
264#define BT_APPEARANCE_SENSOR_TEMPERATURE 0x0543
266#define BT_APPEARANCE_SENSOR_HUMIDITY 0x0544
268#define BT_APPEARANCE_SENSOR_LEAK 0x0545
270#define BT_APPEARANCE_SENSOR_SMOKE 0x0546
272#define BT_APPEARANCE_SENSOR_OCCUPANCY 0x0547
274#define BT_APPEARANCE_SENSOR_CONTACT 0x0548
276#define BT_APPEARANCE_SENSOR_CARBON_MONOXIDE 0x0549
278#define BT_APPEARANCE_SENSOR_CARBON_DIOXIDE 0x054A
280#define BT_APPEARANCE_SENSOR_AMBIENT_LIGHT 0x054B
282#define BT_APPEARANCE_SENSOR_ENERGY 0x054C
284#define BT_APPEARANCE_SENSOR_COLOR_LIGHT 0x054D
286#define BT_APPEARANCE_SENSOR_RAIN 0x054E
288#define BT_APPEARANCE_SENSOR_FIRE 0x054F
290#define BT_APPEARANCE_SENSOR_WIND 0x0550
292#define BT_APPEARANCE_SENSOR_PROXIMITY 0x0551
294#define BT_APPEARANCE_SENSOR_MULTI 0x0552
296#define BT_APPEARANCE_SENSOR_FLUSH_MOUNTED 0x0553
298#define BT_APPEARANCE_SENSOR_CEILING_MOUNTED 0x0554
300#define BT_APPEARANCE_SENSOR_WALL_MOUNTED 0x0555
302#define BT_APPEARANCE_MULTISENSOR 0x0556
304#define BT_APPEARANCE_SENSOR_ENERGY_METER 0x0557
306#define BT_APPEARANCE_SENSOR_FLAME_DETECTOR 0x0558
308#define BT_APPEARANCE_SENSOR_VEHICLE_TIRE_PRESSURE 0x0559
310#define BT_APPEARANCE_GENERIC_LIGHT_FIXTURES 0x0580
312#define BT_APPEARANCE_LIGHT_FIXTURES_WALL 0x0581
314#define BT_APPEARANCE_LIGHT_FIXTURES_CEILING 0x0582
316#define BT_APPEARANCE_LIGHT_FIXTURES_FLOOR 0x0583
318#define BT_APPEARANCE_LIGHT_FIXTURES_CABINET 0x0584
320#define BT_APPEARANCE_LIGHT_FIXTURES_DESK 0x0585
322#define BT_APPEARANCE_LIGHT_FIXTURES_TROFFER 0x0586
324#define BT_APPEARANCE_LIGHT_FIXTURES_PENDANT 0x0587
326#define BT_APPEARANCE_LIGHT_FIXTURES_IN_GROUND 0x0588
328#define BT_APPEARANCE_LIGHT_FIXTURES_FLOOD 0x0589
330#define BT_APPEARANCE_LIGHT_FIXTURES_UNDERWATER 0x058A
332#define BT_APPEARANCE_LIGHT_FIXTURES_BOLLARD_WITH 0x058B
334#define BT_APPEARANCE_LIGHT_FIXTURES_PATHWAY 0x058C
336#define BT_APPEARANCE_LIGHT_FIXTURES_GARDEN 0x058D
338#define BT_APPEARANCE_LIGHT_FIXTURES_POLE_TOP 0x058E
340#define BT_APPEARANCE_SPOT_LIGHT 0x058F
342#define BT_APPEARANCE_LIGHT_FIXTURES_LINEAR 0x0590
344#define BT_APPEARANCE_LIGHT_FIXTURES_STREET 0x0591
346#define BT_APPEARANCE_LIGHT_FIXTURES_SHELVES 0x0592
348#define BT_APPEARANCE_LIGHT_FIXTURES_BAY 0x0593
350#define BT_APPEARANCE_LIGHT_FIXTURES_EMERGENCY_EXIT 0x0594
352#define BT_APPEARANCE_LIGHT_FIXTURES_CONTROLLER 0x0595
354#define BT_APPEARANCE_LIGHT_FIXTURES_DRIVER 0x0596
356#define BT_APPEARANCE_LIGHT_FIXTURES_BULB 0x0597
358#define BT_APPEARANCE_LIGHT_FIXTURES_LOW_BAY 0x0598
360#define BT_APPEARANCE_LIGHT_FIXTURES_HIGH_BAY 0x0599
362#define BT_APPEARANCE_GENERIC_FAN 0x05C0
364#define BT_APPEARANCE_FAN_CEILING 0x05C1
366#define BT_APPEARANCE_FAN_AXIAL 0x05C2
368#define BT_APPEARANCE_FAN_EXHAUST 0x05C3
370#define BT_APPEARANCE_FAN_PEDESTAL 0x05C4
372#define BT_APPEARANCE_FAN_DESK 0x05C5
374#define BT_APPEARANCE_FAN_WALL 0x05C6
376#define BT_APPEARANCE_GENERIC_HVAC 0x0600
378#define BT_APPEARANCE_HVAC_THERMOSTAT 0x0601
380#define BT_APPEARANCE_HVAC_HUMIDIFIER 0x0602
382#define BT_APPEARANCE_HVAC_DEHUMIDIFIER 0x0603
384#define BT_APPEARANCE_HVAC_HEATER 0x0604
386#define BT_APPEARANCE_HVAC_RADIATOR 0x0605
388#define BT_APPEARANCE_HVAC_BOILER 0x0606
390#define BT_APPEARANCE_HVAC_HEAT_PUMP 0x0607
392#define BT_APPEARANCE_HVAC_INFRARED_HEATER 0x0608
394#define BT_APPEARANCE_HVAC_RADIANT_PANEL_HEATER 0x0609
396#define BT_APPEARANCE_HVAC_FAN_HEATER 0x060A
398#define BT_APPEARANCE_HVAC_AIR_CURTAIN 0x060B
400#define BT_APPEARANCE_GENERIC_AIR_CONDITIONING 0x0640
402#define BT_APPEARANCE_GENERIC_HUMIDIFIER 0x0680
404#define BT_APPEARANCE_GENERIC_HEATING 0x06C0
406#define BT_APPEARANCE_HEATING_RADIATOR 0x06C1
408#define BT_APPEARANCE_HEATING_BOILER 0x06C2
410#define BT_APPEARANCE_HEATING_HEAT_PUMP 0x06C3
412#define BT_APPEARANCE_HEATING_INFRARED_HEATER 0x06C4
414#define BT_APPEARANCE_HEATING_RADIANT_PANEL_HEATER 0x06C5
416#define BT_APPEARANCE_HEATING_FAN_HEATER 0x06C6
418#define BT_APPEARANCE_HEATING_AIR_CURTAIN 0x06C7
420#define BT_APPEARANCE_GENERIC_ACCESS_CONTROL 0x0700
422#define BT_APPEARANCE_CONTROL_ACCESS_DOOR 0x0701
424#define BT_APPEARANCE_CONTROL_GARAGE_DOOR 0x0702
426#define BT_APPEARANCE_CONTROL_EMERGENCY_EXIT_DOOR 0x0703
428#define BT_APPEARANCE_CONTROL_ACCESS_LOCK 0x0704
430#define BT_APPEARANCE_CONTROL_ELEVATOR 0x0705
432#define BT_APPEARANCE_CONTROL_WINDOW 0x0706
434#define BT_APPEARANCE_CONTROL_ENTRANCE_GATE 0x0707
436#define BT_APPEARANCE_CONTROL_DOOR_LOCK 0x0708
438#define BT_APPEARANCE_CONTROL_LOCKER 0x0709
440#define BT_APPEARANCE_GENERIC_MOTORIZED_DEVICE 0x0740
442#define BT_APPEARANCE_MOTORIZED_GATE 0x0741
444#define BT_APPEARANCE_MOTORIZED_AWNING 0x0742
446#define BT_APPEARANCE_MOTORIZED_BLINDS_OR_SHADES 0x0743
448#define BT_APPEARANCE_MOTORIZED_CURTAINS 0x0744
450#define BT_APPEARANCE_MOTORIZED_SCREEN 0x0745
452#define BT_APPEARANCE_GENERIC_POWER_DEVICE 0x0780
454#define BT_APPEARANCE_POWER_OUTLET 0x0781
456#define BT_APPEARANCE_POWER_STRIP 0x0782
458#define BT_APPEARANCE_POWER_PLUG 0x0783
460#define BT_APPEARANCE_POWER_SUPPLY 0x0784
462#define BT_APPEARANCE_POWER_LED_DRIVER 0x0785
464#define BT_APPEARANCE_POWER_FLUORESCENT_LAMP_GEAR 0x0786
466#define BT_APPEARANCE_POWER_HID_LAMP_GEAR 0x0787
468#define BT_APPEARANCE_POWER_CHARGE_CASE 0x0788
470#define BT_APPEARANCE_POWER_POWER_BANK 0x0789
472#define BT_APPEARANCE_GENERIC_LIGHT_SOURCE 0x07C0
474#define BT_APPEARANCE_LIGHT_SOURCE_INCANDESCENT_BULB 0x07C1
476#define BT_APPEARANCE_LIGHT_SOURCE_LED_LAMP 0x07C2
478#define BT_APPEARANCE_LIGHT_SOURCE_HID_LAMP 0x07C3
480#define BT_APPEARANCE_LIGHT_SOURCE_FLUORESCENT_LAMP 0x07C4
482#define BT_APPEARANCE_LIGHT_SOURCE_LED_ARRAY 0x07C5
484#define BT_APPEARANCE_LIGHT_SOURCE_MULTICOLOR_LED_ARRAY 0x07C6
486#define BT_APPEARANCE_LIGHT_SOURCE_LOW_VOLTAGE_HALOGEN 0x07C7
488#define BT_APPEARANCE_LIGHT_SOURCE_OLED 0x07C8
490#define BT_APPEARANCE_GENERIC_WINDOW_COVERING 0x0800
492#define BT_APPEARANCE_WINDOW_SHADES 0x0801
494#define BT_APPEARANCE_WINDOW_BLINDS 0x0802
496#define BT_APPEARANCE_WINDOW_AWNING 0x0803
498#define BT_APPEARANCE_WINDOW_CURTAIN 0x0804
500#define BT_APPEARANCE_WINDOW_EXTERIOR_SHUTTER 0x0805
502#define BT_APPEARANCE_WINDOW_EXTERIOR_SCREEN 0x0806
504#define BT_APPEARANCE_GENERIC_AUDIO_SINK 0x0840
506#define BT_APPEARANCE_AUDIO_SINK_STANDALONE_SPEAKER 0x0841
508#define BT_APPEARANCE_AUDIO_SINK_SOUNDBAR 0x0842
510#define BT_APPEARANCE_AUDIO_SINK_BOOKSHELF_SPEAKER 0x0843
512#define BT_APPEARANCE_AUDIO_SINK_STANDMOUNTED_SPEAKER 0x0844
514#define BT_APPEARANCE_AUDIO_SINK_SPEAKERPHONE 0x0845
516#define BT_APPEARANCE_GENERIC_AUDIO_SOURCE 0x0880
518#define BT_APPEARANCE_AUDIO_SOURCE_MICROPHONE 0x0881
520#define BT_APPEARANCE_AUDIO_SOURCE_ALARM 0x0882
522#define BT_APPEARANCE_AUDIO_SOURCE_BELL 0x0883
524#define BT_APPEARANCE_AUDIO_SOURCE_HORN 0x0884
526#define BT_APPEARANCE_AUDIO_SOURCE_BROADCASTING_DEVICE 0x0885
528#define BT_APPEARANCE_AUDIO_SOURCE_SERVICE_DESK 0x0886
530#define BT_APPEARANCE_AUDIO_SOURCE_KIOSK 0x0887
532#define BT_APPEARANCE_AUDIO_SOURCE_BROADCASTING_ROOM 0x0888
534#define BT_APPEARANCE_AUDIO_SOURCE_AUDITORIUM 0x0889
536#define BT_APPEARANCE_GENERIC_MOTORIZED_VEHICLE 0x08C0
538#define BT_APPEARANCE_VEHICLE_CAR 0x08C1
540#define BT_APPEARANCE_VEHICLE_LARGE_GOODS 0x08C2
542#define BT_APPEARANCE_VEHICLE_TWO_WHEELED 0x08C3
544#define BT_APPEARANCE_VEHICLE_MOTORBIKE 0x08C4
546#define BT_APPEARANCE_VEHICLE_SCOOTER 0x08C5
548#define BT_APPEARANCE_VEHICLE_MOPED 0x08C6
550#define BT_APPEARANCE_VEHICLE_THREE_WHEELED 0x08C7
552#define BT_APPEARANCE_VEHICLE_LIGHT 0x08C8
554#define BT_APPEARANCE_VEHICLE_QUAD_BIKE 0x08C9
556#define BT_APPEARANCE_VEHICLE_MINIBUS 0x08CA
558#define BT_APPEARANCE_VEHICLE_BUS 0x08CB
560#define BT_APPEARANCE_VEHICLE_TROLLEY 0x08CC
562#define BT_APPEARANCE_VEHICLE_AGRICULTURAL 0x08CD
564#define BT_APPEARANCE_VEHICLE_CAMPER_OR_CARAVAN 0x08CE
566#define BT_APPEARANCE_VEHICLE_RECREATIONAL 0x08CF
568#define BT_APPEARANCE_GENERIC_DOMESTIC_APPLIANCE 0x0900
570#define BT_APPEARANCE_APPLIANCE_REFRIGERATOR 0x0901
572#define BT_APPEARANCE_APPLIANCE_FREEZER 0x0902
574#define BT_APPEARANCE_APPLIANCE_OVEN 0x0903
576#define BT_APPEARANCE_APPLIANCE_MICROWAVE 0x0904
578#define BT_APPEARANCE_APPLIANCE_TOASTER 0x0905
580#define BT_APPEARANCE_APPLIANCE_WASHING_MACHINE 0x0906
582#define BT_APPEARANCE_APPLIANCE_DRYER 0x0907
584#define BT_APPEARANCE_APPLIANCE_COFFEE_MAKER 0x0908
586#define BT_APPEARANCE_APPLIANCE_CLOTHES_IRON 0x0909
588#define BT_APPEARANCE_APPLIANCE_CURLING_IRON 0x090A
590#define BT_APPEARANCE_APPLIANCE_HAIR_DRYER 0x090B
592#define BT_APPEARANCE_APPLIANCE_VACUUM_CLEANER 0x090C
594#define BT_APPEARANCE_APPLIANCE_ROBOTIC_VACUUM_CLEANER 0x090D
596#define BT_APPEARANCE_APPLIANCE_RICE_COOKER 0x090E
598#define BT_APPEARANCE_APPLIANCE_CLOTHES_STEAMER 0x090F
600#define BT_APPEARANCE_GENERIC_WEARABLE_AUDIO_DEVICE 0x0940
602#define BT_APPEARANCE_WEARABLE_AUDIO_DEVICE_EARBUD 0x0941
604#define BT_APPEARANCE_WEARABLE_AUDIO_DEVICE_HEADSET 0x0942
606#define BT_APPEARANCE_WEARABLE_AUDIO_DEVICE_HEADPHONES 0x0943
608#define BT_APPEARANCE_WEARABLE_AUDIO_DEVICE_NECK_BAND 0x0944
610#define BT_APPEARANCE_GENERIC_AIRCRAFT 0x0980
612#define BT_APPEARANCE_AIRCRAFT_LIGHT 0x0981
614#define BT_APPEARANCE_AIRCRAFT_MICROLIGHT 0x0982
616#define BT_APPEARANCE_AIRCRAFT_PARAGLIDER 0x0983
618#define BT_APPEARANCE_AIRCRAFT_LARGE_PASSENGER 0x0984
620#define BT_APPEARANCE_GENERIC_AV_EQUIPMENT 0x09C0
622#define BT_APPEARANCE_AV_EQUIPMENT_AMPLIFIER 0x09C1
624#define BT_APPEARANCE_AV_EQUIPMENT_RECEIVER 0x09C2
626#define BT_APPEARANCE_AV_EQUIPMENT_RADIO 0x09C3
628#define BT_APPEARANCE_AV_EQUIPMENT_TUNER 0x09C4
630#define BT_APPEARANCE_AV_EQUIPMENT_TURNTABLE 0x09C5
632#define BT_APPEARANCE_AV_EQUIPMENT_CD_PLAYER 0x09C6
634#define BT_APPEARANCE_AV_EQUIPMENT_DVD_PLAYER 0x09C7
636#define BT_APPEARANCE_AV_EQUIPMENT_BLURAY_PLAYER 0x09C8
638#define BT_APPEARANCE_AV_EQUIPMENT_OPTICAL_DISC_PLAYER 0x09C9
640#define BT_APPEARANCE_AV_EQUIPMENT_SET_TOP_BOX 0x09CA
642#define BT_APPEARANCE_GENERIC_DISPLAY_EQUIPMENT 0x0A00
644#define BT_APPEARANCE_DISPLAY_EQUIPMENT_TELEVISION 0x0A01
646#define BT_APPEARANCE_DISPLAY_EQUIPMENT_MONITOR 0x0A02
648#define BT_APPEARANCE_DISPLAY_EQUIPMENT_PROJECTOR 0x0A03
650#define BT_APPEARANCE_GENERIC_HEARING_AID 0x0A40
652#define BT_APPEARANCE_HEARING_AID_IN_EAR 0x0A41
654#define BT_APPEARANCE_HEARING_AID_BEHIND_EAR 0x0A42
656#define BT_APPEARANCE_HEARING_AID_COCHLEAR_IMPLANT 0x0A43
658#define BT_APPEARANCE_GENERIC_GAMING 0x0A80
660#define BT_APPEARANCE_HOME_VIDEO_GAME_CONSOLE 0x0A81
662#define BT_APPEARANCE_PORTABLE_HANDHELD_CONSOLE 0x0A82
664#define BT_APPEARANCE_GENERIC_SIGNAGE 0x0AC0
666#define BT_APPEARANCE_SIGNAGE_DIGITAL 0x0AC1
668#define BT_APPEARANCE_SIGNAGE_ELECTRONIC_LABEL 0x0AC2
670#define BT_APPEARANCE_GENERIC_PULSE_OXIMETER 0x0C40
672#define BT_APPEARANCE_PULSE_OXIMETER_FINGERTIP 0x0C41
674#define BT_APPEARANCE_PULSE_OXIMETER_WRIST 0x0C42
676#define BT_APPEARANCE_GENERIC_WEIGHT_SCALE 0x0C80
678#define BT_APPEARANCE_GENERIC_PERSONAL_MOBILITY_DEVICE 0x0CC0
680#define BT_APPEARANCE_MOBILITY_POWERED_WHEELCHAIR 0x0CC1
682#define BT_APPEARANCE_MOBILITY_SCOOTER 0x0CC2
684#define BT_APPEARANCE_CONTINUOUS_GLUCOSE_MONITOR 0x0D00
686#define BT_APPEARANCE_GENERIC_INSULIN_PUMP 0x0D40
688#define BT_APPEARANCE_INSULIN_PUMP_DURABLE 0x0D41
690#define BT_APPEARANCE_INSULIN_PUMP_PATCH 0x0D44
692#define BT_APPEARANCE_INSULIN_PEN 0x0D48
694#define BT_APPEARANCE_GENERIC_MEDICATION_DELIVERY 0x0D80
696#define BT_APPEARANCE_GENERIC_SPIROMETER 0x0DC0
698#define BT_APPEARANCE_SPIROMETER_HANDHELD 0x0DC1
700#define BT_APPEARANCE_GENERIC_OUTDOOR_SPORTS 0x1440
702#define BT_APPEARANCE_OUTDOOR_SPORTS_LOCATION 0x1441
704#define BT_APPEARANCE_OUTDOOR_SPORTS_LOCATION_AND_NAV 0x1442
706#define BT_APPEARANCE_OUTDOOR_SPORTS_LOCATION_POD 0x1443
708#define BT_APPEARANCE_OUTDOOR_SPORTS_LOCATION_POD_AND_NAV 0x1444
717#define BT_GAP_SCAN_FAST_INTERVAL_MIN 0x0030 /* 30 ms */
718#define BT_GAP_SCAN_FAST_INTERVAL 0x0060 /* 60 ms */
719#define BT_GAP_SCAN_FAST_WINDOW 0x0030 /* 30 ms */
720#define BT_GAP_SCAN_SLOW_INTERVAL_1 0x0800 /* 1.28 s */
721#define BT_GAP_SCAN_SLOW_WINDOW_1 0x0012 /* 11.25 ms */
722#define BT_GAP_SCAN_SLOW_INTERVAL_2 0x1000 /* 2.56 s */
723#define BT_GAP_SCAN_SLOW_WINDOW_2 0x0012 /* 11.25 ms */
724#define BT_GAP_ADV_FAST_INT_MIN_1 0x0030 /* 30 ms */
725#define BT_GAP_ADV_FAST_INT_MAX_1 0x0060 /* 60 ms */
726#define BT_GAP_ADV_FAST_INT_MIN_2 0x00a0 /* 100 ms */
727#define BT_GAP_ADV_FAST_INT_MAX_2 0x00f0 /* 150 ms */
728#define BT_GAP_ADV_SLOW_INT_MIN 0x0640 /* 1 s */
729#define BT_GAP_ADV_SLOW_INT_MAX 0x0780 /* 1.2 s */
730#define BT_GAP_PER_ADV_FAST_INT_MIN_1 0x0018 /* 30 ms */
731#define BT_GAP_PER_ADV_FAST_INT_MAX_1 0x0030 /* 60 ms */
732#define BT_GAP_PER_ADV_FAST_INT_MIN_2 0x0050 /* 100 ms */
733#define BT_GAP_PER_ADV_FAST_INT_MAX_2 0x0078 /* 150 ms */
734#define BT_GAP_PER_ADV_SLOW_INT_MIN 0x0320 /* 1 s */
735#define BT_GAP_PER_ADV_SLOW_INT_MAX 0x03C0 /* 1.2 s */
736#define BT_GAP_INIT_CONN_INT_MIN 0x0018 /* 30 ms */
737#define BT_GAP_INIT_CONN_INT_MAX 0x0028 /* 50 ms */
743enum {
752};
753
755enum {
768};
769
771enum {
782};
783
785#define BT_GAP_ADV_MAX_ADV_DATA_LEN 31
791#define BT_GAP_ADV_MAX_EXT_ADV_DATA_LEN 1650
792
793#define BT_GAP_TX_POWER_INVALID 0x7f
794#define BT_GAP_RSSI_INVALID 0x7f
795#define BT_GAP_SID_INVALID 0xff
796#define BT_GAP_NO_TIMEOUT 0x0000
797
798/* The maximum allowed high duty cycle directed advertising timeout, 1.28
799 * seconds in 10 ms unit.
800 */
801#define BT_GAP_ADV_HIGH_DUTY_CYCLE_MAX_TIMEOUT 128
802
804#define BT_GAP_DATA_LEN_DEFAULT 0x001b /* 27 bytes */
806#define BT_GAP_DATA_LEN_MAX 0x00fb /* 251 bytes */
807
809#define BT_GAP_DATA_TIME_DEFAULT 0x0148 /* 328 us */
811#define BT_GAP_DATA_TIME_MAX 0x4290 /* 17040 us */
812
814#define BT_GAP_SID_MAX 0x0F
818#define BT_GAP_PER_ADV_MAX_SKIP 0x01F3
820#define BT_GAP_PER_ADV_MIN_TIMEOUT 0x000A /* 100 ms */
822#define BT_GAP_PER_ADV_MAX_TIMEOUT 0x4000 /* 163.84 s */
824#define BT_GAP_PER_ADV_MIN_INTERVAL 0x0006 /* 7.5 ms */
826#define BT_GAP_PER_ADV_MAX_INTERVAL 0xFFFF /* 81.91875 s */
827
833#define BT_GAP_ADV_INTERVAL_TO_US(_interval) ((uint32_t)((_interval) * 625U))
834
843#define BT_GAP_ADV_INTERVAL_TO_MS(_interval) (BT_GAP_ADV_INTERVAL_TO_US(_interval) / USEC_PER_MSEC)
844
850#define BT_GAP_ISO_INTERVAL_TO_US(_interval) ((uint32_t)((_interval) * 1250U))
851
860#define BT_GAP_ISO_INTERVAL_TO_MS(_interval) (BT_GAP_ISO_INTERVAL_TO_US(_interval) / USEC_PER_MSEC)
861
867#define BT_GAP_PER_ADV_INTERVAL_TO_US(_interval) ((uint32_t)((_interval) * 1250U))
868
875#define BT_GAP_PER_ADV_INTERVAL_TO_MS(_interval) \
876 (BT_GAP_PER_ADV_INTERVAL_TO_US(_interval) / USEC_PER_MSEC)
877
886#define BT_GAP_US_TO_ADV_INTERVAL(_interval) ((uint16_t)((_interval) / 625U))
887
896#define BT_GAP_MS_TO_ADV_INTERVAL(_interval) \
897 (BT_GAP_US_TO_ADV_INTERVAL((_interval) * USEC_PER_MSEC))
898
907#define BT_GAP_US_TO_PER_ADV_INTERVAL(_interval) ((uint16_t)((_interval) / 1250U))
908
917#define BT_GAP_MS_TO_PER_ADV_INTERVAL(_interval) \
918 (BT_GAP_US_TO_PER_ADV_INTERVAL((_interval) * USEC_PER_MSEC))
919
928#define BT_GAP_MS_TO_PER_ADV_SYNC_TIMEOUT(_timeout) ((uint16_t)((_timeout) / 10U))
929
938#define BT_GAP_US_TO_PER_ADV_SYNC_TIMEOUT(_timeout) \
939 (BT_GAP_MS_TO_PER_ADV_SYNC_TIMEOUT((_timeout) / USEC_PER_MSEC))
940
950#define BT_GAP_US_TO_SCAN_INTERVAL(_interval) ((uint16_t)((_interval) / 625U))
951
961#define BT_GAP_MS_TO_SCAN_INTERVAL(_interval) \
962 (BT_GAP_US_TO_SCAN_INTERVAL((_interval) * USEC_PER_MSEC))
963
973#define BT_GAP_US_TO_SCAN_WINDOW(_window) ((uint16_t)((_window) / 625U))
974
984#define BT_GAP_MS_TO_SCAN_WINDOW(_window) (BT_GAP_US_TO_SCAN_WINDOW((_window) * USEC_PER_MSEC))
985
994#define BT_GAP_US_TO_CONN_INTERVAL(_interval) ((uint16_t)((_interval) / 1250U))
995
1004#define BT_GAP_MS_TO_CONN_INTERVAL(_interval) \
1005 (BT_GAP_US_TO_CONN_INTERVAL((_interval) * USEC_PER_MSEC))
1006
1015#define BT_GAP_MS_TO_CONN_TIMEOUT(_timeout) ((uint16_t)((_timeout) / 10U))
1016
1025#define BT_GAP_US_TO_CONN_TIMEOUT(_timeout) (BT_GAP_MS_TO_CONN_TIMEOUT((_timeout) / USEC_PER_MSEC))
1026
1035#define BT_GAP_US_TO_CONN_EVENT_LEN(_event_len) ((uint16_t)((_event_len) / 625U))
1036
1045#define BT_GAP_MS_TO_CONN_EVENT_LEN(_event_len) \
1046 (BT_GAP_US_TO_CONN_EVENT_LEN((_event_len) * USEC_PER_MSEC))
1047
1049enum {
1058};
1059
1061enum {
1071};
1072
1092#define BT_LE_SUPP_FEAT_40_ENCODE(w64) BT_BYTES_LIST_LE40(w64)
1093
1112#define BT_LE_SUPP_FEAT_32_ENCODE(w64) BT_BYTES_LIST_LE32(w64)
1113
1133#define BT_LE_SUPP_FEAT_24_ENCODE(w64) BT_BYTES_LIST_LE24(w64)
1134
1154#define BT_LE_SUPP_FEAT_16_ENCODE(w64) BT_BYTES_LIST_LE16(w64)
1155
1175#define BT_LE_SUPP_FEAT_8_ENCODE(w64) \
1176 (((w64) >> 0) & 0xFF)
1177
1186#define BT_LE_SUPP_FEAT_VALIDATE(w64) \
1187 BUILD_ASSERT(!((w64) & (~BIT64_MASK(40))), \
1188 "RFU bit in LE Supported Features are not zeros.")
1189
1194#ifdef __cplusplus
1195}
1196#endif
1197
1198#endif /* ZEPHYR_INCLUDE_BLUETOOTH_GAP_H_ */
Bluetooth byteorder API.
@ BT_GAP_SCA_21_30
21 ppm to 30 ppm
Definition gap.h:1069
@ BT_GAP_SCA_31_50
31 ppm to 50 ppm
Definition gap.h:1068
@ BT_GAP_SCA_101_150
101 ppm to 150 ppm
Definition gap.h:1065
@ BT_GAP_SCA_251_500
251 ppm to 500 ppm
Definition gap.h:1063
@ BT_GAP_SCA_51_75
51 ppm to 75 ppm
Definition gap.h:1067
@ BT_GAP_SCA_76_100
76 ppm to 100 ppm
Definition gap.h:1066
@ BT_GAP_SCA_151_250
151 ppm to 250 ppm
Definition gap.h:1064
@ BT_GAP_SCA_0_20
0 ppm to 20 ppm
Definition gap.h:1070
@ BT_GAP_SCA_UNKNOWN
Unknown.
Definition gap.h:1062
@ BT_GAP_LE_PHY_1M
LE 1M PHY.
Definition gap.h:747
@ BT_GAP_LE_PHY_2M
LE 2M PHY.
Definition gap.h:749
@ BT_GAP_LE_PHY_CODED
LE Coded PHY.
Definition gap.h:751
@ BT_GAP_LE_PHY_NONE
Convenience macro for when no PHY is set.
Definition gap.h:745
@ BT_GAP_ADV_PROP_DIRECTED
Directed advertising.
Definition gap.h:777
@ BT_GAP_ADV_PROP_SCAN_RESPONSE
Additional advertising data requested by an active scanner.
Definition gap.h:779
@ BT_GAP_ADV_PROP_SCANNABLE
Scannable advertising.
Definition gap.h:775
@ BT_GAP_ADV_PROP_EXT_ADV
Extended advertising.
Definition gap.h:781
@ BT_GAP_ADV_PROP_CONNECTABLE
Connectable advertising.
Definition gap.h:773
@ BT_GAP_ADV_TYPE_ADV_DIRECT_IND
Directed connectable advertising.
Definition gap.h:759
@ BT_GAP_ADV_TYPE_EXT_ADV
Extended advertising, see advertising properties.
Definition gap.h:767
@ BT_GAP_ADV_TYPE_SCAN_RSP
Additional advertising data requested by an active scanner.
Definition gap.h:765
@ BT_GAP_ADV_TYPE_ADV_NONCONN_IND
Non-connectable and non-scannable advertising.
Definition gap.h:763
@ BT_GAP_ADV_TYPE_ADV_SCAN_IND
Non-connectable and scannable advertising.
Definition gap.h:761
@ BT_GAP_ADV_TYPE_ADV_IND
Scannable and connectable advertising.
Definition gap.h:757
@ BT_GAP_CTE_AOD_2US
Angle of Departure with 2 us slots.
Definition gap.h:1055
@ BT_GAP_CTE_AOA
Angle of Arrival.
Definition gap.h:1051
@ BT_GAP_CTE_AOD_1US
Angle of Departure with 1 us slots.
Definition gap.h:1053
@ BT_GAP_CTE_NONE
No extensions.
Definition gap.h:1057
#define BIT(n)
Unsigned integer with bit position n set (signed in assembly language).
Definition util_macro.h:44
Macro utilities.