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.
main.cpp@0:f1123578b9b6, 2014-07-01 (annotated)
- Committer:
- garashi
- Date:
- Tue Jul 01 08:54:51 2014 +0000
- Revision:
- 0:f1123578b9b6
- Child:
- 1:75cdcc412104
message
Who changed what in which revision?
| User | Revision | Line number | New contents of line | 
|---|---|---|---|
| garashi | 0:f1123578b9b6 | 1 | #include "mbed.h" | 
| garashi | 0:f1123578b9b6 | 2 | BusOut leds(P1_13, P1_14, P1_22, P0_17, P0_18, P0_19, P1_15, P0_1); | 
| garashi | 0:f1123578b9b6 | 3 | |
| garashi | 0:f1123578b9b6 | 4 | |
| garashi | 0:f1123578b9b6 | 5 | int main() { | 
| garashi | 0:f1123578b9b6 | 6 | while(1) { | 
| garashi | 0:f1123578b9b6 | 7 | void single(unsigned char bit); | 
| garashi | 0:f1123578b9b6 | 8 | { | 
| garashi | 0:f1123578b9b6 | 9 | leds = 11 << bit; | 
| garashi | 0:f1123578b9b6 | 10 | } | 
| garashi | 0:f1123578b9b6 | 11 | void all() | 
| garashi | 0:f1123578b9b6 | 12 | { | 
| garashi | 0:f1123578b9b6 | 13 | leds = 0x0; | 
| garashi | 0:f1123578b9b6 | 14 | wait(0.5); | 
| garashi | 0:f1123578b9b6 | 15 | leds = 0xff; | 
| garashi | 0:f1123578b9b6 | 16 | wait(0.5); | 
| garashi | 0:f1123578b9b6 | 17 | } | 
| garashi | 0:f1123578b9b6 | 18 | void rotate() | 
| garashi | 0:f1123578b9b6 | 19 | { | 
| garashi | 0:f1123578b9b6 | 20 | volatile uint8_t i; | 
| garashi | 0:f1123578b9b6 | 21 | for(i = 0x00; i < 8; i++) | 
| garashi | 0:f1123578b9b6 | 22 | { | 
| garashi | 0:f1123578b9b6 | 23 | leds = 1 << i; | 
| garashi | 0:f1123578b9b6 | 24 | wait(0.125); | 
| garashi | 0:f1123578b9b6 | 25 | } | 
| garashi | 0:f1123578b9b6 | 26 | } | 
| garashi | 0:f1123578b9b6 | 27 | } |