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@36:d95e3d6f2fc4, 2014-05-13 (annotated)
- Committer:
- pHysiX
- Date:
- Tue May 13 04:05:34 2014 +0000
- Revision:
- 36:d95e3d6f2fc4
- Parent:
- 32:7a9be7761c46
- Child:
- 38:ef65533cca32
Telemetry output completely changed; Code tidied
Who changed what in which revision?
| User | Revision | Line number | New contents of line | 
|---|---|---|---|
| pHysiX | 22:ef8aa9728013 | 1 | /* File: tasks.h | 
| pHysiX | 22:ef8aa9728013 | 2 | * Author: Trung Tin Ian HUA | 
| pHysiX | 22:ef8aa9728013 | 3 | * Date: May 2014 | 
| pHysiX | 22:ef8aa9728013 | 4 | * Purpose: Code to intialise and start all threads. | 
| pHysiX | 22:ef8aa9728013 | 5 | */ | 
| pHysiX | 1:43f8ac7ca6d7 | 6 | #include "mbed.h" | 
| pHysiX | 1:43f8ac7ca6d7 | 7 | #include "rtos.h" | 
| pHysiX | 1:43f8ac7ca6d7 | 8 | |
| pHysiX | 1:43f8ac7ca6d7 | 9 | #ifndef _TASKS_H_ | 
| pHysiX | 1:43f8ac7ca6d7 | 10 | #define _TASKS_H_ | 
| pHysiX | 1:43f8ac7ca6d7 | 11 | |
| pHysiX | 1:43f8ac7ca6d7 | 12 | #include "Task1.h" | 
| pHysiX | 26:4a3323ee36d5 | 13 | #include "Task2_Master.h" | 
| pHysiX | 26:4a3323ee36d5 | 14 | #include "Task2_Slave.h" | 
| pHysiX | 1:43f8ac7ca6d7 | 15 | #include "Task3.h" | 
| pHysiX | 1:43f8ac7ca6d7 | 16 | #include "Task4.h" | 
| pHysiX | 1:43f8ac7ca6d7 | 17 | |
| pHysiX | 16:9072cd6fa8d1 | 18 | // 1khz / (1 + 9) = 100 Hz (Fsample) | 
| pHysiX | 13:6a983f2d42ea | 19 | #define IMU_SAMPLE_RATE_DIVIDER 9 | 
| pHysiX | 16:9072cd6fa8d1 | 20 | // Fsample Hz / (1 + 0) = 100 Hz | 
| pHysiX | 13:6a983f2d42ea | 21 | #define IMU_FIFO_RATE_DIVIDER 0x00 | 
| pHysiX | 3:605fbcb54e75 | 22 | |
| pHysiX | 22:ef8aa9728013 | 23 | // Frequency (Hz): | 
| pHysiX | 36:d95e3d6f2fc4 | 24 | #define TASK1_FREQUENCY 50 | 
| pHysiX | 32:7a9be7761c46 | 25 | #define TASK2_MASTER_FREQUENCY 200 | 
| pHysiX | 32:7a9be7761c46 | 26 | #define TASK2_SLAVE_FREQUENCY 400 | 
| pHysiX | 27:18b6580eb0b1 | 27 | #define TASK3_FREQUENCY 50 | 
| pHysiX | 31:3dde2201e54d | 28 | #define TASK4_FREQUENCY 400 | 
| pHysiX | 27:18b6580eb0b1 | 29 | |
| pHysiX | 27:18b6580eb0b1 | 30 | #define ESC_FREQUENCY 400 | 
| pHysiX | 27:18b6580eb0b1 | 31 | #define ESC_PERIOD_US 1000000/ESC_FREQUENCY | 
| pHysiX | 1:43f8ac7ca6d7 | 32 | |
| pHysiX | 3:605fbcb54e75 | 33 | void createThreads(void); | 
| pHysiX | 1:43f8ac7ca6d7 | 34 | |
| pHysiX | 1:43f8ac7ca6d7 | 35 | #endif |