Early versions simply had bugs. 1.7.1 has been perfectly stable (without modification), although not tested on a ton of layouts, mostly TA and Q8, and some others on the bench. But there are some incorrect statements here.
The OTSM implementation itself (or really hardware either for that matter) has nothing to do with the bare interrupts. I make it very clear in the comments of that interrupt that anyone modifying the code a lot should probably make it not bare. I make it very clear that it's not safe at all unless you know exactly how those modifications will interact with said bare interrupt at the machine code level. There's like a 10 line comment about this with BIG FAT warnings saying it's DEFINITELY not safe. Not sure how much more clear I could have been. The reason for those bare interrupts had nothing to do with OTSM, and the OTSM bare interrupt probably isn't even the most unsafe one (since it never returns). It had to do with getting OTSM and as many other features as possible to fit on an Attiny25 using a modified bistro code. It saved something like 50 bytes just in the OTSM interrupt alone, which may seem like not much, but it's enough to add a couple of features. 50 here, 50 there, you've got 20% extra space on these tiny machines. That's all. Use of better chips like the 45 was actually only just starting to be a thing as I finished debugging that code. The 45 was still bigger and didn't fit everywhere the 1616 and such simply were not in use at all then. The goal was get OTSM into a TA triple down version of bistro (I actually really like bistro, even on eswitch, still better than other fancier things, most of which came after I started that. For extended outdoor use, knowing exact power use can be very important, and bistro just gives known mode selection) on hardware in use at that time, without rewriting a firmware from scratch, and I did that.
Anyway, the OTSM implementation itself works fine with the interrupts implemented normally (just removing the bare attributes). The early instabilities around version 1.4 had to do with pin states and watchdog races, not the interrupts. But bistro OTSM is definitely based around a poll-and-restart driver, which is what bistro was. It's not how you'd do it in other drivers. For all the talk though, is there another clicky switch driver existing using OTSM with near the functionality of bistro-HD, even all these years later? Flashy Mike had a couple of nice things, and if so, great! OTSM is indeed hard to get right, but clicky switch lights do still exist!
Regarding separating UI code from hardware, that's a big part of what HD was about and why it built so many firmwares, each from a choice of hardware layout configs, choice of chip configs, and other options all selected in one master config for each version. Not every single thing about the chips was abstracted, but as I supported more chips, I abstracted more. I remember thinking the 1616 would requiring abstractifying a couple of more things, where defaults could keep the old configs working fine, but I never had time for that. when I started HD, other firmwares were not doing this much. Narsil might have been, not sure exactly when it started or how much it was doing that yet. I love what I'm seeing in that regard now with the direction Anduril (2) has taken as well though.
I'm kind of remembering why I left this place, although to be honest it was just a couple of nasty people. Tom Tom was on top of the list, and wow, felt the need even to insult me unprovoked above when I wasn't even here, but that's exactly how I remembered him. Oddly he's attacked me before in conversations where we were not even interacting. I don't recall it ever being in regard to something that even involved him, or his work. It's just weird. I exaggerate the significance of that though. Mostly I just left because of my own time.
Anyway, bistro-HD still operates clickly and even e-switch lights just fine years later on attiny25/45 (and mostly like now 85 as the V versions should be available now) and it's still easy to configure on different hardware layouts, and already configured on most.