-
Notifications
You must be signed in to change notification settings - Fork 195
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
Netdev2 #523
Netdev2 #523
Conversation
Hmmm...when I run "make test" locally, it passes. When the build runs it, it fails because of this in netdev/netdev.go: //go:linkname Use net.useNetdev Not sure how to fix this, or work around it. |
Smoke tests are failing because net/netdev is not available in the test version of tinygo. |
I also verified my interpretation of the DS3231 datasheet and my implementation of this formula by placing a DS3231 chip in the freezer section of my refrigerator for an hour or two, then reading the temperature. I got -16C, which is close enough to the -18C that the freezer was set to.
Changes based on feedback from Ben and Patricio: 0) Move netdever interface to "drivers" package 1) Mirror netdever interface with same in drivers repo 2) Use go:linkname to link to net.useNetdev() 3) Use native Go types in netdever interface 4) Add Netlinker interface to "drivers" package 5) Update documentation, add new README-net.md file
Build is broken due to dependency with tinygo repo: new constants were added to src/syscall. |
…el send/receive, and other cleanups
The current code interprets the 'century' flag as the year 2100. However the DS3231 hardware does not incorporate this flag in its leap year calculation, so will incorrectly consider the year 2100 as a leap year and increment from 2100-02-28 to 2100-02-29 instead of the correct 2100-03-01. The 'century' bit is not useful for anything as far as I can tell. But instead of removing the code that uses the 'century' bit, I thought it would be less intrusive to just document the current behavior.
Changes based on feedback from Ben and Patricio: 0) Move netdever interface to "drivers" package 1) Mirror netdever interface with same in drivers repo 2) Use go:linkname to link to net.useNetdev() 3) Use native Go types in netdever interface 4) Add Netlinker interface to "drivers" package 5) Update documentation, add new README-net.md file
I screwed up the git rebase and messed up my repo tree so closing this PR and replacing with #537. |
This PR adds a network device driver model called netdev. There is a companion PR for TinyGo to update the "net" package here #tinygo-org/tinygo#3452. This PR is for the netdev interface definitions, netdev drivers (wifinina, rtl8720dn, espat) and examples.
See netdev documentation here: netdev/README.md.
Testing results are here.
Espat driver is ported to netdev but untested. I'm waiting on some hardware (on order) to test. I didn't want to hold up the PR for espat; will submit updates when I get the hardware.
Thanks to the TinyGo dev community with all the help and suggestions.