59#define PI 3.141592653549
94#define START_THREAD(thread, function, resource) \
95 resource.irq_thread_rdy = true; \
96 VERIFY(error, pthread_create(&thread, NULL, function, &resource))
108#define REGISTER_TIMER(resource) \
109 Irq_RegisterTimerIrq(&timer, &(resource.irq_context), BTI_US)
126#define STOP_THREAD(thread, resource) \
127 resource.irq_thread_rdy = false; \
128 VERIFY(error, pthread_join(thread, NULL))
139#define UNREGISTER_TIMER(resource) \
140 Irq_UnregisterTimerIrq(&timer, resource.irq_context)
153#define TIMER_TRIGGER(irq_assert, resource) \
154 Irq_Wait(resource->irq_context, \
157 (NiFpga_Bool *) &(resource->irq_thread_rdy)); \
158 NiFpga_WriteU32(myrio_session, IRQTIMERWRITE, BTI_US); \
159 NiFpga_WriteBool(myrio_session, IRQTIMERSETTIME, NiFpga_True)
167#define EXIT_THREAD() \
168 pthread_exit(NULL); \
Sensor/Actuator (Input/Output) Interfacing Library Header.
Parameter for Threading Functions.
Definition thread-lib.h:36
NiFpga_IrqContext irq_context
context
Definition thread-lib.h:37
NiFpga_Bool irq_thread_rdy
stop signal
Definition thread-lib.h:38
NiFpga_Session myrio_session
The MyRio Session.