diff options
author | Harald Welte <laforge@gnumonks.org> | 2011-12-28 02:35:13 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2011-12-28 02:35:13 +0100 |
commit | 7ea4c0412bc6305bc59f95526a0fa6259874c658 (patch) | |
tree | cabb087ec004d6822263148ae6a466d2b0f893d6 | |
parent | 17cdcbeac68315cfb03f40ca8028aacff572e81b (diff) |
main: initialize i2c drivers with reference to twid object, not BASE
-rw-r--r-- | sdr-test-project/main.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sdr-test-project/main.c b/sdr-test-project/main.c index 8a1c234..441af94 100644 --- a/sdr-test-project/main.c +++ b/sdr-test-project/main.c @@ -83,6 +83,7 @@ static void DisplayMenu(void) "[2] e4k init\r\n"
"[f] si570 10MHz freq\r\n"
"[r] si570 regdump\r\n"
+ "\r\n"
);
}
@@ -146,10 +147,10 @@ int main(void) switch (key) {
case '1':
- si570_init(&si570, (void *)AT91C_BASE_TWI0, SI570_I2C_ADDR);
+ si570_init(&si570, &twid, SI570_I2C_ADDR);
break;
case '2':
- sam3u_e4k_init(&e4k, E4K_I2C_ADDR);
+ sam3u_e4k_init(&e4k, &twid, E4K_I2C_ADDR);
e4k_init(&e4k);
break;
case 'f':
|