Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(*): Add debug derive fixing log feature #88

Merged
merged 1 commit into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions src/asynch/at_udp_socket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ pub struct AtUdpSocket<'a>(pub(crate) UdpSocket<'a>);

impl<'a> AtUdpSocket<'a> {
pub(crate) const PPP_AT_PORT: u16 = 23;
pub(crate) const PPP_AT_IP: Ipv4Address = Ipv4Address::new(172, 30, 0, 251);
}

impl<'a> embedded_io_async::ErrorType for &AtUdpSocket<'a> {
Expand All @@ -23,10 +24,7 @@ impl<'a> Read for &AtUdpSocket<'a> {
impl<'a> Write for &AtUdpSocket<'a> {
async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> {
self.0
.send_to(
buf,
(Ipv4Address::new(172, 30, 0, 251), AtUdpSocket::PPP_AT_PORT),
)
.send_to(buf, (AtUdpSocket::PPP_AT_IP, AtUdpSocket::PPP_AT_PORT))
.await
.unwrap();

Expand Down Expand Up @@ -58,10 +56,7 @@ impl<'a> Read for AtUdpSocket<'a> {
impl<'a> Write for AtUdpSocket<'a> {
async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> {
self.0
.send_to(
buf,
(Ipv4Address::new(172, 30, 0, 251), AtUdpSocket::PPP_AT_PORT),
)
.send_to(buf, (AtUdpSocket::PPP_AT_IP, AtUdpSocket::PPP_AT_PORT))
.await
.unwrap();

Expand Down
2 changes: 1 addition & 1 deletion src/asynch/control.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ impl<'a, const INGRESS_BUF_SIZE: usize, const URC_CAPACITY: usize>
Self {
state_ch,
at_client: ProxyClient::new(req_sender, res_slot),
urc_channel: urc_channel,
urc_channel,
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/asynch/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use embassy_sync::waitqueue::WakerRegistration;
use crate::connection::{WiFiState, WifiConnection};

/// The link state of a network device.
#[derive(PartialEq, Eq, Clone, Copy)]
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum LinkState {
/// Device is not yet initialized.
Expand Down
Loading