Don't stop a waveform simply by calling pinMode (#4906)
Don't stop a waveform simply by calling pinMode (#4906)

Setting a pin direction would cause a waveform generator attached to it to stop.
This could cause PWM to stop if pinMode() is called while running (as it was
called in __analogWrite()).

Remove the stopWaveform call from pinMode, the Tone, analogWrite, or Servo
that initiated the waveform has responsibility for stopping it (and it does)
when complete, irrespective of the pinMode.

Fixes #4905
hallard/Arduino,sticilface/Arduino,Lan-Hekary/Arduino,sticilface/Arduino,sticilface/Arduino,hallard/Arduino,Lan-Hekary/Arduino,sticilface/Arduino,esp8266/Arduino,wemos/Arduino,Lan-Hekary/Arduino,hallard/Arduino,Lan-Hekary/Arduino,wemos/Arduino,Lan-Hekary/Arduino,esp8266/Arduino,esp8266/Arduino,wemos/Arduino,sticilface/Arduino,hallard/Arduino,hallard/Arduino,esp8266/Arduino,wemos/Arduino,wemos/Arduino,esp8266/Arduino