1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2025-04-21 12:27:27 +03:00

add userspace tool for gpio_dev

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@10267 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
blogic
2008-01-26 04:24:05 +00:00
parent 3610f7a9ee
commit ab09debb66
4 changed files with 145 additions and 2 deletions

View File

@@ -44,7 +44,7 @@ gpio_ioctl(struct inode * inode, struct file * file, unsigned int cmd, unsigned
{
int retval = 0;
if ((arg & gpio_access_mask) != arg)
if (((1 << arg) & gpio_access_mask) != (1 << arg))
{
retval = -EINVAL;
goto out;
@@ -57,7 +57,7 @@ gpio_ioctl(struct inode * inode, struct file * file, unsigned int cmd, unsigned
break;
case GPIO_SET:
gpio_set_value(arg, 0);
gpio_set_value(arg, 1);
break;
case GPIO_CLEAR: