touga takeuchi / Mbed 2 deprecated test

Dependencies:   mbed

Committer:
garashi
Date:
Tue Jul 01 08:54:51 2014 +0000
Revision:
0:f1123578b9b6
Child:
1:75cdcc412104
message

Who changed what in which revision?

UserRevisionLine numberNew 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 }