Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
Balloon Comms Stm32
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
Stephen D
Balloon Comms Stm32
Commits
d534be68
Commit
d534be68
authored
1 year ago
by
Stephen D
Browse files
Options
Downloads
Patches
Plain Diff
add 250kbps config and add underflow sanity check
parent
8ca6123e
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/rf4463/config.rs
+45
-0
45 additions, 0 deletions
src/rf4463/config.rs
src/rf4463/mod.rs
+11
-0
11 additions, 0 deletions
src/rf4463/mod.rs
with
56 additions
and
0 deletions
src/rf4463/config.rs
+
45
−
0
View file @
d534be68
// 500kbps, 2-FSK
pub
const
RADIO_CONFIG
:
[
u8
;
643
]
=
[
0x7
,
0x2
,
0x1
,
0x0
,
0x1
,
0xC9
,
0xC3
,
0x80
,
0x8
,
0x13
,
0x0
,
0x20
,
0x21
,
0x20
,
0x0
,
0x0
,
0x0
,
0x5
,
0x11
,
0x0
,
0x1
,
0x0
,
0x62
,
0x5
,
0x11
,
0x0
,
0x1
,
0x3
,
0x30
,
0x5
,
0x11
,
0x10
,
0x1
,
0x4
,
...
...
@@ -38,3 +39,47 @@ pub const RADIO_CONFIG: [u8; 643] = [
0x11
,
0x30
,
0xC
,
0x0
,
0x0
,
0x0
,
0x0
,
0x0
,
0x0
,
0x0
,
0x0
,
0x0
,
0x0
,
0x0
,
0x0
,
0x0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 0x25, 0x10, 0x11, 0x21,
0xC, 0x18, 0xF4, 0xDB, 0xD6, 0xDF, 0xEC, 0xF7, 0xFE, 0x1, 0x15, 0xF0, 0xFF, 0x3, 0x8, 0x11,
0x22, 0x4, 0x0, 0x8, 0x7F, 0x0, 0x5D, 0xB, 0x11, 0x23, 0x7, 0x0, 0x1, 0x5, 0xB, 0x5, 0x2, 0x0,
0x3, 0x10, 0x11, 0x30, 0xC, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0xC, 0x11, 0x40, 0x8, 0x0, 0x3A, 0xC, 0xB1, 0x7E, 0x44, 0x44, 0x20, 0xFE,
];
*/
This diff is collapsed.
Click to expand it.
src/rf4463/mod.rs
+
11
−
0
View file @
d534be68
...
...
@@ -160,6 +160,10 @@ where
// wait for packet sent interrupt
while
!
self
.packet_sent_pending
()
?
{}
if
self
.fifo_underflow_pending
()
?
{
panic!
(
"underflow"
);
}
Ok
(())
}
...
...
@@ -187,6 +191,13 @@ where
Ok
(())
}
// also clears the interrupt
fn
fifo_underflow_pending
(
&
mut
self
)
->
Result
<
bool
,
Spi
::
Error
>
{
let
ch_pend
=
self
.send_command
::
<
7
>
(
&
[
GET_INT_STATUS
,
0xFF
,
0xFF
,
0xFF
^
(
1
<<
5
)])
?
[
6
];
Ok
(
ch_pend
&
(
1
<<
5
)
!=
0
)
}
// also clears the interrupt
fn
packet_sent_pending
(
&
mut
self
)
->
Result
<
bool
,
Spi
::
Error
>
{
let
ph_pend
=
self
.send_command
::
<
3
>
(
&
[
GET_INT_STATUS
,
0xFF
^
(
1
<<
5
),
0xFF
,
0xFF
])
?
[
2
];
...
...
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