-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
[ports/rp2] new machine_rtc.c module #6923
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
Conversation
Ok. I see that I have to get throught the formatting code & commit workflow. Will resubmit when ready. |
Looks ok on first sight, but can you start by fixing style inconsistencies and other issues: squash in everything into logical commits (in this case: 2 of them, one which modifies .gitignore because that is unrelated to the rest, the other one which ads the module). Then, some things are pretty hard to read: we don't generally use hard-to-maintain mixed comment styles like |
ports/rp2/machine_rtc.c
Outdated
#include "pico/util/datetime.h" | ||
|
||
// ------------------ | ||
// Exported constants |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no such thing as 'exporting' a PP define
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Regarding the number of commits, this means that I'll have to delete my fork and start from scratch, right?
Also I have to fix the commit message style.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this means that I'll have to delete my fork and start from scratch
No. There are a bunch of ways to do this. Given the number of commits: something like git reset --mixed
will keep all your changes but erase all commits, so you can create a single new one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
t seems that, somehow, updating my local & remote repos with upstream and doing git reset --mixed, made PR #6929 to close. I did not want to close it on purpose. Now there is a #6932, with all green lights. Sorry for all this mess and thank you for your support. It is also ok with me if the project chooses #6928.
Closed, since it is duplicated with #6932 and I know now how to make PRs complying with MicroPython standards |
Added utime() to the os library
Hi
Although I was delighted to see micropython support in the new Raspberry Pi Pico, I as a bit surprised that there was no
machine.RTC
class for this port. So I took the plunge and began writting a basicmachine_rtc.c
module and learning in the process a bit about how to make an extension C module. This module is very basic for the time being (no interrupt handling) and conforms (I hope) to the interface documented in the MicroPython 1.14 official documentation.The python test code is this: