paparazzi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[paparazzi-commits] [5421] updated for the new I2C_ERROR message


From: antoine drouin
Subject: [paparazzi-commits] [5421] updated for the new I2C_ERROR message
Date: Tue, 17 Aug 2010 18:24:16 +0000

Revision: 5421
          http://svn.sv.gnu.org/viewvc/?view=rev&root=paparazzi&revision=5421
Author:   poine
Date:     2010-08-17 18:24:15 +0000 (Tue, 17 Aug 2010)
Log Message:
-----------
updated for the new I2C_ERROR message

Modified Paths:
--------------
    paparazzi3/trunk/sw/airborne/lisa/test_baro.c

Modified: paparazzi3/trunk/sw/airborne/lisa/test_baro.c
===================================================================
--- paparazzi3/trunk/sw/airborne/lisa/test_baro.c       2010-08-17 14:05:21 UTC 
(rev 5420)
+++ paparazzi3/trunk/sw/airborne/lisa/test_baro.c       2010-08-17 18:24:15 UTC 
(rev 5421)
@@ -32,9 +32,9 @@
 
 
 // absolute
-//#define BARO_ADDR 0x90   
+#define BARO_ADDR 0x90   
 // differential
-#define BARO_ADDR 0x92
+//#define BARO_ADDR 0x92
 
 #include <stm32/flash.h>
 #include <stm32/misc.h>
@@ -131,7 +131,6 @@
 static inline void main_i2c_init( void ) {
 
 
-  I2C_DeInit(I2C2);
   //  RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOC, ENABLE);
   /* enable pullup on PC0 */
  GPIO_InitTypeDef GPIO_InitStructure;
@@ -154,7 +153,7 @@
   GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_OD;
   GPIO_Init(GPIOB, &GPIO_InitStructure);
 
-
+  I2C_DeInit(I2C2);
   /* I2C configuration 
----------------------------------------------------------*/
   I2C_InitTypeDef  I2C_InitStructure; 
   I2C_InitStructure.I2C_Mode = I2C_Mode_I2C;
@@ -163,7 +162,7 @@
   I2C_InitStructure.I2C_Ack = I2C_Ack_Enable;
   //  I2C_InitStructure.I2C_Ack = I2C_Ack_Disable;
   I2C_InitStructure.I2C_AcknowledgedAddress = I2C_AcknowledgedAddress_7bit;
-  I2C_InitStructure.I2C_ClockSpeed = 200000;
+  I2C_InitStructure.I2C_ClockSpeed = 400000;
   
   /* I2C Peripheral Enable */
   I2C_Cmd(I2C2, ENABLE);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]