This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pub fn start() { | |
let database_url = env::var("DATABASE_URL") | |
.expect("DATABASE_URL must be set"); | |
let pool = create_pool(database_url); | |
HttpServer::new(move || { | |
let app = App::new() | |
.data(State { pool: pool.clone() }) | |
// enable logger |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![no_std] | |
#![no_main] | |
extern crate panic_semihosting; | |
use cortex_m_rt::entry; | |
use cortex_m_semihosting::{hprintln}; | |
use f411::{ | |
hal::{prelude::*, stm32, i2c::I2c}, |
OlderNewer