Skip to content

Commit cb6cca6

Browse files
committed
sam: Added digitalPinHasPWM(..) method
Fixes arduino#1342
1 parent f0ca4dd commit cb6cca6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

variants/arduino_due_x/variant.h

+1
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ extern "C"{
6666
#define portOutputRegister(port) ( &(port->PIO_ODSR) )
6767
#define portInputRegister(port) ( &(port->PIO_PDSR) )
6868
//#define portModeRegister(P) ( )
69+
#define digitalPinHasPWM(P) ( g_APinDescription[P].ulPWMChannel != NOT_ON_PWM || g_APinDescription[P].ulTCChannel != NOT_ON_TIMER )
6970

7071
// Interrupts
7172
#define digitalPinToInterrupt(p) ((p) < NUM_DIGITAL_PINS ? (p) : -1)

0 commit comments

Comments
 (0)