ubinos
stimer.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2009 Sung Ho Park
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #ifndef UBIK_STIMER_H_
8 #define UBIK_STIMER_H_
9 
10 #ifdef __cplusplus
11 extern "C"
12 {
13 #endif
14 
139 #include <ubinos_config.h>
140 #include <ubinos/type.h>
141 
142 #include "sem.h"
143 #include "signal.h"
144 
146 #define STIMER_OPT__ONESHOT 0x80
147 
150 #define STIMER_OPT__BROADCAST 0x40
151 
153 typedef struct __stimer_tip_t
154 {
155  unsigned int type :8;
156  unsigned int valid :1;
157  unsigned int reserved :7;
158  unsigned int reserved2 :16;
160 
163 
175 int stimer_create(stimer_pt * stimer_p);
176 
190 int stimer_delete(stimer_pt * stimer_p);
191 
213 int stimer_set(stimer_pt stimer, unsigned int tick, sem_pt sem,
214  unsigned int option);
215 
237 int stimer_setms(stimer_pt stimer, unsigned int timems, sem_pt sem,
238  unsigned int option);
239 
263 int stimer_set_signal(stimer_pt stimer, unsigned int tick, signal_pt signal,
264  int sigtype, unsigned int option);
265 
289 int stimer_setms_signal(stimer_pt stimer, unsigned int timems, signal_pt signal,
290  int sigtype, unsigned int option);
291 
304 
316 int stimer_stop(stimer_pt stimer);
317 
318 #ifdef __cplusplus
319 }
320 #endif
321 
322 #endif /* UBIK_STIMER_H_ */
ubik semaphore API
ubik signal API
int stimer_delete(stimer_pt *stimer_p)
int stimer_set_signal(stimer_pt stimer, unsigned int tick, signal_pt signal, int sigtype, unsigned int option)
int stimer_setms_signal(stimer_pt stimer, unsigned int timems, signal_pt signal, int sigtype, unsigned int option)
int stimer_set(stimer_pt stimer, unsigned int tick, sem_pt sem, unsigned int option)
int stimer_create(stimer_pt *stimer_p)
int stimer_setms(stimer_pt stimer, unsigned int timems, sem_pt sem, unsigned int option)
int stimer_start(stimer_pt stimer)
int stimer_stop(stimer_pt stimer)
_stimer_tip_t * stimer_pt
Definition: stimer.h:162
struct __stimer_tip_t _stimer_tip_t
Definition: sem.h:129
Definition: signal.h:37
Definition: stimer.h:154
unsigned int reserved
Definition: stimer.h:157
unsigned int valid
Definition: stimer.h:156
unsigned int reserved2
Definition: stimer.h:158
unsigned int type
Definition: stimer.h:155
ubinos basic data type