![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
arranged by katano
Dependencies: MPU9150_DMP Neon_F303K8 QuaternionMath iSDIO mbed-rtos mbed
Fork of Neon_F303K8 by
main.cpp@0:65a0ae5578da, 2016-05-14 (annotated)
- Committer:
- yishii
- Date:
- Sat May 14 07:11:48 2016 +0000
- Revision:
- 0:65a0ae5578da
- Child:
- 1:73543a1fbe62
Supported to use with Nucleo F303K8
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
yishii | 0:65a0ae5578da | 1 | #include "mbed.h" |
yishii | 0:65a0ae5578da | 2 | #include "rtos.h" |
yishii | 0:65a0ae5578da | 3 | #include "math.h" |
yishii | 0:65a0ae5578da | 4 | #include "iSDIO.h" |
yishii | 0:65a0ae5578da | 5 | #include "gpio_defs.h" |
yishii | 0:65a0ae5578da | 6 | |
yishii | 0:65a0ae5578da | 7 | extern void TaskSensor(void const* ); |
yishii | 0:65a0ae5578da | 8 | extern void TaskLed(void const* ); |
yishii | 0:65a0ae5578da | 9 | extern void TaskFA(void const* ); |
yishii | 0:65a0ae5578da | 10 | |
yishii | 0:65a0ae5578da | 11 | Thread* threadLed = NULL; |
yishii | 0:65a0ae5578da | 12 | Thread* threadSensor = NULL; |
yishii | 0:65a0ae5578da | 13 | Thread* threadFA = NULL; |
yishii | 0:65a0ae5578da | 14 | |
yishii | 0:65a0ae5578da | 15 | Serial pc(USBTX, USBRX); |
yishii | 0:65a0ae5578da | 16 | |
yishii | 0:65a0ae5578da | 17 | int main() { |
yishii | 0:65a0ae5578da | 18 | pc.baud(115200); |
yishii | 0:65a0ae5578da | 19 | printf("Startup Neon main program\r\n"); |
yishii | 0:65a0ae5578da | 20 | |
yishii | 0:65a0ae5578da | 21 | Thread::wait(500); // 適当な待ち時間 |
yishii | 0:65a0ae5578da | 22 | |
yishii | 0:65a0ae5578da | 23 | //threadLed = new Thread(TaskLed, NULL, osPriorityNormal, DEFAULT_STACK_SIZE, NULL ); |
yishii | 0:65a0ae5578da | 24 | //threadSensor = new Thread(TaskSensor, NULL, osPriorityNormal, DEFAULT_STACK_SIZE*2, NULL ); // スタックサイズ未検証 |
yishii | 0:65a0ae5578da | 25 | //threadFA = new Thread(TaskFA, NULL, osPriorityNormal, DEFAULT_STACK_SIZE, NULL ); |
yishii | 0:65a0ae5578da | 26 | |
yishii | 0:65a0ae5578da | 27 | while(true){ |
yishii | 0:65a0ae5578da | 28 | Thread::wait(10000); // 適当な待ち時間 |
yishii | 0:65a0ae5578da | 29 | } |
yishii | 0:65a0ae5578da | 30 | } |