|
AM263x MCU+ SDK
10.00.00
|
|
Go to the documentation of this file.
69 #include UB_OVERRIDE_H
81 #include "ub_fileio.h"
82 #include "ub_getmem.h"
88 #ifndef CLOCK_MONOTONIC
89 #define CLOCK_MONOTONIC CLOCK_REALTIME
101 #define no_argument 0
102 #define required_argument 1
103 #define optional_argument 2
104 static inline int getopt_long(
int argc,
char **argv,
char *optstr,
105 struct option *lo,
int *li)
107 return getopt(argc, argv, optstr);
111 #define UB_UNIBASE_LOGCAT 0
127 typedef void* (*ub_mutex_init)(void);
137 typedef struct unibase_cb_set {
151 typedef struct unibase_init_para {
195 if(cond) {
return false;}
initialization parameters
Definition: unibase.h:151
ub_mutex_init get_static_mutex
get_static_mutex callback
Definition: unibase.h:140
int(* ub_mutex_close)(void *mutex)
mutex de-initialization function
Definition: unibase.h:128
void unibase_close(void)
claose unibase
@ UB_CLOCK_REALTIME
Definition: unibase.h:120
bool ub_fatalerror(void)
return the fatal error status
Utility functions for strings.
ub_debug_out debug_out
debug_out callback
Definition: unibase.h:139
Provides functions for configuring from a file.
@ UB_CLOCK_MONOTONIC
Definition: unibase.h:121
void(* ub_fatal_func)(void)
function to process a fatal error event
Definition: unibase.h:131
int(* ub_debug_out)(bool flush, const char *str)
debug output function
Definition: unibase.h:126
unibase_cb_set_t cbset
a set of callback functions
Definition: unibase.h:152
void *(* ub_mutex_init)(void)
mutex initialization function
Definition: unibase.h:127
int unibase_init(unibase_init_para_t *ub_init_para)
initialize unibase
ub_mutex_unlock mutex_unlock
mutex_unlock callback
Definition: unibase.h:143
uint64_t(* ub_gettime64)(ub_clocktype_t ctype)
64-bit timestamp function
Definition: unibase.h:132
ub_gettime64 gettime64
gettime64 callback
Definition: unibase.h:144
Control logging by levels and categories.
static bool ub_assert_fatal(bool cond, const char *mes1, const char *mes2)
conditinal ub_fatal
Definition: unibase.h:193
ub_console_out console_out
console_out callback
Definition: unibase.h:138
@ UB_CLOCK_GPTP
Definition: unibase.h:122
ub_fatal_func fatal
fatal callback
Definition: unibase.h:145
int(* ub_console_out)(bool flush, const char *str)
console output function
Definition: unibase.h:125
uint64_t ub_mt_gettime64(void)
get 64-bit MONOTONIC clock value
const char * ub_log_initstr
look at 'ub_log_init' in 'ub_logging.h'
Definition: unibase.h:153
uint64_t ub_rt_gettime64(void)
get 64-bit REALTIME clock value
@ UB_CLOCK_DEFAULT
Definition: unibase.h:119
uint64_t ub_gptp_gettime64(void)
get 64-bit PTP clock value
ub_mutex_lock mutex_lock
mutex_lock callback
Definition: unibase.h:142
a set of callback functions to process platform specific tasks
Definition: unibase.h:137
ub_mutex_close static_mutex_close
static_mutex_close callback
Definition: unibase.h:141
Utility macros for convenience.
int(* ub_mutex_lock)(void *mutex)
mutex lock function
Definition: unibase.h:129
void ub_fatal(const char *mes1, const char *mes2)
process a fatal error
int(* ub_mutex_unlock)(void *mutex)
mutex unlock function
Definition: unibase.h:130
Allocated memory array which is expanded or shrinked automatically.
ub_clocktype_t
clock type which provides timestamp
Definition: unibase.h:118