2016-09-12 16:16:30 -07:00
|
|
|
//Modified: Abhishek Malik <abhishek.malik@intel.com>
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
#include "led.h"
|
|
|
|
|
2016-09-19 15:45:22 -07:00
|
|
|
#include "upm_utilities.h"
|
|
|
|
|
|
|
|
int main(void)
|
2016-09-12 16:16:30 -07:00
|
|
|
{
|
2016-09-19 15:45:22 -07:00
|
|
|
led_context dev = led_init(2);
|
|
|
|
while(1){
|
|
|
|
if(led_on(dev) != UPM_SUCCESS){
|
|
|
|
printf("problem turning the LED on\n");
|
|
|
|
}
|
|
|
|
upm_delay(1);
|
|
|
|
if(led_off(dev) != UPM_SUCCESS){
|
|
|
|
printf("problem turning the LED off\n");
|
|
|
|
}
|
|
|
|
upm_delay(1);
|
|
|
|
}
|
|
|
|
led_close(dev);
|
|
|
|
return 0;
|
2016-09-12 16:16:30 -07:00
|
|
|
}
|