add USEABLE_HARDWARE_PWM & clear up some compiler warnings

This commit is contained in:
Bob-the-Kuhn
2018-01-24 21:40:48 -06:00
parent 70e4f12d2f
commit ab709ccac1
3 changed files with 16 additions and 12 deletions

View File

@@ -43,6 +43,10 @@
* Utility functions
*/
// Due has 12 PWMs assigned to logical pins 2-13.
// 6, 7, 8 & 9 come from the PWM controller. The others come from the timers.
#define USEABLE_HARDWARE_PWM(p) ((2 >= p) && (p <= 13))
#ifndef MASK
#define MASK(PIN) (1 << PIN)
#endif