measure MAC

Dependencies:   mbed

main.cpp

Committer:
naru
Date:
2015-02-19
Revision:
0:62bb4b0c6b47

File content as of revision 0:62bb4b0c6b47:

#include "mbed.h"

DigitalOut myled1(LED1);
DigitalOut myled2(LED2);
DigitalOut myled3(LED3);
DigitalOut myled4(LED4);
int main() {
    volatile int k;
    while(1) {
        for(int j=0;j<15;j++){
        for(volatile int i=0;i<1000*1000;i++){
        k+=i*j;
        k+=i*j;
        k+=i*j;
        k+=i*j;
        k+=i*j;
        k+=i*j;
        k+=i*j;
        k+=i*j;
        }
        myled1 = j & 0x0001;
        myled2 = j & 0x0002;
        myled3 = j & 0x0004;
        myled4 = j & 0x0008;
        }
       // wait(0.1);
    }
}