USB_VCP.setinterrupt() not functioning?

Discussion related to "under the hood" OpenMV topics.
gregjeffrey
Posts: 3
Joined: Wed Mar 21, 2018 9:31 am

USB_VCP.setinterrupt() not functioning?

Postby gregjeffrey » Wed Mar 21, 2018 9:40 am

Hi,

I'm trying to disable the USB_VCP keyboard interrupt (in the docs it says to give USB_VCP.setinterrupt(-1) to disable), but I don't believe it is properly disabled.
I'm trying to send integers over USB and can do so just fine, except for the integer 3 (which corresponds with CTRL+C and is the default setting of setinterrupt). Sending a 3 will interrupt any python code that is running.

For now, I can get around this by sending the integers as strings and converting them back later, but I'd like to be able to send raw integers as well.
Am I disabling the keyboard interrupt feature properly, by using the following?

Code: Select all

brd = pyb.USB_VCP()
brd.setinterrupt(-1)
Thanks!
User avatar
kwagyeman
Posts: 2312
Joined: Sun May 24, 2015 2:10 pm

Re: USB_VCP.setinterrupt() not functioning?

Postby kwagyeman » Wed Mar 21, 2018 12:09 pm

Mmm, this is some weird MicroPython behavior. Um, I'll have to do some digging about this. In the meantime, try searching around for this problem. It sound like there will be a hit hub MicroPython issue about this.
Nyamekye,

Return to “Technical Discussion”

Who is online

Users browsing this forum: No registered users and 7 guests