X-Git-Url: http://git.droids-corp.org/?p=protos%2Fimu.git;a=blobdiff_plain;f=main.c;h=85020449d3098a7ccd4a19afdff6f48e289bb111;hp=91ee7b709392ed9a66a08302c2274a1253b15373;hb=da1d0e96fa1b3f2ec6598351b10ba7348b3f8c1d;hpb=84796cd7a01e949167a155ec21f55fd71e788015 diff --git a/main.c b/main.c index 91ee7b7..8502044 100644 --- a/main.c +++ b/main.c @@ -51,8 +51,13 @@ #include #include #include +#include #include "eeprom_config.h" +#include "gps_venus.h" +#include "sd_log.h" +#include "../fpv-common/i2c_commands.h" +#include "i2c_protocol.h" #include "main.h" struct imuboard imuboard; @@ -162,16 +167,26 @@ int main(void) /* communication with mpu6050 */ i2cm_init(); + /* i2c hw with mainboard */ + i2c_init(I2C_MODE_SLAVE, I2C_IMUBOARD_ADDR); + i2c_protocol_init(); + i2c_register_recv_event(i2c_recvevent); + i2c_register_send_event(i2c_sendevent); + sei(); eeprom_load_config(); + open_log_file(); + printf_P(PSTR("\r\n")); rdline_newline(&imuboard.rdl, imuboard.prompt); //sd_main(); - - imu_loop(); + //imu_init(); + //imu_loop(); + gps_venus_init(); + gps_loop(); while (1) { cmdline_poll();