Fixes and improvements for PWM pins (#13383)
This commit is contained in:
@ -72,14 +72,17 @@ void FastIO_init(); // Must be called before using fast io macros
|
||||
#define SET_INPUT_PULLUP(IO) _SET_MODE(IO, INPUT_PULLUP) /*!< Input with Pull-up activation */
|
||||
#define SET_INPUT_PULLDOWN(IO) _SET_MODE(IO, INPUT_PULLDOWN) /*!< Input with Pull-down activation */
|
||||
#define SET_OUTPUT(IO) OUT_WRITE(IO, LOW)
|
||||
#define SET_PWM(IO) _SET_MODE(IO, PWM)
|
||||
|
||||
#define GET_INPUT(IO)
|
||||
#define GET_OUTPUT(IO)
|
||||
#define GET_TIMER(IO)
|
||||
|
||||
#define PWM_PIN(p) digitalPinHasPWM(p)
|
||||
#define USEABLE_HARDWARE_PWM(p) PWM_PIN(p)
|
||||
#define PWM_PIN(P) digitalPinHasPWM(P)
|
||||
#define USEABLE_HARDWARE_PWM(P) PWM_PIN(P)
|
||||
|
||||
// digitalRead/Write wrappers
|
||||
#define extDigitalRead(IO) digitalRead(IO)
|
||||
#define extDigitalWrite(IO,V) digitalWrite(IO,V)
|
||||
|
||||
#define ANALOG_WRITE(IO,V) analogWrite(IO,V)
|
||||
|
Reference in New Issue
Block a user