Skip to content

Commit

Permalink
crazyflie: Use BOARD_NUMBER_I2C_BUSES and BOARD_I2C_BUS_CLOCK_INIT
Browse files Browse the repository at this point in the history
  • Loading branch information
David Sidrane authored and LorenzMeier committed Aug 8, 2017
1 parent 8c1f506 commit 1af5ed9
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 76 deletions.
1 change: 0 additions & 1 deletion src/drivers/boards/crazyflie/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ px4_add_module(
crazyflie_usb.c
crazyflie_led.c
crazyflie_timer_config.c
crazyflie_i2c.cpp
DEPENDS
platforms__common
)
Expand Down
4 changes: 4 additions & 0 deletions src/drivers/boards/crazyflie/board_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@

#define PX4_I2C_BUS_MTD PX4_I2C_BUS_EXPANSION

#define BOARD_NUMBER_I2C_BUSES 3
#define BOARD_I2C_BUS_CLOCK_INIT {PX4_I2C_BUS_ONBOARD_HZ, 100000, PX4_I2C_BUS_EXPANSION_HZ}




/* Devices on the onboard bus.
Expand Down
64 changes: 0 additions & 64 deletions src/drivers/boards/crazyflie/crazyflie_i2c.cpp

This file was deleted.

11 changes: 0 additions & 11 deletions src/drivers/boards/crazyflie/crazyflie_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,6 @@ stm32_boardinitialize(void)

__EXPORT int board_app_initialize(uintptr_t arg)
{
int result;

#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE)

/* run C++ ctors before we go any further */
Expand Down Expand Up @@ -329,14 +327,5 @@ __EXPORT int board_app_initialize(uintptr_t arg)
led_off(LED_TX);
led_off(LED_RX);



result = board_i2c_initialize();

if (result != OK) {
led_on(LED_RED);
return -ENODEV;
}

return OK;
}

0 comments on commit 1af5ed9

Please sign in to comment.