I made a version of micronucleus only using polling, based on your work above. You can find the branch here:
https://github.com/micronucleus/micronu ... g/firmware
Getting the polling to work with larger datatransfers as well was not easy. Finding the right timing to call usbPoll() in between transmissions was quite difficult. I had no luck with a blocking wait, so in the end i settled with a 100µs loop and calls to the housekeeping functions in between. The current state seems to work pretty reliably on my machine, even when routed through two cascaded hubs. But even slight changes in the loop timing will cause errors during data transfer.
Entirely polled V-USB? [yes, it works!]
Re: Entirely polled V-USB? [yes, it works!]
meh... just tried it on another machine and it failed all the time. Looks like the only solution is to introduce a more sophisticated algorithm that decides when to do the housekeeping.
Re: Entirely polled V-USB? [yes, it works!]
I noticed that you don't clear the interrupt flag before PCINT0_vect(). Did you determine that leaving the flag set won't bother usbdrv? I ask because I have seen places in the interrupt code where it checks the flag and acts on whether it's set.
Re: Entirely polled V-USB? [yes, it works!]
I moved that to the beginning of the interrupt routine to ensure that YL is initialized as well.