Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use tBDAddr in all places? #56

Open
gilbertjuly opened this issue Feb 2, 2016 · 2 comments
Open

use tBDAddr in all places? #56

gilbertjuly opened this issue Feb 2, 2016 · 2 comments

Comments

@gilbertjuly
Copy link
Collaborator

I noticed there is a data type called "tBDAddr" to describe Bluetooth device address.

Some API uses this data type to define its variable.

void ble_host_connect(tBDAddr bdaddr);

However, not all of the places use this, some of API still use uint8_t*, for example:

void ble_host_set_scan_param(uint8_t* own_address, uint8_t tx_power_level, uint16_t scan_interval);

Apparently, tBDAddr is a better choice compared with unit8_t * when referring to a specific data type. agree?

@junfenggeng
Copy link

we should name it as bdaddr_t to follow the conventions. beside, beaddr_t is better because BLE address has a type and a 6 bytes mac. So byte array is not complete.

@gilbertjuly
Copy link
Collaborator Author

same as tBleStatus, it is a low level data type, should not be directly used in app level.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants