Skip to content

examples/qencoder: obtain samples using the QEIOC_GETINDEX ioctl call#2452

Merged
xiaoxiang781216 merged 1 commit intoapache:masterfrom
zdebanos:qencoder-getindex
Jul 29, 2024
Merged

examples/qencoder: obtain samples using the QEIOC_GETINDEX ioctl call#2452
xiaoxiang781216 merged 1 commit intoapache:masterfrom
zdebanos:qencoder-getindex

Conversation

@zdebanos
Copy link
Copy Markdown
Contributor

Normally, the qencoder position is obtained using the QEIOC_POSITION ioctl call. Adding the -i argument uses the QEIOC_GETINDEX to obtain the qe_index_s struct containing the position alongisde other fields.

Testing

Tested locally on the SaMoCon board with commands

qe -i -p /dev/qe0  # successful QEIOC_GETINDEX on /dev/qe0
qe -i -p /dev/qe1  # successful QEIOC_GETINDEX on /dev/qe1
qe -i /dev/qe0     # only QEIOC_POSITION on /dev/qe0
qe -i /dev/qe1     # only QEOIC_POSITION on /dev/qe1

Normally, the qencoder position is obtained using the QEIOC_POSITION
ioctl call. Adding the -i argument uses the QEIOC_GETINDEX to
obtain the qe_index_s struct containing the position alongisde
other fields.

Signed-off-by: Stepan Pressl <pressste@fel.cvut.cz>
@xiaoxiang781216 xiaoxiang781216 merged commit 1a7da54 into apache:master Jul 29, 2024
@zdebanos zdebanos deleted the qencoder-getindex branch March 3, 2025 10:30
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.

2 participants