I was trying to compile actual version of MPY with DEC and here is patch for machine_dec.c to work with actual version of MPY: machine_dec.c.txt (863 Bytes)
It is classic patch file, txt extension is because of limitations of forum. Usage is common:
$ cd $MPY_SOURCE/ports/esp32/
$ cat machine_dec.c.txt | patch
@sengp, I have a question - is it possible to create pull request with pulse count units support to Micropython? It would be a shame if support for this cool feature of ESP32 was not part of Micropython. I have a patch working with actual version of mpy, so I can help with it, if you are interested…