Skip to content

Instantly share code, notes, and snippets.

pub use mcu::bobbin_common::console::*;
use mcu::bobbin_common::periph::IntoPeriph;
use mcu::rcc::*;
use mcu::usart::*;
use mcu::pin::*;
pub const USART: Usart3 = USART3;
const USART_TX: Pd8 = PD8;
const USART_RX: Pd9 = PD9;
#[allow(unused_imports)] use bobbin_common::*;
#[derive(Clone, Copy, PartialEq, Eq)]
#[doc="GPIO Peripheral"]
pub struct GpioPeriph(pub usize);
pub struct GpioPin { pub port: GpioPeriph, pub index: usize }
impl GpioPeriph {
(peripheral
(group-name GPIO)
(description "General-purpose I/Os")
(register
(name MODER)
(offset 0x0)
(size 0x20)
(access read-write)
(description "GPIO port mode register")
(field
(peripheral
(group-name USART)
(register
(name CR1)
(offset 0x0)
(size 0x20)
(access read-write)
(reset-value 0x0)
(description "Control register 1")
@jcsoo
jcsoo / rust-embedded-2018.md
Last active February 19, 2018 20:43
Rust Embedded Opportunities 2018

Thoughts on Rust and Embedded

What is it that we really want? At a broad level:

  • To improve the absolute quality (functionality, safety, performance) of embedded software in the wild.
  • To improve the productivity of embedded software development teams, by reducing the tangible and intangible costs of achieving a level of quality.
  • To improve the experience for programmers developing for embedded systems.
  • To make embedded systems programming more accessible for people that are not already embedded systems developers.

Competitors

extern crate futures;
extern crate tokio_proto;
#[macro_use]
extern crate tokio_core;
use std::io::{self, Read};
use futures::{Future, Poll};
use tokio_proto::server;
use tokio_core::{Loop, TcpStream};
### Keybase proof
I hereby claim:
* I am jcsoo on github.
* I am jcsoo (https://keybase.io/jcsoo) on keybase.
* I have a public key whose fingerprint is B9C4 E5EC EDB6 66F5 1379 2D18 1278 B32E 5100 B816
To claim this, I am signing this object: