Golioth Firmware SDK
|
#include <stdint.h>
#include <inttypes.h>
#include <stdbool.h>
#include <stdlib.h>
#include <golioth/config.h>
Go to the source code of this file.
Data Structures | |
struct | golioth_timer_config |
struct | golioth_thread_config |
Macros | |
#define | GOLIOTH_SYS_WAIT_FOREVER -1 |
#define | golioth_sys_malloc(sz) malloc((sz)) |
#define | golioth_sys_free(ptr) free((ptr)) |
#define | golioth_sys_srand(seed) srand((seed)) |
#define | golioth_sys_rand() rand() |
#define | GLTH_LOGV(TAG, ...) |
#define | GLTH_LOGD(TAG, ...) |
#define | GLTH_LOGI(TAG, ...) |
#define | GLTH_LOGW(TAG, ...) |
#define | GLTH_LOGE(TAG, ...) |
#define | GLTH_LOG_BUFFER_HEXDUMP(TAG, ...) |
Typedefs | |
typedef void * | golioth_sys_sem_t |
typedef void * | golioth_sys_timer_t |
typedef void(* | golioth_sys_timer_fn_t) (golioth_sys_timer_t timer, void *user_arg) |
typedef void * | golioth_sys_thread_t |
typedef void(* | golioth_sys_thread_fn_t) (void *user_arg) |
Functions | |
void | golioth_sys_msleep (uint32_t ms) |
uint64_t | golioth_sys_now_ms (void) |
golioth_sys_sem_t | golioth_sys_sem_create (uint32_t sem_max_count, uint32_t sem_initial_count) |
bool | golioth_sys_sem_take (golioth_sys_sem_t sem, int32_t ms_to_wait) |
bool | golioth_sys_sem_give (golioth_sys_sem_t sem) |
void | golioth_sys_sem_destroy (golioth_sys_sem_t sem) |
int | golioth_sys_sem_get_fd (golioth_sys_sem_t sem) |
golioth_sys_timer_t | golioth_sys_timer_create (const struct golioth_timer_config *config) |
bool | golioth_sys_timer_start (golioth_sys_timer_t timer) |
bool | golioth_sys_timer_reset (golioth_sys_timer_t timer) |
void | golioth_sys_timer_destroy (golioth_sys_timer_t timer) |
golioth_sys_thread_t | golioth_sys_thread_create (const struct golioth_thread_config *config) |
void | golioth_sys_thread_destroy (golioth_sys_thread_t thread) |
void | golioth_sys_client_connected (void *client) |
void | golioth_sys_client_disconnected (void *client) |
#define GLTH_LOG_BUFFER_HEXDUMP | ( | TAG, | |
... ) |
Definition at line 195 of file golioth_sys.h.
#define GLTH_LOGD | ( | TAG, | |
... ) |
Definition at line 191 of file golioth_sys.h.
#define GLTH_LOGE | ( | TAG, | |
... ) |
Definition at line 194 of file golioth_sys.h.
#define GLTH_LOGI | ( | TAG, | |
... ) |
Definition at line 192 of file golioth_sys.h.
#define GLTH_LOGV | ( | TAG, | |
... ) |
Definition at line 190 of file golioth_sys.h.
#define GLTH_LOGW | ( | TAG, | |
... ) |
Definition at line 193 of file golioth_sys.h.
#define golioth_sys_free | ( | ptr | ) | free((ptr)) |
Definition at line 90 of file golioth_sys.h.
#define golioth_sys_malloc | ( | sz | ) | malloc((sz)) |
Definition at line 86 of file golioth_sys.h.
#define golioth_sys_rand | ( | ) | rand() |
Definition at line 103 of file golioth_sys.h.
#define golioth_sys_srand | ( | seed | ) | srand((seed)) |
Definition at line 99 of file golioth_sys.h.
#define GOLIOTH_SYS_WAIT_FOREVER -1 |
Definition at line 19 of file golioth_sys.h.
typedef void* golioth_sys_sem_t |
Definition at line 29 of file golioth_sys.h.
typedef void(* golioth_sys_thread_fn_t) (void *user_arg) |
Definition at line 66 of file golioth_sys.h.
typedef void* golioth_sys_thread_t |
Definition at line 64 of file golioth_sys.h.
typedef void(* golioth_sys_timer_fn_t) (golioth_sys_timer_t timer, void *user_arg) |
Definition at line 44 of file golioth_sys.h.
typedef void* golioth_sys_timer_t |
Definition at line 42 of file golioth_sys.h.
void golioth_sys_client_connected | ( | void * | client | ) |
void golioth_sys_client_disconnected | ( | void * | client | ) |
void golioth_sys_msleep | ( | uint32_t | ms | ) |
uint64_t golioth_sys_now_ms | ( | void | ) |
golioth_sys_sem_t golioth_sys_sem_create | ( | uint32_t | sem_max_count, |
uint32_t | sem_initial_count ) |
void golioth_sys_sem_destroy | ( | golioth_sys_sem_t | sem | ) |
int golioth_sys_sem_get_fd | ( | golioth_sys_sem_t | sem | ) |
bool golioth_sys_sem_give | ( | golioth_sys_sem_t | sem | ) |
bool golioth_sys_sem_take | ( | golioth_sys_sem_t | sem, |
int32_t | ms_to_wait ) |
golioth_sys_thread_t golioth_sys_thread_create | ( | const struct golioth_thread_config * | config | ) |
void golioth_sys_thread_destroy | ( | golioth_sys_thread_t | thread | ) |
golioth_sys_timer_t golioth_sys_timer_create | ( | const struct golioth_timer_config * | config | ) |
void golioth_sys_timer_destroy | ( | golioth_sys_timer_t | timer | ) |
bool golioth_sys_timer_reset | ( | golioth_sys_timer_t | timer | ) |
bool golioth_sys_timer_start | ( | golioth_sys_timer_t | timer | ) |