Skip to content
Snippets Groups Projects
Commit 9e34ea2a authored by schneider's avatar schneider
Browse files

chore(bondings): Remove unused device name fields

parent 6a7b56b4
No related branches found
No related tags found
1 merge request!402New pairing database
...@@ -81,8 +81,6 @@ typedef struct ...@@ -81,8 +81,6 @@ typedef struct
typedef struct typedef struct
{ {
appDbRec_t rec[APP_DB_NUM_RECS]; /*! Device database records */ appDbRec_t rec[APP_DB_NUM_RECS]; /*! Device database records */
char devName[ATT_DEFAULT_PAYLOAD_LEN]; /*! Device name */
uint8_t devNameLen; /*! Device name length */
} appDb_t; } appDb_t;
/************************************************************************************************** /**************************************************************************************************
...@@ -581,48 +579,6 @@ void AppDbSetHdlList(appDbHdl_t hdl, uint16_t *pHdlList) ...@@ -581,48 +579,6 @@ void AppDbSetHdlList(appDbHdl_t hdl, uint16_t *pHdlList)
memcpy(((appDbRec_t *) hdl)->hdlList, pHdlList, sizeof(((appDbRec_t *) hdl)->hdlList)); memcpy(((appDbRec_t *) hdl)->hdlList, pHdlList, sizeof(((appDbRec_t *) hdl)->hdlList));
} }
/*************************************************************************************************/
/*!
* \brief Get the device name.
*
* \param pLen Returned device name length.
*
* \return Pointer to UTF-8 string containing device name or NULL if not set.
*/
/*************************************************************************************************/
char *AppDbGetDevName(uint8_t *pLen)
{
/* if first character of name is NULL assume it is uninitialized */
if (appDb.devName[0] == 0)
{
*pLen = 0;
return NULL;
}
else
{
*pLen = appDb.devNameLen;
return appDb.devName;
}
}
/*************************************************************************************************/
/*!
* \brief Set the device name.
*
* \param len Device name length.
* \param pStr UTF-8 string containing device name.
*
* \return None.
*/
/*************************************************************************************************/
void AppDbSetDevName(uint8_t len, char *pStr)
{
/* check for maximum device length */
len = (len <= sizeof(appDb.devName)) ? len : sizeof(appDb.devName);
memcpy(appDb.devName, pStr, len);
}
/*************************************************************************************************/ /*************************************************************************************************/
/*! /*!
* \brief Get address resolution attribute value read from a peer device. * \brief Get address resolution attribute value read from a peer device.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment