![]() |
Forum Index : Microcontroller and PC projects : Disable an interrupt?
Author | Message | ||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9501 |
Hi all. ![]() Still playing with my interrupts. Once you have set one up on the COM port, how do you temporarily disable it? The manual, page 7, right at the bottom says: "Also remember to disable an interrupt when you have finished needing it - background interrupts can cause strange and non-intuitive bugs." ...we will say nothing of the other problem I was having...(DO/LOOPS thread) ![]() Anyhow, in the case of the serial port, do I just CLOSE the port, and the interrupt is then disabled? I am guessing this is the way to do it, but as I have made assumptions like this before, I thought I should ask. So, I would assume that if I close the port, the interrupt will be cancelled, as there is no valid open port for it to work with once the port is closed. I can then just re-open the port again with the interrupt when I need it - correct? Smoke makes things work. When the smoke gets out, it stops! |
||||
Geoffg![]() Guru ![]() Joined: 06/06/2011 Location: AustraliaPosts: 3272 |
Yes, that is exactly correct. Geoff P.S. It is a change to see others creating bugs rather than me. Geoff Graham - http://geoffg.net |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |