summaryrefslogtreecommitdiff
path: root/sdr-test-project
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2011-12-28 02:35:13 +0100
committerHarald Welte <laforge@gnumonks.org>2011-12-28 02:35:13 +0100
commit7ea4c0412bc6305bc59f95526a0fa6259874c658 (patch)
treecabb087ec004d6822263148ae6a466d2b0f893d6 /sdr-test-project
parent17cdcbeac68315cfb03f40ca8028aacff572e81b (diff)
main: initialize i2c drivers with reference to twid object, not BASE
Diffstat (limited to 'sdr-test-project')
-rw-r--r--sdr-test-project/main.c5
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':
personal git repositories of Harald Welte. Your mileage may vary