Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #![no_std]
- #![no_main]
- extern crate panic_halt;
- use riscv_rt::entry;
- #[entry]
- fn main() -> ! {
- let gpioa_ctl0 = 0x4001_0800_usize as *mut u32;
- let gpioa_bop = 0x4001_0810_usize as *mut u32;
- let gpioa_bc = 0x4001_0814_usize as *mut u32;
- let rcu_apb2en = 0x4002_1018_usize as *mut u32;
- unsafe {
- *rcu_apb2en = 0x00000004_u32;
- *gpioa_ctl0 = 0x34444334_u32;
- *gpioa_bop = 0b00000000_00000000_00000000_10000010_u32;
- *gpioa_bc = 0b00000000_00000000_00000000_00000100_u32;
- }
- loop {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement