2008-05-31 23:18:53     how get the Parallel Pheripheral Inferface Port Flag status

Document created by Aaronwu Employee on Aug 6, 2013
Version 1Show Document
  • View in full screen mode

2008-05-31 23:18:53     how get the Parallel Pheripheral Inferface Port Flag status

Dong Bo (CHINA)

Message: 56527   

 

Hi, guys

 

i saw the linux-2.6.x/arch/blackfin/mach-bf537/boards/stamp.c file, we can setting the Parallel Pheripheral Inferface Port Flag status from program

 

void sl811_port_power(struct device *dev, int is_on)

{

        unsigned short mask = (1 << CONFIG_USB_SL811_BFIN_GPIO_VBUS);

 

        bfin_write_PORT_FER(bfin_read_PORT_FER() & ~mask);

        bfin_write_FIO_DIR(bfin_read_FIO_DIR() | mask);

 

        if (is_on)

                bfin_write_FIO_FLAG_S(mask);

        else

                bfin_write_FIO_FLAG_C(mask);

}

 

 

and my question is, how i can get a PF pins status?

 

thank you very much

QuoteReplyEditDelete

 

 

2008-05-31 23:50:15     Re: how get the Parallel Pheripheral Inferface Port Flag status

Mike Frysinger (UNITED STATES)

Message: 56528   

 

you're looking at an old kernel, not the latest 2008R1 release

 

if you wish to manipulate GPIOs, then use the GPIO framework ... consult the documentation:

http://docs.blackfin.uclinux.org/doku.php?id=gpio

QuoteReplyEditDelete

 

 

2008-06-01 01:28:06     Re: how get the Parallel Pheripheral Inferface Port Flag status

Dong Bo (CHINA)

Message: 56529   

 

thank you, Mike.

Attachments

    Outcomes