Messages in this thread |  | | | Date | Fri, 26 Feb 2010 23:11:26 -0600 | | Subject | Re: [PATCH 1/3] gpiolib: add gpio_set_direction() | | From | Ben Gardner <> |
| |
> How about something like the following for set_direction, so we're not > comparing magic bits? > > /* gpio direction flags */ > #define GPIO_DIR_NONE 0 > #define GPIO_DIR_INPUT (1 << 0) > #define GPIO_DIR_OUTPUT (1 << 1)
Sounds good and it looks like those macros aren't used anywhere else. Maybe also add a define for inout? #define GPIO_DIR_INOUT (GPIO_DIR_INPUT | GPIO_DIR_OUTPUT) Ben
|  |