Error in unused defines
ID: LPCBARESDK-755
Status: Fixed
First reported: 6.0.14.1114
Fixed in: 6.0.20.1338
Description
In the SDK file …/sdk/platform/core_modules/common/api/co_bt.h. there are some defines covering the fragments of the BD Address. These defines are not used anywhere in the SDK.
/**
* BD Address format (values in bytes)
* | 3B | 1B | 2B |
* | LAP | UAP | NAP |
*/
#define BD_ADDR_LEN 6
#define BD_ADDR_LAP_POS 0
#define BD_ADDR_LAP_LEN 3
#define BD_ADDR_UAP_POS BD_ADDR_LAP_LEN
#define BD_ADDR_UAP_LEN 1
#define BD_ADDR_NAP_POS BD_ADDR_UAP_LEN
#define BD_ADDR_NAP_LEN 2
Workaround
The value for BD_ADDR_NAP_POS should be BD_ADDR_UAP_POS + BD_ADDR_UAP_LEN and not just BD_ADDR_UAP_LEN.
/**
* BD Address format (values in bytes)
* | 3B | 1B | 2B |
* | LAP | UAP | NAP |
*/
#define BD_ADDR_LEN 6
#define BD_ADDR_LAP_POS 0
#define BD_ADDR_LAP_LEN 3
#define BD_ADDR_UAP_POS BD_ADDR_LAP_LEN
#define BD_ADDR_UAP_LEN 1
#define BD_ADDR_NAP_POS BD_ADDR_UAP_POS + BD_ADDR_UAP_LEN
#define BD_ADDR_NAP_LEN 2