flipper-io / flipper

Flipper is a development platform that can be controlled from any programming language.
https://www.flipper.io/
Apache License 2.0
70 stars 15 forks source link

Pwm #8

Closed nicholastmosher closed 8 years ago

nicholastmosher commented 8 years ago

Ok, I've made significant progress on the PWM driver, I believe that every method should work (or at least do something). Obviously I haven't had the chance to test the code on Flipper, but everything does build, so that's a good thing. Some updates on the design of the driver: In addition to having PWM channels (pwm0, pwm1, pwm2, pwm3, which are now of struct type _pwm_ch), the struct _pwm is now dedicated to functions that control the operation of the entire PWM controller module inside the ARM, such as power_on, power_off, configure_clockA, and configure_clockB. All function changes have been reflected in hardware/.../pwm.c, common/.../pwm.c, and include/.../pwm.h.

Also, I just realized while I was typing this... I built in a lot of facilitator functions, but I never added methods to actually set the duty cycle and period... Welp I'll get on that soon but it's past 1 am so I'll talk to you about it next chance I get.

nicholastmosher commented 8 years ago

Also, don't try to actually merge this anytime soon, we should do extensive testing within the scope of this pull request before we try to get this back into your master branch. You might also want to check that I handled merging your code smoothly, I think I kept your changes and discarded my own, but it can't hurt to check.

georgemorgan commented 8 years ago

Closed this request because it is outdated. Please submit another request with the updated code in the appropriate driver folder.