-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Kevin O'Connor <[email protected]>
- Loading branch information
1 parent
970831e
commit c78b907
Showing
4 changed files
with
120 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ if MACH_LPC176X | |
config LPC_SELECT | ||
bool | ||
default y | ||
select HAVE_GPIO | ||
|
||
config BOARD_DIRECTORY | ||
string | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#ifndef __LPC176X_GPIO_H | ||
#define __LPC176X_GPIO_H | ||
|
||
#include <stdint.h> | ||
|
||
struct gpio_out { | ||
void *regs; | ||
uint32_t bit; | ||
}; | ||
struct gpio_out gpio_out_setup(uint8_t pin, uint8_t val); | ||
void gpio_out_toggle_noirq(struct gpio_out g); | ||
void gpio_out_toggle(struct gpio_out g); | ||
void gpio_out_write(struct gpio_out g, uint8_t val); | ||
|
||
struct gpio_in { | ||
void *regs; | ||
uint32_t bit; | ||
}; | ||
struct gpio_in gpio_in_setup(uint8_t pin, int8_t pull_up); | ||
uint8_t gpio_in_read(struct gpio_in g); | ||
|
||
#endif // gpio.h |