Make it clearer which functions are not part of the official SDK. Some functions were already implemented but not exported ...

This commit is contained in:
anschrammh 2025-02-05 20:56:47 +01:00
parent 17480e895f
commit 3afc770e39
5 changed files with 72 additions and 1 deletions

View File

@ -236,11 +236,32 @@ tls_os_task_t tls_os_task_id();
u8 tls_os_task_schedule_state();
/** NOT PART OF THE OFFICIAL SDK **/
/**
* @brief Suspends a task, if NULL is given, calling task is suspended
*
* @param task handle of the task to suspend or NULL for the current task
* @return tls_os_status_t TLS_OS_SUCCESS if the call was successful
*/
tls_os_status_t tls_os_task_suspend(tls_os_task_t task);
/**
* @brief Resumes a suspended task with @ref tls_os_task_suspend
*
* @param task handle of the task to suspend or NULL for the current task
* @return tls_os_status_t TLS_OS_SUCCESS if the call was successful
*/
tls_os_status_t tls_os_task_resume(tls_os_task_t task);
/**
* @brief Resumes a suspended task with @ref tls_os_task_suspend
* from an ISR (Interrupt Service Routine)
*
* @param task handle of the task to suspend or NULL for the current task
* @return tls_os_status_t TLS_OS_SUCCESS if the call was successful
*/
tls_os_status_t tls_os_task_resume_from_isr(tls_os_task_t task);
/**********************************/
/**
* @brief This function creates a mutual exclusion semaphore

View File

@ -84,7 +84,15 @@ void * mem_alloc_debug(u32 size);
void mem_free_debug(void *p);
void * mem_realloc_debug(void *mem_address, u32 size);
void *mem_calloc_debug(u32 length, u32 size);
/** NOT PART OF THE OFFICIAL SDK **/
/**
* @brief Returns the currently available heap size in bytes
*
* @return u32 the size in bytes of the available heap memory
*/
u32 tls_mem_get_avail_heapsize(void);
/**********************************/
/**
* @defgroup System_APIs System APIs

View File

@ -33,11 +33,30 @@ int string_to_uint(char *buf, u32 *d);
int string_to_ipaddr(const char *buf, u8 *addr);
char * strdup(const char *s);
char * strndup(const char *s, size_t len);
/** NOT PART OF THE OFFICIAL SDK **/
/**
* @brief The strcmp() function compares the two strings s1 and s2. It returns an integer less than, equal to, or
* greater than zero if s1 is found, respectively, to be less than, to match, or be greater than s2.
* The strncmp() function is similar, except it compares only the first (at most) n bytes of s1 and s2.
*
* @param s1 first string to compare
* @param s2 second string to compare
* @return int The strcmp() and strncmp() functions return an integer less than, equal to, or greater than zero if s1 (or the
* first n bytes thereof) is found, respectively, to be less than, to match, or be greater than s2.
*/
int strcasecmp(const char *s1, const char *s2);
/**********************************/
int sendchar(int ch);
void dumpBuffer(char *name, char* buffer, int len);
void dumpUint32(char *name, u32* buffer, int len);
/** NOT PART OF THE OFFICIAL SDK **/
/**
* @brief Sends a character on the debug uart
*
* @param ch the character to send
* @return int the character passed as input
*/
int sendchar_debug_uart(int ch);
/**********************************/
#endif /* UTILS_H */

View File

@ -150,6 +150,7 @@ const char *tls_bt_rc_2_str(uint32_t event)
}
}
/** NOT PART OF THE OFFICIAL SDK **/
const char *tls_bt_addr_type_2_str(uint8_t addr_type)
{
switch(addr_type)
@ -194,6 +195,7 @@ const char *tls_bt_sm_ioact_2_str(uint8_t ioact)
return "unknown io action type";
}
}
/**********************************/
static void async_evt_func(struct ble_npl_event *ev)
{

View File

@ -54,9 +54,30 @@ extern tls_bt_log_level_t tls_appl_trace_level;
void tls_bt_log(uint32_t trace_set_mask, const char *fmt_str, ...);
const char *tls_bt_gap_evt_2_str(uint32_t event);
const char *tls_bt_rc_2_str(uint32_t event);
/** NOT PART OF THE OFFICIAL SDK **/
/**
* @brief Returns the BLE address type as a string
*
* @param addr_type the BLE address type
* @return const char* the corresponding type as a string
*/
const char *tls_bt_addr_type_2_str(uint8_t addr_type);
/**
* @brief Returns the BLE GATT access option as a string
*
* @param op the BLE GATT access option
* @return const char* the corresponding type as a string
*/
const char *tls_bt_access_opt_2_str(uint8_t op);
/**
* @brief Returns the BLE input/output action as a string
*
* @param ioact the BLE GATT input/output option
* @return const char* the corresponding type as a string
*/
const char *tls_bt_sm_ioact_2_str(uint8_t ioact);
/**********************************/
extern int tls_bt_util_init(void);
extern int tls_bt_util_deinit(void);