Compare commits

..

No commits in common. "f3831aba18acbbe7f4c414a1fd99e9b6810b57e7" and "9c0f560367b56f5d95d3ec06422dce9d8c4264ee" have entirely different histories.

2 changed files with 2 additions and 23 deletions

View File

@ -105,34 +105,13 @@ pub fn init() {
.pmc7().bits(3) .pmc7().bits(3)
}); });
// Enable timers // Timers
sysctl.rcgctimer.write(|w| w sysctl.rcgctimer.write(|w| w
.r2().set_bit() .r2().set_bit()
.r3().set_bit() .r3().set_bit()
.r4().set_bit() .r4().set_bit()
.r5().set_bit() .r5().set_bit()
); );
// Reset timers
sysctl.srtimer.write(|w| w
.r2().set_bit()
.r3().set_bit()
.r4().set_bit()
.r5().set_bit()
);
sysctl.srtimer.write(|w| w
.r2().clear_bit()
.r3().clear_bit()
.r4().clear_bit()
.r5().clear_bit()
);
fn timers_ready(sysctl: &tm4c129x::sysctl::RegisterBlock) -> bool {
let prtimer = sysctl.prtimer.read();
prtimer.r2().bit() &&
prtimer.r3().bit() &&
prtimer.r4().bit() &&
prtimer.r5().bit()
}
while !timers_ready(sysctl) {}
// Manual: 13.4.5 PWM Mode // Manual: 13.4.5 PWM Mode
macro_rules! setup_timer_pwm { macro_rules! setup_timer_pwm {

View File

@ -115,7 +115,7 @@ fn main() -> ! {
println!("programmed MAC address is invalid, using default"); println!("programmed MAC address is invalid, using default");
hardware_addr = EthernetAddress([0x10, 0xE2, 0xD5, 0x00, 0x03, 0x00]); hardware_addr = EthernetAddress([0x10, 0xE2, 0xD5, 0x00, 0x03, 0x00]);
} }
let mut ip_addrs = [IpCidr::new(IpAddress::v4(192, 168, 1, 26), 24)]; let mut ip_addrs = [IpCidr::new(IpAddress::v4(192, 168, 69, 1), 24)];
println!("MAC {} IP {}", hardware_addr, ip_addrs[0]); println!("MAC {} IP {}", hardware_addr, ip_addrs[0]);
let mut neighbor_cache_storage = [None; 8]; let mut neighbor_cache_storage = [None; 8];
let neighbor_cache = NeighborCache::new(&mut neighbor_cache_storage[..]); let neighbor_cache = NeighborCache::new(&mut neighbor_cache_storage[..]);