diff options
author | Nick Foster <nick@nerdnetworks.org> | 2010-08-10 14:16:48 -0700 |
---|---|---|
committer | Nick Foster <nick@nerdnetworks.org> | 2010-08-10 14:16:48 -0700 |
commit | 5514d168ab7fb6fb8d11238f4a381029b043c124 (patch) | |
tree | ecfd35b33d318bc2e5757346a88bb9af64d757de /firmware/microblaze/lib/u2_init.c | |
parent | 9e419c7b7f35062ceb2ed4e508cadb163067593f (diff) | |
download | uhd-5514d168ab7fb6fb8d11238f4a381029b043c124.tar.gz uhd-5514d168ab7fb6fb8d11238f4a381029b043c124.tar.bz2 uhd-5514d168ab7fb6fb8d11238f4a381029b043c124.zip |
Interrupt-driven I2C. txrx_uhd uses async i2c for comms.
Diffstat (limited to 'firmware/microblaze/lib/u2_init.c')
-rw-r--r-- | firmware/microblaze/lib/u2_init.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/firmware/microblaze/lib/u2_init.c b/firmware/microblaze/lib/u2_init.c index 75bc40859..8d666b76b 100644 --- a/firmware/microblaze/lib/u2_init.c +++ b/firmware/microblaze/lib/u2_init.c @@ -45,22 +45,26 @@ get_hw_rev(void) bool u2_init(void) { + hal_disable_ints(); hal_io_init(); // init spi, so that we can switch over to the high-speed clock spi_init(); - // init i2c so we can read our rev - i2c_init(); - get_hw_rev(); - // set up the default clocks clocks_init(); + hal_uart_init(); + + // init i2c so we can read our rev pic_init(); // progammable interrupt controller + i2c_init(); + hal_enable_ints(); + get_hw_rev(); + bp_init(); // buffer pool - hal_enable_ints(); + // flash all leds to let us know board is alive hal_set_leds(0x0, 0x1f); |