Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
RTOS-Threads/inc/Task2_Master.h
- Committer:
- pHysiX
- Date:
- 2014-05-19
- Revision:
- 50:8a0accb23007
- Parent:
- 44:4be5c01c6de2
- Child:
- 51:04c6af4319e1
File content as of revision 50:8a0accb23007:
/* File:        Task2_Master.h
 * Author:      Trung Tin Ian HUA
 * Date:        May 2014
 * Purpose:     Thread2M: Master PID control loop (attitude)
 * Functions:   AHRSSample: Read MPU6050 DMP and calculate YPR
 * Settings:    200Hz
 */
#include "mbed.h"
#include "rtos.h"
#include "tasks.h"
#ifndef _TASK2_MASTER_H_
#define _TASK2_MASTER_H_
// ms timing: Refer to tasks.h to change frequency of Task2_Master.
#define TASK2_MASTER_PERIOD             1000/TASK2_MASTER_FREQUENCY
#ifdef ENABLE_COMPASS
extern double heading;
#endif
extern volatile float ypr[3];
extern volatile float adjust_attitude[3];
/* Thread2-Master: Attitude PID Control */
void Task2_Master(void const *argument);
// ========================
// === Helper functions ===
// ========================
void Task2_Master_ISR(void const *argument);
void AHRSSample(void);
#endif