Skip to content

Commit

Permalink
Update machine_encoder.c
Browse files Browse the repository at this point in the history
  • Loading branch information
IhorNehrutsa committed Aug 16, 2023
1 parent e405bad commit 0d72fb2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ports/esp32/machine_encoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ See also
https://github.com/espressif/esp-idf/tree/master/examples/peripherals/pcnt/rotary_encoder
*/

// #define DBG(...)
#define DBG(...) mp_printf(&mp_plat_print, __VA_ARGS__); mp_printf(&mp_plat_print, "\n");
#define DBG(...)
//#define DBG(...) mp_printf(&mp_plat_print, __VA_ARGS__); mp_printf(&mp_plat_print, "\n");

#include "py/mpprint.h"
#include "py/runtime.h"
Expand Down Expand Up @@ -355,7 +355,7 @@ STATIC mp_obj_t machine_PCNT_irq(size_t n_pos_args, const mp_obj_t *pos_args, mp
} else {
if (trigger & PCNT_EVT_THRES_1) {
if (args[ARG_value].u_obj != MP_OBJ_NULL) {
match1 = = GET_INT(args[ARG_value].u_obj)
counter_t match1 = GET_INT(args[ARG_value].u_obj);
if (self->match1 != match1) {
self->match1 = match1;
pcnt_event_disable(self->unit, PCNT_EVT_THRES_1);
Expand Down

0 comments on commit 0d72fb2

Please sign in to comment.