Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
multipass
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
derf
multipass
Commits
bc3745b6
Commit
bc3745b6
authored
5 years ago
by
Daniel Friesel
Browse files
Options
Downloads
Patches
Plain Diff
nrf24: Add observe tx accessor
parent
b47295e3
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/driver/nrf24l01.h
+7
-0
7 additions, 0 deletions
include/driver/nrf24l01.h
src/driver/nrf24l01.cc
+5
-0
5 additions, 0 deletions
src/driver/nrf24l01.cc
with
12 additions
and
0 deletions
include/driver/nrf24l01.h
+
7
−
0
View file @
bc3745b6
...
@@ -193,6 +193,13 @@ public:
...
@@ -193,6 +193,13 @@ public:
*/
*/
uint8_t
flushRx
(
void
);
uint8_t
flushRx
(
void
);
/**
* Get observe value.
*
* @return Current Observe TX value. 7:4 counts lost packets since last channel change, 3:0 gives retransmission count of latest packet.
*/
uint8_t
getObserveTx
(
void
);
void
setup
();
void
setup
();
/**
/**
* Set Power Amplifier (PA) level to one of four levels:
* Set Power Amplifier (PA) level to one of four levels:
...
...
This diff is collapsed.
Click to expand it.
src/driver/nrf24l01.cc
+
5
−
0
View file @
bc3745b6
...
@@ -135,6 +135,11 @@ void Nrf24l01::powerDown(void)
...
@@ -135,6 +135,11 @@ void Nrf24l01::powerDown(void)
writeRegister
(
NRF_CONFIG
,
readRegister
(
NRF_CONFIG
)
&
~
(
1
<<
PWR_UP
));
writeRegister
(
NRF_CONFIG
,
readRegister
(
NRF_CONFIG
)
&
~
(
1
<<
PWR_UP
));
}
}
uint8_t
Nrf24l01
::
getObserveTx
(
void
)
{
return
readRegister
(
OBSERVE_TX
);
}
void
Nrf24l01
::
setRetries
(
uint8_t
delay
,
uint8_t
count
)
void
Nrf24l01
::
setRetries
(
uint8_t
delay
,
uint8_t
count
)
{
{
writeRegister
(
SETUP_RETR
,
(
delay
&
0xf
)
<<
ARD
|
(
count
&
0xf
)
<<
ARC
);
writeRegister
(
SETUP_RETR
,
(
delay
&
0xf
)
<<
ARD
|
(
count
&
0xf
)
<<
ARC
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment