First off: Obligatory disclaimer that I did search, and did not find an answer. Most likely because my search terms were way off the mark.
I have a whole pile of teensy HID projects. One day I hit upload and realized I hadn't manually set the port, and I flashed my input device (teensy powered of course) instead of the teensy I was trying to flash.
I still want to be able to update my HID projects, but I'd like to have a physical switch or some way of preventing them from showing up as a flashable teensy to the Arduino IDE / Platform IO, without making my life too difficult. It'd be worth noting that my HID projects are things I would distribute to others. Accessibility devices, or custom input devices that in some way fill a need not otherwise being filled. It would be great if they could flash it themselves when I'm not around to do so with updated firmware (lets assume it'd be because I didn't test it well enough to find every quirk or bad assumption I made when I wrote it). But, I don't want them accidentally flashing it, like I've done, and suddenly not have a mouse or keyboard or whatever HID device it happens to be.
Not sure what search terms to use to get the answer, so I'm left asking.
I think my preferred solution if possible would be to dedicate a pin to switch it into program mode like some ESP32s do (the ones that don't do it automatically), but if I could in the loop() just say "don't get flashed", that'd solve it for me as well as long as I never forgot to add a delay in setup(). No idea if this is possible, but I suspect I'm not that lucky today.
I have a whole pile of teensy HID projects. One day I hit upload and realized I hadn't manually set the port, and I flashed my input device (teensy powered of course) instead of the teensy I was trying to flash.
I still want to be able to update my HID projects, but I'd like to have a physical switch or some way of preventing them from showing up as a flashable teensy to the Arduino IDE / Platform IO, without making my life too difficult. It'd be worth noting that my HID projects are things I would distribute to others. Accessibility devices, or custom input devices that in some way fill a need not otherwise being filled. It would be great if they could flash it themselves when I'm not around to do so with updated firmware (lets assume it'd be because I didn't test it well enough to find every quirk or bad assumption I made when I wrote it). But, I don't want them accidentally flashing it, like I've done, and suddenly not have a mouse or keyboard or whatever HID device it happens to be.
Not sure what search terms to use to get the answer, so I'm left asking.
I think my preferred solution if possible would be to dedicate a pin to switch it into program mode like some ESP32s do (the ones that don't do it automatically), but if I could in the loop() just say "don't get flashed", that'd solve it for me as well as long as I never forgot to add a delay in setup(). No idea if this is possible, but I suspect I'm not that lucky today.