diff options
author | Daniel Friesel <derf@finalrewind.org> | 2018-11-12 10:58:28 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2018-11-12 10:58:28 +0100 |
commit | c98b98590b57890d29c5c52bfddc997b08065aab (patch) | |
tree | 490ca5a4b85c549ae90bea367310dac6f4d73e9b /include/arch | |
parent | 63cbb8facd9d9dc016f902bb312283f0b5f8d055 (diff) |
arduino-nano: 16bit timer frequency
Diffstat (limited to 'include/arch')
-rw-r--r-- | include/arch/arduino-nano/driver/timer.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/arch/arduino-nano/driver/timer.h b/include/arch/arduino-nano/driver/timer.h index 98ef20e..87acfea 100644 --- a/include/arch/arduino-nano/driver/timer.h +++ b/include/arch/arduino-nano/driver/timer.h @@ -12,12 +12,12 @@ class Timer { public: Timer() {} - inline void setup_khz(unsigned char const frequency) { + inline void setup_khz(uint16_t const frequency) { OCR0A = frequency ? 255 / frequency : 1; TCCR0A = _BV(WGM01); prescaler = _BV(CS01) | _BV(CS00); } - inline void setup_hz(unsigned char const frequency) { + inline void setup_hz(uint16_t const frequency) { OCR0A = frequency ? 255 / frequency : 1; TCCR0A = _BV(WGM01); prescaler = _BV(CS02) | _BV(CS00); |