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.
Dependencies: mbed-rtos mbed Servo Motor SoftPWM
main.cpp@1:965e202877f7, 2022-11-15 (annotated)
- Committer:
- bzhu792
- Date:
- Tue Nov 15 21:51:19 2022 +0000
- Revision:
- 1:965e202877f7
- Parent:
- 0:16c007acb3a2
- Child:
- 2:002f2def130e
- Child:
- 6:9721eae5ec03
Bo Han test
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| cwang776 | 0:16c007acb3a2 | 1 | #include "mbed.h" |
| cwang776 | 0:16c007acb3a2 | 2 | #include "rtos.h" |
| cwang776 | 0:16c007acb3a2 | 3 | |
| cwang776 | 0:16c007acb3a2 | 4 | Thread thread1; |
| cwang776 | 0:16c007acb3a2 | 5 | Thread thread2; |
| cwang776 | 0:16c007acb3a2 | 6 | |
| cwang776 | 0:16c007acb3a2 | 7 | |
| cwang776 | 0:16c007acb3a2 | 8 | void some_thread() { |
| cwang776 | 0:16c007acb3a2 | 9 | |
| cwang776 | 0:16c007acb3a2 | 10 | |
| cwang776 | 0:16c007acb3a2 | 11 | } |
| cwang776 | 0:16c007acb3a2 | 12 | |
| cwang776 | 0:16c007acb3a2 | 13 | void other_thread() { |
| cwang776 | 0:16c007acb3a2 | 14 | |
| cwang776 | 0:16c007acb3a2 | 15 | } |
| cwang776 | 0:16c007acb3a2 | 16 | |
| cwang776 | 0:16c007acb3a2 | 17 | int main() { |
| bzhu792 | 1:965e202877f7 | 18 | //test |
| cwang776 | 0:16c007acb3a2 | 19 | |
| cwang776 | 0:16c007acb3a2 | 20 | thread1.start(some_thread); |
| cwang776 | 0:16c007acb3a2 | 21 | thread2.start(other_thread); |
| cwang776 | 0:16c007acb3a2 | 22 | } |
