Fix pycubed pwm use

This commit is contained in:
Scott Shawcroft 2020-08-24 18:29:34 -07:00
parent 1527a3ce92
commit 0cc438e6b9
No known key found for this signature in database
GPG Key ID: 0DFD512649C052DA
2 changed files with 8 additions and 8 deletions

View File

@ -32,7 +32,7 @@
#include "shared-bindings/nvm/ByteArray.h"
#include "common-hal/microcontroller/Pin.h"
#include "hal/include/hal_gpio.h"
#include "shared-bindings/pulseio/PWMOut.h"
#include "shared-bindings/pwmio/PWMOut.h"
nvm_bytearray_obj_t bootcnt = {
.base = {
@ -44,9 +44,9 @@ nvm_bytearray_obj_t bootcnt = {
void board_init(void) {
pulseio_pwmout_obj_t pwm;
common_hal_pulseio_pwmout_construct(&pwm, &pin_PA23, 4096, 2, false);
common_hal_pulseio_pwmout_never_reset(&pwm);
pwmio_pwmout_obj_t pwm;
common_hal_pwmio_pwmout_construct(&pwm, &pin_PA23, 4096, 2, false);
common_hal_pwmio_pwmout_never_reset(&pwm);
}
bool board_requests_safe_mode(void) {

View File

@ -32,7 +32,7 @@
#include "shared-bindings/nvm/ByteArray.h"
#include "common-hal/microcontroller/Pin.h"
#include "hal/include/hal_gpio.h"
#include "shared-bindings/pulseio/PWMOut.h"
#include "shared-bindings/pwmio/PWMOut.h"
nvm_bytearray_obj_t bootcnt = {
.base = {
@ -44,9 +44,9 @@ nvm_bytearray_obj_t bootcnt = {
void board_init(void) {
pulseio_pwmout_obj_t pwm;
common_hal_pulseio_pwmout_construct(&pwm, &pin_PA23, 4096, 2, false);
common_hal_pulseio_pwmout_never_reset(&pwm);
pwmio_pwmout_obj_t pwm;
common_hal_pwmio_pwmout_construct(&pwm, &pin_PA23, 4096, 2, false);
common_hal_pwmio_pwmout_never_reset(&pwm);
}
bool board_requests_safe_mode(void) {