~/talk

Handling a Family of Hardware Devices with a Single Implementation

Talkat CppCon 2021 · on Thursday, 2021-10-28· at 10:30· Online D, online· [rust]
name:Ben Saks
links:none on file
slides:none on file

Claims a single template implementation handles six Arduino Mega timers — two 8-bit and four 16-bit — by extracting differences into timer_traits with type aliases for clock select and count_t, using volatile register members and enum types for safety. Tools include templates, traits, enumeration types, operator overloading patterns and a class-specific operator new that maps the object to the hardware address. The result is one maintainable class template that compiles separately for each timer, preserves type safety, and keeps performance on par with handwritten register access.

AI-written summary · about

  1. 0:00Start
  2. 0:52Device Registers
  3. 5:19Six Programmable Timers on the Arduino Mega 2560
  4. 10:16Layout for Timer Zero
  5. 11:46Interrupt Mask Register
  6. 15:44Timer Zero Class
  7. 16:54Clock Source Enumeration
  8. 19:56Timer Traits
  9. 25:12Counting Speed
  10. 27:51Timer 80 Class Template
  11. 30:40Function Implementations
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.