Title: Make changes to support binary transfers. by haydenroche5 · Pull Request #76 · blues/note-python · GitHub
Open Graph Title: Make changes to support binary transfers. by haydenroche5 · Pull Request #76 · blues/note-python
X Title: Make changes to support binary transfers. by haydenroche5 · Pull Request #76 · blues/note-python
Description: Add CRC support. Align serial and I2C code with note-c. This encompasses mimicking the algorithms used in note-c and also things like delay lengths, number of retries, transaction timeout lengths, etc. Align transaction logic with note-c. The majority of this work is in the reworked Transaction function, which is analogous to noteTransactionShouldLock in note-c. Rework serial/I2C locking so that the lock can be held for the entirety of a binary transfer. For example, for a binary receive operation, the host needs to send a card.binary.get and then immediately receive the binary data from the Notecard. The serial/I2C lock should be held for the entirety of this operation, rather than be released after the card.binary.get and reacquired for the receipt of the binary data. Add two methods for both serial and I2C: transmit and receive. transmit is used to transmit arbitrary bytes to the Notecard (e.g. after card.binary.put). receive is used to read a stream of bytes from the Notecard, stopping after reading a newline (e.g. after a card.binary.get). These are analogous to the chunked(Receive|Transmit) functions in note-c. Overhaul unit testing. This commit adds many new unit tests, in addition to reorganizing things. Tests for the Notecard base class are in test_notecard.py. OpenSerial tests are in test_serial.py, and OpenI2C tests are in test_i2c.py. There is a some code repetition here, especially between the _transact and Reset methods of OpenSerial and OpenI2C. Again, this follows the pattern in note-c and was done consciously. We may want to factor out that repetition in the future, but for now, I'm prioritizing parity with the "source of truth" (note-c).
Open Graph Description: Add CRC support. Align serial and I2C code with note-c. This encompasses mimicking the algorithms used in note-c and also things like delay lengths, number of retries, transaction timeout lengths, ...
X Description: Add CRC support. Align serial and I2C code with note-c. This encompasses mimicking the algorithms used in note-c and also things like delay lengths, number of retries, transaction timeout lengths, ...
Opengraph URL: https://github.com/blues/note-python/pull/76
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/commits/:range(.:format) |
| route-controller | pull_requests |
| route-action | commits |
| fetch-nonce | v2:28c85282-c594-e9c4-08e7-ca59bf9e5eba |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 9716:2159E5:713F25B:99C2146:6995FAA8 |
| html-safe-nonce | 326161eb76c77f4129255b86e28a26c9081e943c27a0999c1d4a6467745de49c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NzE2OjIxNTlFNTo3MTNGMjVCOjk5QzIxNDY6Njk5NUZBQTgiLCJ2aXNpdG9yX2lkIjoiNjEzODUxMjg1NjMxMTAwMzgxNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 025bdcf537017dbe1e47e6f8bfec9b203a835f666701d328b5254fdfbc60344a |
| hovercard-subject-tag | pull_request:1518832133 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/blues/note-python/pull/76/commits/1f783b87a9c8b9ea8918e2d6c31b19a187258986 |
| twitter:image | https://avatars.githubusercontent.com/u/8220503?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/8220503?s=400&v=4 |
| og:image:alt | Add CRC support. Align serial and I2C code with note-c. This encompasses mimicking the algorithms used in note-c and also things like delay lengths, number of retries, transaction timeout lengths, ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7490a2fd98baca866acf503b81aa249491b42e5b4bab7f7a2801be81175c8845 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/blues/note-python git https://github.com/blues/note-python.git |
| octolytics-dimension-user_id | 34011775 |
| octolytics-dimension-user_login | blues |
| octolytics-dimension-repository_id | 172786900 |
| octolytics-dimension-repository_nwo | blues/note-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 172786900 |
| octolytics-dimension-repository_network_root_nwo | blues/note-python |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7d4dd093df4317af2917f456adc39081443c0328 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width