mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-12 15:47:14 +00:00
removed data_source flags again, tidy source code
This commit is contained in:
parent
2cf3483ca6
commit
f675678295
@ -41,10 +41,6 @@
|
||||
|
||||
#include <sys/time.h>
|
||||
|
||||
// flags for data_source
|
||||
#define DS_FLAG_ACTIVE 1
|
||||
#define DS_FLAG_POLL 2
|
||||
|
||||
typedef enum {
|
||||
RUN_LOOP_POSIX = 1,
|
||||
RUN_LOOP_COCOA,
|
||||
@ -53,9 +49,8 @@ typedef enum {
|
||||
|
||||
typedef struct data_source {
|
||||
linked_item_t item;
|
||||
int fd; // <-- file descriptors to watch or 0
|
||||
int fd; // <-- file descriptor to watch or 0
|
||||
int (*process)(struct data_source *ds); // <-- do processing
|
||||
int flags; // <-- RL_FLAG
|
||||
} data_source_t;
|
||||
|
||||
typedef struct timer {
|
||||
@ -67,13 +62,13 @@ typedef struct timer {
|
||||
// init must be called before any other run_loop call
|
||||
void run_loop_init(RUN_LOOP_TYPE type);
|
||||
|
||||
// set timer based on current time
|
||||
void run_loop_set_timer(timer_source_t *a, int timeout_in_ms);
|
||||
|
||||
// add/remove data_source
|
||||
void run_loop_add_data_source(data_source_t *dataSource);
|
||||
int run_loop_remove_data_source(data_source_t *dataSource);
|
||||
|
||||
// set timer based on current time
|
||||
void run_loop_set_timer(timer_source_t *a, int timeout_in_ms);
|
||||
|
||||
// add/remove timer_source
|
||||
void run_loop_add_timer(timer_source_t *timer);
|
||||
int run_loop_remove_timer(timer_source_t *timer);
|
||||
|
Loading…
Reference in New Issue
Block a user