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

usb powerdown #401

Closed
wants to merge 2 commits into from
Closed

Conversation

arpruss3
Copy link

@arpruss3 arpruss3 commented Dec 8, 2017

USB should be powered down on Serial.end().

@rogerclarkmelbourne
Copy link
Owner

Does USB power need to be enabled in Serial.begin ?

@arpruss3
Copy link
Author

arpruss3 commented Dec 9, 2017

I think it must already be, because (a) the bootloader powers down USB and obviously Serial is working, and (b) I have the powerdown code in my HID library, and I can shut down HID and start up Serial and it just works.

(One other thing that might be a good idea would be to move the USB interface reset code from the boards init file to Serial.begin(). But it doesn't seem necessary: I can switch between HID and Serial without it.)

@rogerclarkmelbourne
Copy link
Owner

rogerclarkmelbourne commented Dec 11, 2017

You seem to have pushed changes to loads of other unrelated files.

I trick I use before committing and pushing, is to use

git status

to determine the extend of the changes I am about to commit.

And if there are files which have changed but I didnt intend them to change I use

git checkout master FILENAME_TO_RESTORE

@arpruss
Copy link
Contributor

arpruss commented Dec 11, 2017

Oops. Sorry!

Each time I pull things from git, I have to change the attributes in tools/win to make the files executable on Windows, and I think all the extra changed files were files whose attributes got changed.

I really don't know how to work with git. :-( Is there a way you can just accept the changes to the USB files?

Of course, it would make things more convenient to you if you made the tools/win files executable as well, but that really should be a separate PR.

@rogerclarkmelbourne
Copy link
Owner

It looks like your system is changing the permissions on file

tools/win/bmp_upload.bat 100644 → 100755

Are you running Linux ?

These are files in the tools/win folder, so I can't quite see how a Linux system would arbitrarily change them.

The only way to partially accept a PR is to pull your PR to a local branch (I do this already), then pull all the individual files from my master, to overwrite your changes, then commit those changes then push the changes

However as you changed 13 files of which 9 should not have been changed, I'd have to manually do that for 9 files
(I'm not sure if I can pull via wildcard, it sometimes works but not always)

Its probably easier for me to manually edit the files, but the whole point of a PR is so I don't need to spend time and effort and potentially add errors by manually updating files

@rogerclarkmelbourne
Copy link
Owner

I've tried to use your PR and overwrite the unrelated changes to file permissions, but it makes things messy, because Git still sees the changes to permissions and the changes to all those binary files get made twice; which is not a good idea.

I'll need to manually copy the 2 files you changed it my Master and commit them as if they were my change, as I cant see a better way to do it

rogerclarkmelbourne added a commit that referenced this pull request Jan 21, 2018
…permissions on unrelated files in the tools
@rogerclarkmelbourne
Copy link
Owner

I've manually copied your files and committed them myself.
See 9cd2f3a

Please confirm that the commit included all the necessary files (because your PR included changes to 18 unrelated files)

lacklustrlabs pushed a commit to lacklustrlabs/Arduino_STM32 that referenced this pull request Jan 21, 2018
…ncluded changes to permissions on unrelated files in the tools
BlackBrix added a commit to BlackBrix/Arduino_STM32_PLC that referenced this pull request Jan 24, 2018
BlackBrix added a commit to BlackBrix/Arduino_STM32_PLC that referenced this pull request Jan 24, 2018
@rogerclarkmelbourne
Copy link
Owner

I will close this, as its already been implemented by me manually merging the code so that I just get the changes to usb.c

minimum-necessary-change pushed a commit to minimum-necessary-change/Arduino_STM32 that referenced this pull request Sep 16, 2019
…ncluded changes to permissions on unrelated files in the tools
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.

3 participants