OSDN Git Service

[ADC] Uncomment forgotten comment-outs.
authorK.Ohta <whatisthis.sowhat@gmail.com>
Fri, 5 Jul 2013 16:59:19 +0000 (01:59 +0900)
committerK.Ohta <whatisthis.sowhat@gmail.com>
Fri, 5 Jul 2013 16:59:19 +0000 (01:59 +0900)
i2c_io.c
i2c_io.h
radio_getstat.c

index 3adbfa5..b79909e 100644 (file)
--- a/i2c_io.c
+++ b/i2c_io.c
 
 #include <stdarg.h>
 #include <stdio.h>
+#include <pic18fregs.h>
 
 #include "i2c_io.h"
 
+
+
 #ifdef _I2C_IO_TWO_MSSPS
 void i2c1_init(void)
 {
index f97a666..75047a0 100644 (file)
--- a/i2c_io.h
+++ b/i2c_io.h
@@ -43,7 +43,7 @@ extern "C" {
 /*
  * #1
  */
-#define I2C_CLOCK_PARAM 19 // 8MHz/(4*(1+I2C_CLOCK_PARAM)) -> 100KHz
+#define I2C_CLOCK_PARAM 4 // 8MHz/(4*(1+I2C_CLOCK_PARAM)) -> 400KHz
 //#define I2C_CLOCK_PARAM 15 // 8MHz/(4*(1+I2C_CLOCK_PARAM)) -> 100KHz
 #define I2C_DEFAULT_MODE I2C_MASTER
 #define I2C_SLEW_DEFAULT I2C_SLEW_OFF
@@ -53,6 +53,7 @@ extern "C" {
 extern void i2c1_init(void);
 extern void i2c2_init(void);
 
+
 #ifdef __cplusplus
 }
 #endif
index fd43407..045e304 100644 (file)
@@ -84,9 +84,9 @@ void update_status(void)
         cnrlevel = akc6955_get_cnr();
         batlevel_6955 = akc6955_get_battery();
 #ifdef __SDCC
-  //  startadc(7);
+    startadc(7);
 #else
-  //  startadc(ADC_CH7 | ADC_INT_OFF ,ADC_7ANA);
+    startadc(ADC_CH7 | ADC_INT_OFF ,ADC_7ANA);
 #endif
     idle_time_ms(1);
    polladc2(adc);