Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v-usb update from upstream #4

Merged
merged 3 commits into from
Mar 20, 2021
Merged

Conversation

dioannidis
Copy link
Contributor

Hi,

a non intrusive update from upstream just to be consistent with the latest v-usb code.

Changes :

  • ( usbdrvasm15.inc ) * Fixed length of SE0 on 15 MHz clock. Terminating SE0 was 3 CPU cycles longer than comments indicate.
  • ( usbdrvasm20.inc ) * Fixed comments indicating CPU cycles taken. ST instruction uses two cycles while LDI takes one.
  • ( usbconfig.h ) Added missing configurations options.

@nerdralph
Copy link
Owner

It looks OK. Have you tested it already?
Since it doesn't impact the 12MHz V-USB code, I don't see a material benefit to merging it. I probably will anyway, after cloneing your fork and building it for the m8 and for the m88. If the binaries checksum the same as my builds, then I can be sure it's safe to merge.

@dioannidis
Copy link
Contributor Author

As you said it doesn't impact the main 12MHz code. In my all usbasps, 3 chinese, 1 home etched and 1 on breadboard, works with no problem.

I'm experimenting with different ( higher ) crystal's, trying @akrasuski1's changes ( from https://github.com/akrasuski1/usbasp-uart ) . AFAIU, he used an old V-USB version and yours, except the above changes, are in HEAD with the master V-USB code. This is the main reason I choose your fork as base for adding @akrasuski1's UART or implement UART via HID .

@dioannidis
Copy link
Contributor Author

dioannidis commented Mar 19, 2021

Hi,

in the meantime, while I'm waiting for this PR to be resolved...

Are you and @MCUdude interested for a firmware version that uses OS Descriptor on Windows that automatically assigns a winusb driver to the device ? No need to use Zadig or libusb with this approach. Also the Arduino IDE's avrdude it works without a problem.

I can create a PR if you are .

EDIT: This works for windows 8.1 and up ... On Windows 7 you need drivers ...

@nerdralph
Copy link
Owner

I only have one Windoze box, and it runs Win7.
It would be nice however to see the V-USB descriptor code cleaned up. Part of my reluctance to do more work with V-USB was related to how messy the code is. Desginated initializers has been supported since gcc-3.0, so it should've been used in V-USB from the start.
That's one of the first things I did when I started working with the CH55x devices.
https://github.com/nerdralph/ch554_sdcc/blob/master/examples/CMSIS_DAP/USBconstant.c#L9

@dioannidis
Copy link
Contributor Author

Hi

It would be nice however to see the V-USB descriptor code cleaned up.

< snip >

Check the #5 PR. It should work as before except that if you connect the USBasp device to a windows 8.1 and up box, it will enumerate as winusb device compatible and use the winusb.sys driver.

@nerdralph nerdralph merged commit a6f2a88 into nerdralph:master Mar 20, 2021
@dioannidis dioannidis deleted the v-usb_update branch March 21, 2021 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants