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-10
- Revision:
- 27:18b6580eb0b1
- Parent:
- 26:4a3323ee36d5
- Child:
- 30:d9b988f8d84f
File content as of revision 27:18b6580eb0b1:
/* 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 100
#define TASK2_MASTER_FREQUENCY 100
#define TASK2_SLAVE_FREQUENCY 200
#define TASK3_FREQUENCY 50
#define TASK4_FREQUENCY 400
#define ESC_FREQUENCY 400
#define ESC_PERIOD_US 1000000/ESC_FREQUENCY
void createThreads(void);
#endif