btstack_tlv: add const to btstack_tlv_t *

This commit is contained in:
Matthias Ringwald 2017-10-23 16:36:12 +02:00
parent 853ebd39af
commit 661f177d82
2 changed files with 6 additions and 6 deletions

View File

@ -37,15 +37,15 @@
#include "btstack_tlv.h"
static btstack_tlv_t * btstack_tlv_singleton_impl;
static void * btstack_tlv_singleton_context;
static const btstack_tlv_t * btstack_tlv_singleton_impl;
static void * btstack_tlv_singleton_context;
void btstack_tlv_set_instance(btstack_tlv_t * tlv_impl, void * tlv_context){
void btstack_tlv_set_instance(const btstack_tlv_t * tlv_impl, void * tlv_context){
btstack_tlv_singleton_impl = tlv_impl;
btstack_tlv_singleton_context = tlv_context;
}
void btstack_tlv_get_instance(btstack_tlv_t ** tlv_impl, void ** tlv_context){
void btstack_tlv_get_instance(const btstack_tlv_t ** tlv_impl, void ** tlv_context){
*tlv_impl = btstack_tlv_singleton_impl;
*tlv_context = btstack_tlv_singleton_context;
}

View File

@ -82,14 +82,14 @@ typedef struct {
* @param tlv_impl
* @param tlv_context
*/
void btstack_tlv_set_instance(btstack_tlv_t * tlv_impl, void * tlv_context);
void btstack_tlv_set_instance(const btstack_tlv_t * tlv_impl, void * tlv_context);
/**
* @brief Get current TLV implementation. Used for bonding information, but can be used by application, too.
* @param tlv_impl
* @param tlv_context
*/
void btstack_tlv_get_instance(btstack_tlv_t ** tlv_impl, void ** tlv_context);
void btstack_tlv_get_instance(const btstack_tlv_t ** tlv_impl, void ** tlv_context);
#if defined __cplusplus
}