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

struct osdp_event_cardread length field unit #26

Closed
z8a opened this issue Sep 24, 2020 · 1 comment
Closed

struct osdp_event_cardread length field unit #26

z8a opened this issue Sep 24, 2020 · 1 comment
Labels
Documentation Improvements or additions to documentation

Comments

@z8a
Copy link

z8a commented Sep 24, 2020

In the comment the field unit is bytes while it's bits.

@sidcha
Copy link
Member

sidcha commented Sep 24, 2020

Actually, data is in bits if format is OSDP_CARD_FMT_RAW_* or bytes when format is OSDP_CARD_FMT_ASCII. I'll update the comment to indicate this.

Thanks!

@sidcha sidcha added the Documentation Improvements or additions to documentation label Sep 24, 2020
@sidcha sidcha closed this as completed in 10aa25e Sep 24, 2020
sidcha added a commit that referenced this issue Jun 26, 2021
Also size_t and ssize_t as defined by the linux alternatives for these
file ops methods seemed a bit excessive here since we cannot be sending
that many bytes anyway.

Switch to using regular int and make sure that the parameters are
validated before calling the user provided ops methods to achieve the
same effect.

Related-to: #26
Signed-off-by: Siddharth Chandrasekaran <sidcha.dev@gmail.com>
sidcha added a commit that referenced this issue Jun 26, 2021
File TX command is not tricky but prone to off-by-ones. So let us see if
a test driven development actually works as the books suggest they
should.

Related-to: #26
Signed-off-by: Siddharth Chandrasekaran <sidcha.dev@gmail.com>
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants