]> rtime.felk.cvut.cz Git - fpga/rpi-motor-control.git/blob - pmsm-control/test_sw/misc.h
7a131c0be06d9e9e0f6f632cf1c0e615f858c657
[fpga/rpi-motor-control.git] / pmsm-control / test_sw / misc.h
1 /**
2  * \brief Interface pro pomocne funkce.
3  * \file misc.h
4  * \date Feb 1, 2015
5  * \author Martin Prudek
6  */
7
8 #ifndef MISC_H_
9 #define MISC_H_
10
11 #ifndef NULL
12 #define NULL (void*)0
13 #endif /*NULL*/
14
15 #include <semaphore.h>
16
17 sem_t thd_par_sem; ///< semafor pro detekci zpracovani parametru noveho vlakna
18
19 /**
20  * \brief
21  * Setup initial environment.
22  */
23 void setup_environment();
24
25 /**
26  * \brief
27  * Extern handler for signal termination.
28  * Deklarovana jako 'extern', protoze ji pouzivaji funkce v misc.c,
29  *      deklarovana je ale jinde. Vetsinou v main file.
30  */
31 extern void appl_stop();
32
33 /**
34  * \brief
35  * Create RT capable thread.
36  */
37 int create_rt_task(pthread_t *thread, int prio, void *(*start_routine) (void *), void *arg);
38
39 #endif /* MISC_H_ */