Fixes and improvements for PWM pins (#13383)

This commit is contained in:
Scott Lahteine
2019-03-13 06:51:15 -05:00
committed by GitHub
parent 87162658c4
commit f89b375fb9
26 changed files with 196 additions and 193 deletions

View File

@ -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)