Some small improvements to GPIO driver

This commit is contained in:
Gregory Nutt 2016-06-26 11:24:35 -06:00
parent c8e73b9cef
commit b16fdaf155
3 changed files with 17 additions and 2 deletions

3
TODO
View File

@ -938,6 +938,7 @@ o Network (net/, drivers/net)
TM4C YES YES
eZ80 NO NO
LPC17xx YES YES (not tested)
LPC43xx YES YES (not tested)
DMxxx NIC NO NO
PIC32 NO NO
RGMP ??? ???
@ -1602,7 +1603,7 @@ o Build system
Priority: Low.
Title: NATIVE WINDOWS BUILD BROKEN
Description: The way that apps/ no generates Kmenu files depends on changes added
Description: The way that apps/ now generates Kmenu files depends on changes added
to apps/tools/mkkconfig.sh. Similar changes need to be made to
apps/tools/mkkconfig.bat to restore the Windows Native build.
UPDATE: The mkkconfig.bat script has been updated and appears to work.

View File

@ -86,7 +86,7 @@ static const struct file_operations g_gpio_output_ops =
{
gpio_open, /* open */
gpio_close, /* close */
NULL, /* read */
gpio_read, /* read */
gpio_write, /* write */
NULL, /* seek */
gpio_ioctl /* ioctl */

View File

@ -78,19 +78,33 @@ struct gpio_common_dev_s
struct gpio_input_dev_s
{
/* Common fields */
bool gpin_output;
uint8_t gpin_unused[3];
/* Fields unique to input pins */
CODE int (*gpin_read)(FAR struct gpio_input_dev_s *dev);
/* Lower-half private definitions may follow */
};
/* The interface to a GPIO input pin */
struct gpio_output_dev_s
{
/* Common fields */
bool gpout_output;
uint8_t gpout_unused[3];
/* Fields unique to output pins */
CODE int (*gpout_read)(FAR struct gpio_output_dev_s *dev);
CODE int (*gpout_write)(FAR struct gpio_output_dev_s *dev, int value);
/* Lower-half private definitions may follow */
};
/****************************************************************************