-eval "$(lorri direnv)"
+use flake
--- /dev/null
+{
+ "nodes": {
+ "flake-utils": {
+ "locked": {
+ "lastModified": 1623875721,
+ "narHash": "sha256-A8BU7bjS5GirpAUv4QA+QnJ4CceLHkcXdRp4xITDB0s=",
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "rev": "f7e004a55b120c02ecb6219596820fcd32ca8772",
+ "type": "github"
+ },
+ "original": {
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "type": "github"
+ }
+ },
+ "flake-utils_2": {
+ "locked": {
+ "lastModified": 1614513358,
+ "narHash": "sha256-LakhOx3S1dRjnh0b5Dg3mbZyH0ToC9I8Y2wKSkBaTzU=",
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "rev": "5466c5bbece17adaab2d82fae80b46e807611bf3",
+ "type": "github"
+ },
+ "original": {
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "type": "github"
+ }
+ },
+ "nixpkgs": {
+ "locked": {
+ "narHash": "sha256-CM4XxuzS4VaTH3WYwUUmPBUSc2BNVLhv8JEahERWUWY=",
+ "path": "/home/patrickod/code/nixpkgs",
+ "type": "path"
+ },
+ "original": {
+ "path": "/home/patrickod/code/nixpkgs",
+ "type": "path"
+ }
+ },
+ "nixpkgs_2": {
+ "locked": {
+ "lastModified": 1617325113,
+ "narHash": "sha256-GksR0nvGxfZ79T91UUtWjjccxazv6Yh/MvEJ82v1Xmw=",
+ "owner": "nixos",
+ "repo": "nixpkgs",
+ "rev": "54c1e44240d8a527a8f4892608c4bce5440c3ecb",
+ "type": "github"
+ },
+ "original": {
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "type": "github"
+ }
+ },
+ "root": {
+ "inputs": {
+ "flake-utils": "flake-utils",
+ "nixpkgs": "nixpkgs",
+ "rust-overlay": "rust-overlay"
+ }
+ },
+ "rust-overlay": {
+ "inputs": {
+ "flake-utils": "flake-utils_2",
+ "nixpkgs": "nixpkgs_2"
+ },
+ "locked": {
+ "lastModified": 1625796896,
+ "narHash": "sha256-yAFp4hslYKZcZwAXSiKnFezSFY/kdoh4l5qqioTtHFM=",
+ "owner": "oxalica",
+ "repo": "rust-overlay",
+ "rev": "76732f3ddba766b1fe772fca80aafbc9cccd78dd",
+ "type": "github"
+ },
+ "original": {
+ "owner": "oxalica",
+ "repo": "rust-overlay",
+ "type": "github"
+ }
+ }
+ },
+ "root": "root",
+ "version": 7
+}
--- /dev/null
+{
+ description = "rust ARM M-0 development";
+ inputs = {
+ nixpkgs.url = "path:/home/patrickod/code/nixpkgs";
+ rust-overlay.url = "github:oxalica/rust-overlay";
+ flake-utils.url = "github:numtide/flake-utils";
+ };
+
+ outputs = { self, nixpkgs, rust-overlay, flake-utils, ... }:
+ flake-utils.lib.eachDefaultSystem (system:
+ let
+ overlays = [ (import rust-overlay) ];
+ pkgs = import nixpkgs {
+ inherit system overlays;
+ };
+ rust = pkgs.rust-bin.nightly.latest.default.override {
+ extensions = [
+ "clippy-preview"
+ "rust-src"
+ "rustfmt-preview"
+ ];
+ targets = [
+ "thumbv7em-none-eabihf"
+ ];
+ };
+ in
+ {
+ devShell = pkgs.mkShell {
+ buildInputs = [
+ pkgs.gcc-arm-embedded
+ pkgs.probe-run
+ pkgs.flip-link
+ pkgs.cargo-hf2
+ rust
+ ];
+ };
+ }
+ );
+}
);
let mut delay = Delay::new(_core.SYST, &mut _clocks);
+ // set pins low to prevent floating values read as data by the pixels
+ let mut front_neopixel_pin = _pins.d11.into_push_pull_output(&mut _pins.port);
+ let mut rear_neopixel_pin = _pins.neopixel.into_push_pull_output(&mut _pins.port);
+ front_neopixel_pin.set_low().unwrap();
+ rear_neopixel_pin.set_high().unwrap();
+
// use ChannelMode::NoBlockS
rtt_init_print!(NoBlockSkip, 4096);
lcd.set_orientation(Orientation::Landscape).unwrap();
- let mut _buffy = [0u16; 24 * 32];
let mut buffy2 = [[0u16; 320]; 240];
let mut fbuffy = buffer::FrameBuffer::new(&mut buffy2);
- // // rrrrr gggggg bbbbb
- // buffy.iter_mut().for_each(|px| *px = 0b11111_000000_00000);
-
let mut style = TextStyleBuilder::new(Font8x16)
.text_color(Rgb565::WHITE)
.background_color(Rgb565::BLACK)