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-Setup/inc/tasks.h
- Committer:
- pHysiX
- Date:
- 2014-05-13
- Revision:
- 38:ef65533cca32
- Parent:
- 36:d95e3d6f2fc4
- Child:
- 39:02782ad251db
File content as of revision 38:ef65533cca32:
/* File:    tasks.h
 * Author:  Trung Tin Ian HUA
 * Date:    May 2014
 * Purpose: Code to intialise and start all threads.
 */
#include "mbed.h"
#include "rtos.h"
#ifndef _TASKS_H_
#define _TASKS_H_
#include "Task1.h"
#include "Task2_Master.h"
#include "Task2_Slave.h"
#include "Task3.h"
#include "Task4.h"
// 1khz / (1 + 9) = 100 Hz (Fsample)
#define IMU_SAMPLE_RATE_DIVIDER 9
// Fsample Hz / (1 + 0) = 100 Hz
#define IMU_FIFO_RATE_DIVIDER   0x00
// Frequency (Hz):
#define TASK1_FREQUENCY             50
#define TASK2_MASTER_FREQUENCY      100
#define TASK2_SLAVE_FREQUENCY       400
#define TASK3_FREQUENCY             50
#define TASK4_FREQUENCY             400
#define ESC_FREQUENCY               400
#define ESC_PERIOD_US               1000000/ESC_FREQUENCY
void createThreads(void);
#endif