cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC™ 4

IvBu_1817031
New Contributor II

There are two definitions with similar names but different values in CyBle_StackGap.h - CYBLE_GAP_ADDR_TYPE_PUBLIC (value 0), and CYBLE_GAP_PUBLIC_ADDR. (value 2). The structure CYBLE_GAP_BD_ADDR_T also has a field named type, which should be 0 for a public address and 1 for a random one.

I would like to clarify how I can correctly use those definitions - when or where is each one of them intended to be used?

0 Likes
1 Solution
VenkataD_41
Moderator
Moderator

Hi,

>>"I would like to clarify how I can correctly use those definitions - when or where is each one of them intended to be used?"

--> The enumerated type CYBLE_GAP_PUBLIC_ADDR is a part of the enum variable CYBLE_GAP_ADDR_TYPE_T. The usage of this enum variable is only associated with the API CyBle_GapGenerateDeviceAddress().

--> Where as  CYBLE_GAP_BD_ADDR_T is a structure that stores the 6 byte address as well as the type of the address (primarily public or random).

So there is no need to get confused. Please go through the API definition, description and use the corresponding enumerator/structure accordingly.

Hope this helps !

Thanks

Ganesh

View solution in original post

0 Likes
2 Replies