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
fn main() { | |
let s = String::from("hello"); | |
takes_ownership(s); | |
let x = 5; | |
makes_copy(x); | |
} |
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 rand::Rng; | |
use std::cmp::Ordering; | |
use std::io; | |
fn main() { | |
println!("Guess the number!"); | |
let secret_number = rand::thread_rng().gen_range(1..=100); | |
println!("The secret number is: {secret_number}"); |
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
fn main() { | |
println!("Hello,world"); | |
} |
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
fn main() { | |
println!("Hello, world!"); | |
} |
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
class CPU { | |
public: | |
void Work(); | |
private: | |
}; | |
class Intel : public CPU{ | |
public : |
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
class CPU { | |
public: | |
void Work(); | |
private: | |
}; | |
class Intel : public CPU{ | |
public : |
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
@startuml | |
participant "head.S" | |
participant "init/main.c" | |
participant "init/main.c (New kernel thread)" | |
head.S -> "init/main.c": start_kernel() | |
activate "init/main.c" | |
"init/main.c" -> "init/main.c": arch_call_rest_init() | |
activate "init/main.c" | |
"init/main.c" -> "init/main.c": rest_init(); |
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
/* | |
* Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/ | |
* | |
* This program is free software; you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License version 2 as | |
* published by the Free Software Foundation. | |
*/ | |
/dts-v1/; | |
#include "am33xx.dtsi" |
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
sudo tar xfvp ./*-*-*-armhf-*/armhf-rootfs-*.tar -C /home/hcyang/work/boot/rootfs/ | |
sync | |
sudo chown root:root /home/hcyang/work/boot/rootfs/ | |
sudo chmod 755 /home/hcyang/work/boot/rootfs/ | |
sync | |
sudo mkdir -p /home/hcyang/work/boot/rootfs/boot/ | |
sudo mkdir -p /home/hcyang/work/boot/rootfs/boot/dtbs/${kernel_version}/ | |
sudo mkdir -p rootfs/boot/dtbs/${kernel_version}/ | |
sudo sh -c "echo 'uname_r=${kernel_version}' >> /home/hcyang/work/boot/rootfs/boot/uEnv.txt" |
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
/* Device Tree */ | |
&dcan1{ | |
#address-cells = <1>; | |
#size-cells = <0>; | |
status = "okay"; | |
pinctrl-names = "default"; | |
pinctrl-0 = <&dcan1_pins_s0>; | |
}; |
NewerOlder