Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
NuttX RTOS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
f4grx
NuttX RTOS
Commits
eb94cc54
Commit
eb94cc54
authored
8 years ago
by
Gregory Nutt
Browse files
Options
Downloads
Patches
Plain Diff
Update some comments
parent
88cb41a0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
drivers/ioexpander/gpio.c
+7
-1
7 additions, 1 deletion
drivers/ioexpander/gpio.c
include/nuttx/ioexpander/gpio.h
+18
-3
18 additions, 3 deletions
include/nuttx/ioexpander/gpio.h
with
25 additions
and
4 deletions
drivers/ioexpander/gpio.c
+
7
−
1
View file @
eb94cc54
...
...
@@ -92,7 +92,7 @@ static const struct file_operations g_gpio_drvrops =
* Name: gpio_handler
*
* Description:
*
Standard character driver open method
.
*
GPIO interrupt callback function
.
*
****************************************************************************/
...
...
@@ -273,6 +273,12 @@ static int gpio_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
* Description:
* Register GPIO pin device driver.
*
* - Input pin types will be registered at /dev/gpinN
* - Output pin types will be registered at /dev/gpoutN
* - Interrupt pin types will be registered at /dev/gpintN
*
* Where N is the provided minor number in the range of 0-99.
*
****************************************************************************/
int
gpio_pin_register
(
FAR
struct
gpio_dev_s
*
dev
,
int
minor
)
...
...
This diff is collapsed.
Click to expand it.
include/nuttx/ioexpander/gpio.h
+
18
−
3
View file @
eb94cc54
...
...
@@ -85,7 +85,15 @@ enum gpio_pintype_e
typedef
CODE
int
(
*
pin_interrupt_t
)(
FAR
struct
gpio_dev_s
*
dev
);
/* Pin interface definition. */
/* Pin interface vtable definition. Instances of this vtable are read-only
* and may reside in FLASH.
*
* - go_read. Required for all all pin types.
* - go_write. Required only for the GPIO_OUTPUT_PIN pin type. Unused
* for other pin types may be NULL.
* - go_attach and gp_eanble. Required only the GPIO_INTERRUPT_PIN pin
* type. Unused for other pin types may be NULL.
*/
struct
gpio_dev_s
;
struct
gpio_operations_s
...
...
@@ -99,7 +107,7 @@ struct gpio_operations_s
CODE
int
(
*
go_enable
)(
FAR
struct
gpio_dev_s
*
dev
,
bool
enable
);
};
/* Pin interface definition. */
/* Pin interface definition.
Must lie in writable memory.
*/
struct
gpio_dev_s
{
...
...
@@ -120,7 +128,7 @@ struct gpio_dev_s
FAR
const
struct
gpio_operations_s
*
gp_ops
;
/* Device specific, lower-half information may follow */
/* Device specific, lower-half information may follow
.
*/
};
/****************************************************************************
...
...
@@ -141,6 +149,13 @@ extern "C"
* Description:
* Register GPIO pin device driver.
*
* - Input pin types will be registered at /dev/gpinN
* - Output pin types will be registered at /dev/gpoutN
* - Interrupt pin types will be registered at /dev/gpintN
*
* Where N is the provided minor number in the range of 0-99.
*
*
****************************************************************************/
int
gpio_pin_register
(
FAR
struct
gpio_dev_s
*
dev
,
int
minor
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment