예제 #1
0
파일: proc.c 프로젝트: ETegro/OpenSAN
int adm8668_sesled_write_proc(struct file *file, const char *buffer, unsigned long count, void *data)
{
	char buf[8];
	int num;

	num = (count < 8) ? count : 8;

	if (copy_from_user(buf, buffer, num))
	{
		printk("copy_from_user failed");
                return -EFAULT;
	}
	num = simple_strtoul(buf, NULL, 16);
	switch (num)
	{
		case 0:
			GPIO_SET_LOW(0);
			CRGPIO_SET_LOW(2);
			break;
		case 1:
			GPIO_SET_LOW(0);
			CRGPIO_SET_HI(2);
			break;
		case 2:
			GPIO_SET_HI(0);
			CRGPIO_SET_HI(2);
			break;
		default:
			break;
	}

	return count;
}
예제 #2
0
static INLINE void JTAG0_TDI_HI(void) { GPIO_SET_HI(JTAG0_TDI_PIO_BIT); }
예제 #3
0
static INLINE void JTAG0_NTRST_HI(void) { GPIO_SET_HI(JTAG0_NTRST_PIO_BIT); }