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

@ -43,6 +43,7 @@
#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 TOGGLE(IO) OUT_WRITE(IO, !READ(IO))
@ -50,13 +51,15 @@
#define GET_OUTPUT(IO)
#define GET_TIMER(IO)
#define PWM_PIN(p) true
#define USEABLE_HARDWARE_PWM(p) PWM_PIN(p)
#define PWM_PIN(P) true
#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)*65535/255)
//
// Pins Definitions
//