pru: Add wrappers for gpio_x_reset()

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2018-08-20 17:08:39 -04:00
parent 75de9cb4c0
commit 983c84b12f
2 changed files with 14 additions and 0 deletions

View File

@ -103,6 +103,12 @@ fail:
shutdown("Not an output pin"); shutdown("Not an output pin");
} }
void
gpio_out_reset(struct gpio_out g, uint8_t val)
{
shutdown("PRU does not support push/pull pins");
}
void void
gpio_out_toggle_noirq(struct gpio_out g) gpio_out_toggle_noirq(struct gpio_out g)
{ {
@ -142,6 +148,12 @@ fail:
shutdown("Not an input pin"); shutdown("Not an input pin");
} }
void
gpio_in_reset(struct gpio_in g, int8_t pull_up)
{
shutdown("PRU does not support push/pull pins");
}
uint8_t uint8_t
gpio_in_read(struct gpio_in g) gpio_in_read(struct gpio_in g)
{ {

View File

@ -9,6 +9,7 @@ struct gpio_out {
uint32_t bit; uint32_t bit;
}; };
struct gpio_out gpio_out_setup(uint8_t pin, uint8_t val); struct gpio_out gpio_out_setup(uint8_t pin, uint8_t val);
void gpio_out_reset(struct gpio_out g, uint8_t val);
void gpio_out_toggle_noirq(struct gpio_out g); void gpio_out_toggle_noirq(struct gpio_out g);
void gpio_out_toggle(struct gpio_out g); void gpio_out_toggle(struct gpio_out g);
void gpio_out_write(struct gpio_out g, uint8_t val); void gpio_out_write(struct gpio_out g, uint8_t val);
@ -18,6 +19,7 @@ struct gpio_in {
uint32_t bit; uint32_t bit;
}; };
struct gpio_in gpio_in_setup(uint8_t pin, int8_t pull_up); struct gpio_in gpio_in_setup(uint8_t pin, int8_t pull_up);
void gpio_in_reset(struct gpio_in g, int8_t pull_up);
uint8_t gpio_in_read(struct gpio_in g); uint8_t gpio_in_read(struct gpio_in g);
struct gpio_adc { struct gpio_adc {