avr-something

Something something AVR side…
git clone git://henryandlizzy.uk/avr-something
Log | Files | Refs | README

timer.h (612B)


      1 #pragma once
      2 #include "utils.h"
      3 
      4 
      5 namespace timer
      6 {
      7 namespace one
      8 {
      9 auto& control()
     10 {
     11 	return memory<uint16_t>(0x80);
     12 }
     13 auto& inputCapture()
     14 {
     15 	return memory<uint16_t>(0x86);
     16 }
     17 auto& outputCompareA()
     18 {
     19 	return memory<uint16_t>(0x88);
     20 }
     21 auto& outputCompareB()
     22 {
     23 	return memory<uint16_t>(0x8A);
     24 }
     25 }
     26 
     27 namespace two
     28 {
     29 auto& control()
     30 {
     31 	return memory<uint16_t>(0xB0);
     32 }
     33 auto& value()
     34 {
     35 	return memory(0xB2);
     36 }
     37 auto& outputCompareA()
     38 {
     39 	return memory(0xB3);
     40 }
     41 auto& outputCompareB()
     42 {
     43 	return memory(0xB4);
     44 }
     45 auto& interruptMask()
     46 {
     47 	return memory(0x70);
     48 }
     49 auto const& interruptFlags()
     50 {
     51 	return memory(0x37);
     52 }
     53 }
     54 
     55 }