PaulStoffregen / FreqCount

Measures the frequency of a signal by counting the number of pulses during a fixed time.
http://www.pjrc.com/teensy/td_libs_FreqCount.html
141 stars 45 forks source link

Add define for ATmega328PB #30

Closed bodgit closed 11 months ago

bodgit commented 1 year ago

I noticed I was getting an error compiling specifically for the 328PB so I added the necessary define. I added it as a separate block as the 328PB has two extra timers/counters not found on the 328P; T3 & T4. I've no idea if they're suitable for use with your library and a case of just defining COUNTER_USE_TIMER3, etc.

I'm only using T1 currently so I think I can get away with compiling for 328P for now.

bodgit commented 11 months ago

@PaulStoffregen any feedback? I'm having to compile for 328P so this library doesn't error, but then flash for 328PB otherwise the chip ID doesn't match so the workflow is currently a bit clunky.