mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-25 00:02:28 +00:00
Use byte slice for config
This commit is contained in:
parent
e2e3143c2e
commit
1b1db2401b
@ -16,11 +16,11 @@ pub struct Control<'a> {
|
||||
/// Configuration for a given context
|
||||
pub struct Config<'a> {
|
||||
/// Desired APN address.
|
||||
pub apn: &'a str,
|
||||
pub apn: &'a [u8],
|
||||
/// Desired authentication protocol.
|
||||
pub auth_prot: AuthProt,
|
||||
/// Credentials.
|
||||
pub auth: Option<(&'a str, &'a str)>,
|
||||
pub auth: Option<(&'a [u8], &'a [u8])>,
|
||||
}
|
||||
|
||||
/// Authentication protocol.
|
||||
|
@ -166,9 +166,9 @@ async fn main(spawner: Spawner) {
|
||||
unwrap!(spawner.spawn(control_task(
|
||||
control,
|
||||
context::Config {
|
||||
apn: "iot.nat.es",
|
||||
apn: b"iot.nat.es",
|
||||
auth_prot: context::AuthProt::Pap,
|
||||
auth: Some(("orange", "orange")),
|
||||
auth: Some((b"orange", b"orange")),
|
||||
},
|
||||
stack
|
||||
)));
|
||||
|
Loading…
Reference in New Issue
Block a user