Use byte slice for config

This commit is contained in:
Ulf Lilleengen 2024-09-06 11:22:07 +02:00
parent e2e3143c2e
commit 1b1db2401b
2 changed files with 4 additions and 4 deletions

View File

@ -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.

View File

@ -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
)));