]> rtime.felk.cvut.cz Git - fpga/rpi-motor-control.git/blobdiff - pmsm-control/test_sw/misc.h
State structure moved to separate file. Cmd poll function moved to separate file.
[fpga/rpi-motor-control.git] / pmsm-control / test_sw / misc.h
index 14b108911c6be3fee8f3e8424e12b46e2647ae9c..b7783e41d50741193c04761bf8cf161e920c65b6 100644 (file)
@@ -8,24 +8,28 @@
 #ifndef MISC_H_
 #define MISC_H_
 
-#include <semaphore.h>
+#ifndef NULL
+#define NULL (void*)0
+#endif /*NULL*/
 
-sem_t thd_par_sem; ///< semafor pro detekci zpracovani parametru noveho vlakna
-
-/*
- * struktura predana novym vlaknum
+/**
+ * \brief
+ * Setup initial environment.
  */
-struct thread_param{
-       int sch_policy;
-       int sch_prior;
-};
+void setup_environment();
 
 /**
- * nastavi prioritu a scheduler podle parametru
- * na konci vrati semafor
- * \param pointer na struct thread_sched_param
+ * \brief
+ * Extern handler for signal termination.
+ * Deklarovana jako 'extern', protoze ji pouzivaji funkce v misc.c,
+ *     deklarovana je ale jinde. Vetsinou v main file.
  */
-extern void set_priority(void *);
+extern void appl_stop();
 
+/**
+ * \brief
+ * Create RT capable thread.
+ */
+int create_rt_task(pthread_t *thread, int prio, void *(*start_routine) (void *), void *arg);
 
 #endif /* MISC_H_ */