|
|
|
@ -2,6 +2,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
static struct gpio_chip ft232_chip; |
|
|
|
static struct gpio_chip ft232_chip; |
|
|
|
static struct subprocess_info *sub_info; |
|
|
|
static struct subprocess_info *sub_info; |
|
|
|
|
|
|
|
static struct semaphore read_sema; |
|
|
|
|
|
|
|
|
|
|
|
static char pin_status[1]; |
|
|
|
static char pin_status[1]; |
|
|
|
static int major; |
|
|
|
static int major; |
|
|
|
@ -11,7 +12,6 @@ static uint8_t buff_end; |
|
|
|
|
|
|
|
|
|
|
|
static uint8_t buffer[BUFFER_SIZE]; |
|
|
|
static uint8_t buffer[BUFFER_SIZE]; |
|
|
|
|
|
|
|
|
|
|
|
static volatile int n_written; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include "char_dev.c" |
|
|
|
#include "char_dev.c" |
|
|
|
#include "gpio_callbacks.c" |
|
|
|
#include "gpio_callbacks.c" |
|
|
|
@ -42,6 +42,8 @@ static int usb_gpio_init(void) { |
|
|
|
printk("<1>%s: Assigned device major #%d minor #0!\n",MOD_NAME,major); |
|
|
|
printk("<1>%s: Assigned device major #%d minor #0!\n",MOD_NAME,major); |
|
|
|
printk("<1>%s: Create device file with: \"mknod /dev/usb_gpio c %d 0\"\n",MOD_NAME,major); |
|
|
|
printk("<1>%s: Create device file with: \"mknod /dev/usb_gpio c %d 0\"\n",MOD_NAME,major); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sema_init(&read_sema,0); |
|
|
|
|
|
|
|
|
|
|
|
//GPIO registration
|
|
|
|
//GPIO registration
|
|
|
|
ft232_chip.label = MOD_NAME; |
|
|
|
ft232_chip.label = MOD_NAME; |
|
|
|
|
|
|
|
|
|
|
|
|