uart irq for Fipy
I need a receive callback event for uart. From the micropython site and also from a previous discussion from this forum, I found the following implementation
uart1.irq(uart1.RX_ANY, priority=1, handler=irq_uart1, wake=machine.IDLE)
However, on my Fipy it shows this error,
AttributeError: 'UART' object has no attribute 'irq'
This is the current firmware version
(sysname='FiPy', nodename='FiPy', release='1.18.2', version='v1.8.6-849-07a52e4 on 2019-02-08', machine='FiPy with ESP32', lorawan='1.0.2', sigfox='1.0.1')
Is the uart.irq only available for wipy? How can I get this on fipy board? Does it require to upgrade the firmware?
@robert-hh Thanks a lot for the suggestion. Threading worked quite well for my application.
robert-hh last edited by robert-hh
@sanjoy You can use threading or uasyncio. Threading is easier to understand. It just uses more RAM, but that should be not problem with a FiPy.
Thanks for the reply.
Could you please suggest me how should I implement this? Any example available?
I need uart.irq for fipy, so that it does not need to perform polling to check if any rx data is available.
This post is deleted!
We dont expose the ability to receive a callback event on uart irq's. our implementation is a little different to the standard Micropython versions.