aboutsummaryrefslogtreecommitdiffstats
path: root/src/lpc176x/gpio.h
diff options
context:
space:
mode:
authorMichael Kurz <michi.kurz@gmail.com>2021-03-21 19:13:47 +0100
committerKevin O'Connor <kevin@koconnor.net>2021-03-26 12:01:42 -0400
commit39188e1cf3f84a8bbf039be4b327a032f551d3bd (patch)
tree9a8a94c9331d44bc9cf62941c7b3c641bf165a6f /src/lpc176x/gpio.h
parentd02c80ef08167522a8b9b94e725afff0c680b12b (diff)
downloadkutter-39188e1cf3f84a8bbf039be4b327a032f551d3bd.tar.gz
kutter-39188e1cf3f84a8bbf039be4b327a032f551d3bd.tar.xz
kutter-39188e1cf3f84a8bbf039be4b327a032f551d3bd.zip
lpc176x: Add hardware PWM support for LPC176x
This adds hardware PWM support for LPC176x processors. Signed-off-by: Michael Kurz <michi.kurz@gmail.com>
Diffstat (limited to 'src/lpc176x/gpio.h')
-rw-r--r--src/lpc176x/gpio.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lpc176x/gpio.h b/src/lpc176x/gpio.h
index 482e0ce5..e03afbb4 100644
--- a/src/lpc176x/gpio.h
+++ b/src/lpc176x/gpio.h
@@ -21,6 +21,13 @@ 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);
+struct gpio_pwm {
+ void *reg;
+ uint8_t channel;
+};
+struct gpio_pwm gpio_pwm_setup(uint8_t pin, uint32_t cycle_time, uint8_t val);
+void gpio_pwm_write(struct gpio_pwm g, uint32_t val);
+
struct gpio_adc {
uint32_t chan;
};