Skip to content

Commit 11f516c

Browse files
committed
include: Add Fast GPIO read/write APIs
Signed-off-by: Ajay Bhargav <[email protected]>
1 parent 1d26937 commit 11f516c

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

include/hw/gpio.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,23 @@ int gpio_setuserdata(int handle, void *arg);
133133
*/
134134
void *gpio_getuserdata(int handle);
135135

136+
/**
137+
* GPIO Fast read
138+
* Use with valid IO @a handle only
139+
* @param handle Handle to gpio object returned by @ref gpio_request
140+
* @return input gpio level @ref gpio_level_e
141+
*/
142+
int gpio_readfast(int handle);
143+
144+
/**
145+
* GPIO Fast write
146+
* Use with valid IO @a handle only
147+
* @param handle Handle to gpio object returned by @ref gpio_request
148+
* @param value gpio level to set @ref gpio_level_e
149+
* @return 0 on success, negative value on failure
150+
*/
151+
int gpio_writefast(int handle, int value);
152+
136153
#ifdef __cplusplus
137154
}
138155
#endif

0 commit comments

Comments
 (0)