diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2017-05-07 17:33:45 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2017-05-15 14:02:59 -0400 |
commit | 5c4cc0d64637363aaeb46e2b65bb1b1f99e9e434 (patch) | |
tree | 3e05557f40fd73c2d8bebed6afbf7719c701a952 /src/avr/gpio.c | |
parent | a361b921849b4e23f7a41feb2a7c011ee6d794b1 (diff) | |
download | kutter-5c4cc0d64637363aaeb46e2b65bb1b1f99e9e434.tar.gz kutter-5c4cc0d64637363aaeb46e2b65bb1b1f99e9e434.tar.xz kutter-5c4cc0d64637363aaeb46e2b65bb1b1f99e9e434.zip |
pwmcmds: Export the maximum PWM value
Instead of assuming the maximum PWM value is 255, export a constant
from the firmware to the host with the maximum value.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/avr/gpio.c')
-rw-r--r-- | src/avr/gpio.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/avr/gpio.c b/src/avr/gpio.c index aa39f957..9d7e5148 100644 --- a/src/avr/gpio.c +++ b/src/avr/gpio.c @@ -162,6 +162,8 @@ static const uint8_t pwm_pins[ARRAY_SIZE(pwm_regs)] PROGMEM = { #endif }; +DECL_CONSTANT(PWM_MAX, 255); + struct gpio_pwm gpio_pwm_setup(uint8_t pin, uint32_t cycle_time, uint8_t val) { |