SonixQMK / qmk_firmware

Open-source keyboard firmware for Atmel AVR and Arm USB families
https://qmk.fm
GNU General Public License v2.0
515 stars 408 forks source link

sn32: introduce software pwm #295

Closed dexter93 closed 1 year ago

dexter93 commented 1 year ago

Sometimes manufacturers try to use GPIO pins for PWM that aren't in any of the CT16 banks, or pins that are both in A and B PWM banks causing the last picked one to override the other. Try to workaround it by doing software pwm in that case, timed by the hardware timer.

The driver defaults to hardware pwm control. In order to use the software control, add in config.h #define SN32_PWM_CONTROL SOFTWARE

Description

Types of Changes

Issues Fixed or Closed by This PR

Checklist

dexter93 commented 1 year ago

for #124 we might need to do some checks on pfpa logic

dexter93 commented 1 year ago

WIP, first results are promising. Will resume after the driver rework

dexter93 commented 1 year ago

changes now in #312 . closing

dexter93 commented 1 year ago

changes now in #312 . closing