Skip to content

Frozen python code as part of machine module? #8241

@harbaum

Description

@harbaum

I am implementing an alternative to #6639 which only does the very basic ESP32 PCNT API in C. The Counter and Encoder classes as decribed at #8072 are pure Python and subclassed from this PCNT API.

I personally think that such an approach is nicer and cleaner than the current approach. I thus would like to provide a full implementation of my approach.

But Encoder and Counter classes as described in the aforementioned documentation are part of the machine module. And I don't know how to add Python code to that. Is that possible at all? Can I add python code to the machine module to be frozen into the firmware?

I simply tried to add machine/Encoder.py to port/esp32/modules. But that does not work. It compiles but Encoder does not how up in the machine module.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy