Explorar o código

【修改】细节错误改动

Signed-off-by: chenyong <1521761801@qq.com>
chenyong %!s(int64=6) %!d(string=hai) anos
pai
achega
eddb875708
Modificáronse 2 ficheiros con 1 adicións e 3 borrados
  1. 1 1
      examples/stm32l4_pandora/wdt.py
  2. 0 2
      port/machine_pwm.c

+ 1 - 1
examples/stm32l4_pandora/wdt.py

@@ -13,4 +13,4 @@ from machine import WDT
 wdt = WDT(10)                # Create an WDT device object, set the timeout to 10 seconds
 wdt = WDT(10)                # Create an WDT device object, set the timeout to 10 seconds
 wdt.feed()                   # Perform the "feed dog" operation to clear the watchdog device count during the timout period
 wdt.feed()                   # Perform the "feed dog" operation to clear the watchdog device count during the timout period
                              # If not executed, the system will restart after the timeout
                              # If not executed, the system will restart after the timeout
-print("reset system after 10 seconds")
+print("reset system after 10 seconds")

+ 0 - 2
port/machine_pwm.c

@@ -58,14 +58,12 @@ STATIC void machine_pwm_print(const mp_print_t *print, mp_obj_t self_in, mp_prin
     machine_pwm_obj_t *self = self_in;
     machine_pwm_obj_t *self = self_in;
 
 
     mp_printf(print, "PWM(%p; ", self);
     mp_printf(print, "PWM(%p; ", self);
-
     mp_printf(print, "id=%d, ", self->id);
     mp_printf(print, "id=%d, ", self->id);
     mp_printf(print, "channel=%d, ", self->channel);
     mp_printf(print, "channel=%d, ", self->channel);
     mp_printf(print, "freq=%d, ", self->freq);
     mp_printf(print, "freq=%d, ", self->freq);
     mp_printf(print, "duty=%d)", self->duty);
     mp_printf(print, "duty=%d)", self->duty);
 }
 }
 
 
-
 STATIC void error_check(bool status, const char *msg) {
 STATIC void error_check(bool status, const char *msg) {
     if (!status) {
     if (!status) {
         nlr_raise(mp_obj_new_exception_msg(&mp_type_ValueError, msg));
         nlr_raise(mp_obj_new_exception_msg(&mp_type_ValueError, msg));