Ian Hua / Quadcopter-mbedRTOS
Revision:
26:4a3323ee36d5
Parent:
22:ef8aa9728013
Child:
27:18b6580eb0b1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/RTOS-Threads/inc/Task2_Slave.h	Sat May 10 01:04:17 2014 +0000
@@ -0,0 +1,25 @@
+/* File:        Task2.h
+ * Author:      Trung Tin Ian HUA
+ * Date:        May 2014
+ * Purpose:     Thread2: Gyro sample and PID Control loop
+ * Settings:    200Hz
+ */ 
+
+#include "mbed.h"
+#include "rtos.h"
+#include "tasks.h"
+
+#ifndef _TASK2_H_
+#define _TASK2_H_
+
+// ms timing: Refer to tasks.h to change frequency of Task2.
+#define TASK2_PERIOD 1000/TASK2_FREQUENCY
+
+extern volatile float adjust[3];
+extern volatile int gyro[3];
+extern bool counterESC;
+
+/* Thread2: Gyro Sample & PID Computation */
+void Task2(void const *argument);
+
+#endif