aboutsummaryrefslogtreecommitdiff
path: root/src/modules/px4iofirmware/i2c.c
diff options
context:
space:
mode:
authorpx4dev <px4@purgatory.org>2013-04-28 18:14:46 -0700
committerpx4dev <px4@purgatory.org>2013-04-28 18:14:46 -0700
commite67022f874f0fa091ed7dffd617c70c0c0253b5c (patch)
tree4308fd72c7dc6f782d464ac5886b226c371fd74d /src/modules/px4iofirmware/i2c.c
parent8f7200e0114d6bd9fcac7ec088b125e54761c2e0 (diff)
downloadpx4-firmware-e67022f874f0fa091ed7dffd617c70c0c0253b5c.tar.gz
px4-firmware-e67022f874f0fa091ed7dffd617c70c0c0253b5c.tar.bz2
px4-firmware-e67022f874f0fa091ed7dffd617c70c0c0253b5c.zip
Serial interface for IOv2
Diffstat (limited to 'src/modules/px4iofirmware/i2c.c')
-rw-r--r--src/modules/px4iofirmware/i2c.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/modules/px4iofirmware/i2c.c b/src/modules/px4iofirmware/i2c.c
index 4485daa5b..10aeb5c9f 100644
--- a/src/modules/px4iofirmware/i2c.c
+++ b/src/modules/px4iofirmware/i2c.c
@@ -1,6 +1,6 @@
/****************************************************************************
*
- * Copyright (C) 2012 PX4 Development Team. All rights reserved.
+ * Copyright (C) 2012,2013 PX4 Development Team. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -69,6 +69,7 @@ static void i2c_rx_setup(void);
static void i2c_tx_setup(void);
static void i2c_rx_complete(void);
static void i2c_tx_complete(void);
+static void i2c_dump(void);
static DMA_HANDLE rx_dma;
static DMA_HANDLE tx_dma;
@@ -92,7 +93,7 @@ enum {
} direction;
void
-i2c_init(void)
+interface_init(void)
{
debug("i2c init");
@@ -148,12 +149,18 @@ i2c_init(void)
#endif
}
+void
+interface_tick()
+{
+}
+
/*
reset the I2C bus
used to recover from lockups
*/
-void i2c_reset(void)
+void
+i2c_reset(void)
{
rCR1 |= I2C_CR1_SWRST;
rCR1 = 0;
@@ -330,7 +337,7 @@ i2c_tx_complete(void)
i2c_tx_setup();
}
-void
+static void
i2c_dump(void)
{
debug("CR1 0x%08x CR2 0x%08x", rCR1, rCR2);