<commit_before>extern crate mmap;

use std::ptr;
use std::fs::OpenOptions;
use mmap::{MemoryMap, MapOption};

#[path="pi.rs"]
mod Pi;

fn main() {
    let mut gpio = Pi::Bcm2835Peripheral { 
                    addr_p: &Pi::GPIO_BASE, 
                    mem_fd: OpenOptions::new().create(true).open("temp.txt").unwrap(), 
                    map: MemoryMap::new(1024, &[]).unwrap(), 
                    addr: ptr::null_mut()
    };
    gpio.map_peripheral();
    unsafe {
        gpio.in_gpio(4);
        gpio.out_gpio(4);

        loop {
          gpio.set_gpio(1u8 << 4);
          std::thread::sleep_ms(1000);

          gpio.clear_gpio(1u8 << 4);
          std::thread::sleep_ms(1000);
      }
  }
}<commit_msg>silence warnings for sleep_ms<commit_after>#![feature(core_intrinsics)]
#![allow(deprecated)]
extern crate mmap;

use std::ptr;
use std::fs::OpenOptions;
use mmap::MemoryMap;

#[path="pi.rs"]
mod pi;

fn main() {
    let mut gpio = pi::Bcm2835Peripheral { 
                    addr_p: &pi::GPIO_BASE, 
                    mem_fd: OpenOptions::new().create(true).open("temp.txt").unwrap(), 
                    map: MemoryMap::new(1024, &[]).unwrap(), 
                    addr: ptr::null_mut()
    };
    gpio.map_peripheral();
    unsafe {
        gpio.in_gpio(4);
        gpio.out_gpio(4);

        loop {
          gpio.set_gpio(1u32 << 4);
          std::thread::sleep_ms(1000);

          gpio.clear_gpio(1u32 << 4);
          std::thread::sleep_ms(1000);
        }
    }
}
{'fraction_non_alphanumeric': 0.16510695187165775, 'fraction_numerical': 0.03342245989304813, 'mean_word_length': 2.099378881987578, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7604865', 'n_tokens_mistral': 560, 'n_tokens_neox': 502, 'n_words': 82}