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
|
/// Configuration for a given context
|
||||||
pub struct Config<'a> {
|
pub struct Config<'a> {
|
||||||
/// Desired APN address.
|
/// Desired APN address.
|
||||||
pub apn: &'a str,
|
pub apn: &'a [u8],
|
||||||
/// Desired authentication protocol.
|
/// Desired authentication protocol.
|
||||||
pub auth_prot: AuthProt,
|
pub auth_prot: AuthProt,
|
||||||
/// Credentials.
|
/// Credentials.
|
||||||
pub auth: Option<(&'a str, &'a str)>,
|
pub auth: Option<(&'a [u8], &'a [u8])>,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Authentication protocol.
|
/// Authentication protocol.
|
||||||
|
|||||||
@ -166,9 +166,9 @@ async fn main(spawner: Spawner) {
|
|||||||
unwrap!(spawner.spawn(control_task(
|
unwrap!(spawner.spawn(control_task(
|
||||||
control,
|
control,
|
||||||
context::Config {
|
context::Config {
|
||||||
apn: "iot.nat.es",
|
apn: b"iot.nat.es",
|
||||||
auth_prot: context::AuthProt::Pap,
|
auth_prot: context::AuthProt::Pap,
|
||||||
auth: Some(("orange", "orange")),
|
auth: Some((b"orange", b"orange")),
|
||||||
},
|
},
|
||||||
stack
|
stack
|
||||||
)));
|
)));
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user