make lookupConvertedUUIDTable() static again

This commit is contained in:
Rohit Grover 2014-09-22 11:11:18 +01:00
parent 612f3540b0
commit 79b1e7282d
2 changed files with 3 additions and 11 deletions

View File

@ -37,8 +37,8 @@ converted_uuid_table_entry_t convertedUUIDTable[UUID_TABLE_MAX_ENTRIES];
* @param recoveredType the type field of the 3-byte nRF's uuid.
* @return true if a match is found.
*/
bool
custom_lookupConvertedUUIDTable(const LongUUIDBytes_t uuid, uint8_t *recoveredType)
static bool
lookupConvertedUUIDTable(const LongUUIDBytes_t uuid, uint8_t *recoveredType)
{
unsigned i;
for (i = 0; i < uuidTableEntries; i++) {
@ -86,7 +86,7 @@ ble_uuid_t custom_convert_to_nordic_uuid(const UUID &uuid)
if (uuid.shortOrLong() == UUID::UUID_TYPE_SHORT) {
nordicUUID.type = BLE_UUID_TYPE_BLE;
} else {
if (!custom_lookupConvertedUUIDTable(uuid.getBaseUUID(), &nordicUUID.type)) {
if (!lookupConvertedUUIDTable(uuid.getBaseUUID(), &nordicUUID.type)) {
nordicUUID.type = custom_add_uuid_base(uuid.getBaseUUID());
addToConvertedUUIDTable(uuid.getBaseUUID(), nordicUUID.type);
}

View File

@ -30,14 +30,6 @@ error_t custom_decode_uuid(uint8_t const *const p_uuid_base,
ble_uuid_t *p_uuid);
ble_uuid_t custom_convert_to_nordic_uuid(const UUID &uuid);
/**
* lookup the cache of previously converted 128-bit UUIDs to find a type value.
* @param uuid base 128-bit UUID
* @param recoveredType the type field of the 3-byte nRF's uuid.
* @return true if a match is found.
*/
bool custom_lookupConvertedUUIDTable(const LongUUIDBytes_t uuid, uint8_t *recoveredType);
error_t custom_add_in_characteristic(uint16_t service_handle,
ble_uuid_t *p_uuid,
uint8_t properties,