新千葉 ガーベージ・コレクション

FPGA マガジンやインターフェースで書けなかったこと等をちょぼちょぼ書いてます。@ryos36

2013-03-25から1日間の記事一覧

GPIO sysfs 割り込みサンプルプログラム

#include <stdio.h> #include <unistd.h> #include <poll.h> #include <fcntl.h> #define GPIO_PATH "/sys/class/gpio/%s/%s" #define GPIO_DEFAULT_NAME "gpio105" #define USLEEP(usec) int main(int argc, const char **argv) { int fds; int i; const char *gpio_name; int flag; static char</fcntl.h></poll.h></unistd.h></stdio.h>…