summaryrefslogtreecommitdiff
path: root/include/arch
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2018-11-12 10:58:28 +0100
committerDaniel Friesel <derf@finalrewind.org>2018-11-12 10:58:28 +0100
commitc98b98590b57890d29c5c52bfddc997b08065aab (patch)
tree490ca5a4b85c549ae90bea367310dac6f4d73e9b /include/arch
parent63cbb8facd9d9dc016f902bb312283f0b5f8d055 (diff)
arduino-nano: 16bit timer frequency
Diffstat (limited to 'include/arch')
-rw-r--r--include/arch/arduino-nano/driver/timer.h4
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);