Difference between revisions of "Example: Blinking led"

From Miosix Wiki
Jump to: navigation, search
m (Andreabont moved page Blinking led to Example: Blinking led)
(No difference)

Revision as of 23:03, 13 April 2014

Simple blink

#include <cstdio>
#include <unistd.h>
#include "miosix.h"

using namespace std;
using namespace miosix;

typedef Gpio<GPIOC_BASE,7>  led;

int main()
{
  
  led::mode(Mode::OUTPUT);
  
  for(;;) {
    led::high();
    sleep(1);
    led::low();
    sleep(1);
  }
  
  return 0;
  
}