Yes, I was wondering about that - I guess ideally there would be a more general purpose solution, but that could definitely work.
IRQ is a bit tricky because you're interrupted when a new byte is needed - NOT when the last byte has been fully sent.
On the implementation side it might be worth adding a new flag for the 'device type' that would allow a pin to be set of cleared. That way the event could be queued up in non-IRQ logic - it even means that it might be possible to queue a set and then a reset, pulsing a specific pin after serial data was sent.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Yes, I was wondering about that - I guess ideally there would be a more general purpose solution, but that could definitely work.
IRQ is a bit tricky because you're interrupted when a new byte is needed - NOT when the last byte has been fully sent.
On the implementation side it might be worth adding a new flag for the 'device type' that would allow a pin to be set of cleared. That way the event could be queued up in non-IRQ logic - it even means that it might be possible to queue a set and then a reset, pulsing a specific pin after serial data was sent.