atsam: Add support for hard pwm via PWM controller
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#ifndef __SAM3_GPIO_H
|
||||
#define __SAM3_GPIO_H
|
||||
#ifndef __ATSAM_GPIO_H
|
||||
#define __ATSAM_GPIO_H
|
||||
|
||||
#include <stdint.h> // uint32_t
|
||||
|
||||
@@ -21,6 +21,12 @@ 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;
|
||||
};
|
||||
struct gpio_pwm gpio_pwm_setup(uint8_t pin, uint32_t cycle_time, uint8_t val);
|
||||
void gpio_pwm_write(struct gpio_pwm g, uint8_t val);
|
||||
|
||||
struct gpio_adc {
|
||||
uint32_t chan;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user