🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    callbacks for SPI/UART?

    Scheduled Pinned Locked Moved ESPHome
    1 Posts 1 Posters 212 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • L Offline
      Lippy
      last edited by

      Hi folks!

      I am starting a project and already made some progress with my software. I am using SPI and UART (among other stuff).

      HardwareSerial provides an OnReceiveCallback. Good. But what about Transmitting? HardwareSerial.Write transmits data. Or better, it buffers it in the background and transmits it. When will this be finished? How can I detect an ongoing/finished transmission? Why is there no OnTransmitFinishedCallback?

      Similar with SPI:
      this enables CS line, transmits data and disables CS line.
      30ba4700-d40d-41e4-b9ed-de26cdb3e20f-image.png

      But this is blocking. Even if SPI frequencies are high and such transmissions are only taking a few 100microseconds. Why is this not done similiar like UART with background transmission and OnReceivedCallback or similar?

      In HardwareSerial I was able to find this OnReceiveCallback after digging a lot in the provided libs. But what about SPI?

      1 Reply Last reply Reply Quote 0

      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

      With your input, this post could be even better 💗

      Register Login
      • First post
        Last post