Skip to content

Instantly share code, notes, and snippets.

View bobmcwhirter's full-sized avatar

Bob McWhirter bobmcwhirter

View GitHub Profile
diff --git a/src/dma/traits.rs b/src/dma/traits.rs
index 09cf1c3..c49aca3 100644
--- a/src/dma/traits.rs
+++ b/src/dma/traits.rs
@@ -2,6 +2,7 @@ use super::*;
use crate::{
bb,
pac::{self, DMA1, DMA2, RCC},
+ serial::{Rx, Tx, RxDma, TxDma},
};
15:00:12.830 startup
15:00:13.337 esp8266 is online
15:00:13.337 disabling echo
15:00:13.337 disabling echo success
15:00:13.337 disabling ap
15:00:13.337 disabling ap success
15:00:13.337 enabling mux
15:00:13.337 enabling mux success
15:00:13.337 connecting wifi
15:00:16.375 connecting wifi success
myapp v0.1.0 (/Users/bob/repos/drogue/myapp)
├── bbqueue v0.4.8
│ └── generic-array v0.13.2
│ └── typenum v1.12.0
├── cortex-m v0.6.2
│ ├── aligned v0.3.2
│ │ └── as-slice v0.1.3
│ │ ├── generic-array v0.12.3
│ │ │ └── typenum v1.12.0
│ │ ├── generic-array v0.13.2 (*)
#![no_std]
#![no_main]
mod esp;
mod at_parser;
//use cortex_m;
//use embedded_hal::digital::v2::OutputPin;
use cortex_m_rt::entry;
use generic_array::{arr, GenericArray};
#[idle]
fn idle(ctx: idle::Context) -> ! {
let mut i = 0;
loop {
if ( i == 800_000 ) {
rprintln!("idle");
i = 0;
} else {
i += 1;
}
#![no_std]
#![no_main]
mod esp;
mod at_parser;
//use cortex_m;
//use embedded_hal::digital::v2::OutputPin;
use cortex_m_rt::entry;
use generic_array::{arr, GenericArray};
fn get_socket_mut<'a>(&'a self, handle: SocketHandle) -> Result<&'a mut Socket<InboundSize, OutboundSize>, TcpError> {
if let Ok(mut socket_set) = self.sockets.try_borrow_mut() {
if let Some(mut socket) = socket_set.sockets.get_mut(handle.0 as usize) {
Ok(&mut socket.socket)
} else {
Err(InvalidSocket)
}
} else {
Err(InvalidSocket)
}
impl<'a,N:'static> ESP8266TcpSocket<'a, N>
where
N: ArrayLength<u8>,
{
fn new(id: u8) -> Self
{
let outbound = BBBuffer::new();
let (out_p, out_c) = outbound.try_split().unwrap();
#![no_std]
#![feature(asm)]
#![no_main]
use cortex_m_rt::entry;
use panic_halt as _;
extern crate stm32f1xx_hal;
#[entry]
[default.probe]
# The index of the probe in the connected probe list.
# probe_index = 0
# The protocol to be used for communicating with the target.
protocol = "Swd"
# The speed in kHz of the data link to the target.
# speed = 1337
[default.flashing]