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
use std::process::Command; | |
use std::path::Path; | |
fn main() { | |
println!("Scanning file system..."); | |
let output = Command::new("locate").arg("Cargo.toml").output().expect("Failed to create process").stdout; | |
for line in output.split(|b| *b == 0x0a) { | |
if let Ok(s) = std::str::from_utf8(line) { | |
if s.is_empty() { | |
continue; |
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_main] | |
#![no_std] | |
extern crate panic_semihosting; | |
extern crate stm32f7xx_hal; | |
use cortex_m_rt::entry; | |
use stm32f7xx_hal::prelude::*; | |
use stm32f7xx_hal::pac; | |
use stm32f7xx_hal::rcc::{Rcc, HSEClock, HSEClockMode}; |
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
#!/usr/bin/env python3 | |
import sys | |
from migen import * | |
from migen.build.generic_platform import Pins, IOStandard | |
from migen.build.lattice import LatticePlatform | |
class Platform(LatticePlatform): | |
default_clk_name = "clk25" |
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
# This file is Copyright (c) 2020 Florent Kermarrec <florent@enjoy-digital.fr> | |
# License: BSD | |
# The Colorlight 5A-75B PCB and IOs have been documented by @miek and @smunaut: | |
# https://github.com/q3k/chubby75/tree/master/5a-75b | |
from litex.build.generic_platform import * | |
from litex.build.lattice import LatticePlatform | |
from litex.build.lattice.programmer import OpenOCDJTAGProgrammer |
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
#!/usr/bin/env python3 | |
import os | |
import subprocess | |
import re | |
def main(): | |
pubring = os.path.join(os.getenv("HOME", "~"), ".gnupg", "pubring.gpg") | |
output = subprocess.check_output(["gpg", "--list-packets", pubring]) |