/********************************************************************************* * Copyright: (C) 2017 LingYun IoT Studio * All rights reserved. * * Filename: test_s3c_led.c * Description: This file is used to tst s3c_led.c driver * * Version: 1.0.0(03/15/2014) * Author: Guo Wenxue * ChangeLog: 1, Release initial version on "03/15/2014 02:03:22 PM" * ********************************************************************************/ #include #include #include #include #include #include #include #include #define LED_CNT 4 #define DEVNAME_LEN 10 #define PLATDRV_MAGIC 0x60 #define LED_OFF _IO (PLATDRV_MAGIC, 0x18) #define LED_ON _IO (PLATDRV_MAGIC, 0x19) static inline msleep(unsigned long ms) { struct timeval tv; tv.tv_sec = ms/1000; tv.tv_usec = (ms%1000)*1000; select(0, NULL, NULL, NULL, &tv); } int main (int argc, char **argv) { int i; int fd[LED_CNT]; char dev_name[DEVNAME_LEN]={0,0,0,0}; for(i=0; i= 0) { close(fd[i]); } } return -1; } /* ----- End of main() ----- */