Browse Source

Re-organize files by topic

Keil project not updated, I have no way to verify it.

Note, mw.c, drv_pwm.c and drv_system.c contain code for too many topics.
Later commits will relocate the code as appropriate.

Not even looked at utils yet.  'Utils' is a bad naming practice and is a
synonym for 'too lazy to find the right file/name'.
master
Dominic Clifton 11 years ago
parent
commit
9fa99cf9f5
  1. 77
      Makefile
  2. 3748
      obj/baseflight.hex
  3. 2540
      obj/baseflight_fy90q.hex
  4. 64
      src/board.h
  5. 0
      src/drivers/accgyro/drv_adxl345.c
  6. 0
      src/drivers/accgyro/drv_adxl345.h
  7. 0
      src/drivers/accgyro/drv_bma280.c
  8. 0
      src/drivers/accgyro/drv_bma280.h
  9. 0
      src/drivers/accgyro/drv_l3g4200d.c
  10. 0
      src/drivers/accgyro/drv_l3g4200d.h
  11. 0
      src/drivers/accgyro/drv_mma845x.c
  12. 0
      src/drivers/accgyro/drv_mma845x.h
  13. 0
      src/drivers/accgyro/drv_mpu3050.c
  14. 0
      src/drivers/accgyro/drv_mpu3050.h
  15. 0
      src/drivers/accgyro/drv_mpu6050.c
  16. 0
      src/drivers/accgyro/drv_mpu6050.h
  17. 0
      src/drivers/adc/drv_adc.c
  18. 0
      src/drivers/adc/drv_adc.h
  19. 0
      src/drivers/adc/drv_adc_fy90q.c
  20. 0
      src/drivers/altimeter/drv_bmp085.c
  21. 0
      src/drivers/altimeter/drv_bmp085.h
  22. 0
      src/drivers/altimeter/drv_ms5611.c
  23. 0
      src/drivers/altimeter/drv_ms5611.h
  24. 0
      src/drivers/bus/drv_i2c.c
  25. 0
      src/drivers/bus/drv_i2c.h
  26. 0
      src/drivers/bus/drv_i2c_soft.c
  27. 0
      src/drivers/bus/drv_spi.c
  28. 0
      src/drivers/bus/drv_spi.h
  29. 0
      src/drivers/compass/drv_hmc5883l.c
  30. 0
      src/drivers/compass/drv_hmc5883l.h
  31. 0
      src/drivers/gpio/drv_gpio.c
  32. 0
      src/drivers/gpio/drv_gpio.h
  33. 0
      src/drivers/light/drv_ledring.c
  34. 0
      src/drivers/light/drv_ledring.h
  35. 0
      src/drivers/serial/drv_serial.c
  36. 0
      src/drivers/serial/drv_serial.h
  37. 0
      src/drivers/serial/drv_softserial.c
  38. 0
      src/drivers/serial/drv_softserial.h
  39. 0
      src/drivers/serial/drv_uart.c
  40. 0
      src/drivers/serial/drv_uart.h
  41. 0
      src/drivers/sonar/drv_hcsr04.c
  42. 0
      src/drivers/sonar/drv_hcsr04.h
  43. 0
      src/drivers/timer/drv_timer.c
  44. 0
      src/drivers/timer/drv_timer.h
  45. 0
      src/flight/imu.c
  46. 0
      src/flight/mixer.c
  47. 0
      src/gps/gps.c
  48. 2
      src/main.c
  49. 4
      src/mw.c
  50. 0
      src/rx/sbus.c
  51. 0
      src/rx/spektrum.c
  52. 0
      src/rx/sumd.c
  53. 0
      src/telemetry/telemetry_common.c
  54. 0
      src/telemetry/telemetry_common.h
  55. 0
      src/telemetry/telemetry_frsky.c
  56. 0
      src/telemetry/telemetry_frsky.h
  57. 0
      src/telemetry/telemetry_hott.c
  58. 0
      src/telemetry/telemetry_hott.h
  59. 0
      src/ui/cli.c
  60. 0
      src/ui/cli.h
  61. 4
      src/ui/serial.c

77
Makefile

@ -43,49 +43,49 @@ BIN_DIR = $(ROOT)/obj
# Source files common to all targets
COMMON_SRC = startup_stm32f10x_md_gcc.S \
buzzer.c \
cli.c \
ui/cli.c \
config.c \
gps.c \
imu.c \
gps/gps.c \
flight/imu.c \
main.c \
mixer.c \
flight/mixer.c \
mw.c \
sensors.c \
serial.c \
sbus.c \
sumd.c \
spektrum.c \
telemetry_common.c \
telemetry_frsky.c \
telemetry_hott.c \
drv_gpio.c \
drv_i2c.c \
drv_i2c_soft.c \
ui/serial.c \
rx/sbus.c \
rx/sumd.c \
rx/spektrum.c \
telemetry/telemetry_common.c \
telemetry/telemetry_frsky.c \
telemetry/telemetry_hott.c \
drivers/gpio/drv_gpio.c \
drivers/bus/drv_i2c.c \
drivers/bus/drv_i2c_soft.c \
drv_system.c \
drv_serial.c \
drv_softserial.c \
drv_uart.c \
drivers/serial/drv_serial.c \
drivers/serial/drv_softserial.c \
drivers/serial/drv_uart.c \
printf.c \
utils.c \
$(CMSIS_SRC) \
$(STDPERIPH_SRC)
# Source files for the NAZE target
NAZE_SRC = drv_adc.c \
drv_adxl345.c \
drv_bma280.c \
drv_bmp085.c \
drv_ms5611.c \
drv_hcsr04.c \
drv_hmc5883l.c \
drv_ledring.c \
drv_mma845x.c \
drv_mpu3050.c \
drv_mpu6050.c \
drv_l3g4200d.c \
NAZE_SRC = drivers/adc/drv_adc.c \
drivers/accgyro/drv_adxl345.c \
drivers/accgyro/drv_bma280.c \
drivers/altimeter/drv_bmp085.c \
drivers/altimeter/drv_ms5611.c \
drivers/sonar/drv_hcsr04.c \
drivers/compass/drv_hmc5883l.c \
drivers/light/drv_ledring.c \
drivers/accgyro/drv_mma845x.c \
drivers/accgyro/drv_mpu3050.c \
drivers/accgyro/drv_mpu6050.c \
drivers/accgyro/drv_l3g4200d.c \
drv_pwm.c \
drv_spi.c \
drv_timer.c \
drivers/bus/drv_spi.c \
drivers/timer/drv_timer.c \
$(COMMON_SRC)
# Source files for the FY90Q target
@ -94,14 +94,14 @@ FY90Q_SRC = drv_adc_fy90q.c \
$(COMMON_SRC)
# Source files for the OLIMEXINO target
OLIMEXINO_SRC = drv_spi.c \
drv_adc.c \
drv_adxl345.c \
drv_mpu3050.c \
drv_mpu6050.c \
drv_l3g4200d.c \
OLIMEXINO_SRC = drivers/bus/drv_spi.c \
drivers/adc/drv_adc.c \
drivers/accgyro/drv_adxl345.c \
drivers/accgyro/drv_mpu3050.c \
drivers/accgyro/drv_mpu6050.c \
drivers/accgyro/drv_l3g4200d.c \
drv_pwm.c \
drv_timer.c \
drivers/timer/drv_timer.c \
$(COMMON_SRC)
# In some cases, %.s regarded as intermediate file, which is actually not.
@ -212,6 +212,7 @@ $(OBJECT_DIR)/$(TARGET)/%.o): %.S
clean:
rm -f $(TARGET_HEX) $(TARGET_ELF) $(TARGET_OBJS) $(TARGET_MAP)
rm -rf $(OBJECT_DIR)/$(TARGET)
flash_$(TARGET): $(TARGET_HEX)
stty -F $(SERIAL_DEVICE) raw speed 115200 -crtscts cs8 -parenb -cstopb -ixon

3748
obj/baseflight.hex
File diff suppressed because it is too large
View File

2540
obj/baseflight_fy90q.hex
File diff suppressed because it is too large
View File

64
src/board.h

@ -21,7 +21,7 @@
#endif
#include "drv_system.h" // timers, delays, etc
#include "drv_gpio.h"
#include "drivers/gpio/drv_gpio.h"
#ifndef M_PI
#define M_PI 3.14159265358979323846f
@ -278,48 +278,48 @@ typedef struct baro_t
#ifdef FY90Q
// FY90Q
#include "drv_adc.h"
#include "drivers/adc/drv_adc.h"
#include "drv_i2c.h"
#include "drv_pwm.h"
#include "drv_uart.h"
#include "drivers/serial/drv_uart.h"
#else
#ifdef OLIMEXINO
// OLIMEXINO
#include "drv_adc.h"
#include "drv_i2c.h"
#include "drv_spi.h"
#include "drv_adxl345.h"
#include "drv_mpu3050.h"
#include "drv_mpu6050.h"
#include "drv_l3g4200d.h"
#include "drivers/adc/drv_adc.h"
#include "drivers/bus/drv_i2c.h"
#include "drivers/bus/drv_spi.h"
#include "drivers/accgyro/drv_adxl345.h"
#include "drivers/accgyro/drv_mpu3050.h"
#include "drivers/accgyro/drv_mpu6050.h"
#include "drivers/accgyro/drv_l3g4200d.h"
#include "drv_pwm.h"
#include "drv_timer.h"
#include "drv_serial.h"
#include "drv_uart.h"
#include "drv_softserial.h"
#include "drivers/timer/drv_timer.h"
#include "drivers/serial/drv_serial.h"
#include "drivers/serial/drv_uart.h"
#include "drivers/serial/drv_softserial.h"
#else
// AfroFlight32
#include "drv_adc.h"
#include "drv_adxl345.h"
#include "drv_bma280.h"
#include "drv_bmp085.h"
#include "drv_ms5611.h"
#include "drv_hmc5883l.h"
#include "drv_i2c.h"
#include "drv_spi.h"
#include "drv_ledring.h"
#include "drv_mma845x.h"
#include "drv_mpu3050.h"
#include "drv_mpu6050.h"
#include "drv_l3g4200d.h"
#include "drivers/adc/drv_adc.h"
#include "drivers/accgyro/drv_adxl345.h"
#include "drivers/accgyro/drv_bma280.h"
#include "drivers/altimeter/drv_bmp085.h"
#include "drivers/altimeter/drv_ms5611.h"
#include "drivers/compass/drv_hmc5883l.h"
#include "drivers/bus/drv_i2c.h"
#include "drivers/bus/drv_spi.h"
#include "drivers/light/drv_ledring.h"
#include "drivers/accgyro/drv_mma845x.h"
#include "drivers/accgyro/drv_mpu3050.h"
#include "drivers/accgyro/drv_mpu6050.h"
#include "drivers/accgyro/drv_l3g4200d.h"
#include "drv_pwm.h"
#include "drv_timer.h"
#include "drv_serial.h"
#include "drv_uart.h"
#include "drv_softserial.h"
#include "drv_hcsr04.h"
#include "drivers/timer/drv_timer.h"
#include "drivers/serial/drv_serial.h"
#include "drivers/serial/drv_uart.h"
#include "drivers/serial/drv_softserial.h"
#include "drivers/sonar/drv_hcsr04.h"
#endif
#endif

0
src/drv_adxl345.c → src/drivers/accgyro/drv_adxl345.c

0
src/drv_adxl345.h → src/drivers/accgyro/drv_adxl345.h

0
src/drv_bma280.c → src/drivers/accgyro/drv_bma280.c

0
src/drv_bma280.h → src/drivers/accgyro/drv_bma280.h

0
src/drv_l3g4200d.c → src/drivers/accgyro/drv_l3g4200d.c

0
src/drv_l3g4200d.h → src/drivers/accgyro/drv_l3g4200d.h

0
src/drv_mma845x.c → src/drivers/accgyro/drv_mma845x.c

0
src/drv_mma845x.h → src/drivers/accgyro/drv_mma845x.h

0
src/drv_mpu3050.c → src/drivers/accgyro/drv_mpu3050.c

0
src/drv_mpu3050.h → src/drivers/accgyro/drv_mpu3050.h

0
src/drv_mpu6050.c → src/drivers/accgyro/drv_mpu6050.c

0
src/drv_mpu6050.h → src/drivers/accgyro/drv_mpu6050.h

0
src/drv_adc.c → src/drivers/adc/drv_adc.c

0
src/drv_adc.h → src/drivers/adc/drv_adc.h

0
src/drv_adc_fy90q.c → src/drivers/adc/drv_adc_fy90q.c

0
src/drv_bmp085.c → src/drivers/altimeter/drv_bmp085.c

0
src/drv_bmp085.h → src/drivers/altimeter/drv_bmp085.h

0
src/drv_ms5611.c → src/drivers/altimeter/drv_ms5611.c

0
src/drv_ms5611.h → src/drivers/altimeter/drv_ms5611.h

0
src/drv_i2c.c → src/drivers/bus/drv_i2c.c

0
src/drv_i2c.h → src/drivers/bus/drv_i2c.h

0
src/drv_i2c_soft.c → src/drivers/bus/drv_i2c_soft.c

0
src/drv_spi.c → src/drivers/bus/drv_spi.c

0
src/drv_spi.h → src/drivers/bus/drv_spi.h

0
src/drv_hmc5883l.c → src/drivers/compass/drv_hmc5883l.c

0
src/drv_hmc5883l.h → src/drivers/compass/drv_hmc5883l.h

0
src/drv_gpio.c → src/drivers/gpio/drv_gpio.c

0
src/drv_gpio.h → src/drivers/gpio/drv_gpio.h

0
src/drv_ledring.c → src/drivers/light/drv_ledring.c

0
src/drv_ledring.h → src/drivers/light/drv_ledring.h

0
src/drv_serial.c → src/drivers/serial/drv_serial.c

0
src/drv_serial.h → src/drivers/serial/drv_serial.h

0
src/drv_softserial.c → src/drivers/serial/drv_softserial.c

0
src/drv_softserial.h → src/drivers/serial/drv_softserial.h

0
src/drv_uart.c → src/drivers/serial/drv_uart.c

0
src/drv_uart.h → src/drivers/serial/drv_uart.h

0
src/drv_hcsr04.c → src/drivers/sonar/drv_hcsr04.c

0
src/drv_hcsr04.h → src/drivers/sonar/drv_hcsr04.h

0
src/drv_timer.c → src/drivers/timer/drv_timer.c

0
src/drv_timer.h → src/drivers/timer/drv_timer.h

0
src/imu.c → src/flight/imu.c

0
src/mixer.c → src/flight/mixer.c

0
src/gps.c → src/gps/gps.c

2
src/main.c

@ -1,7 +1,7 @@
#include "board.h"
#include "mw.h"
#include "telemetry_common.h"
#include "telemetry/telemetry_common.h"
core_t core;

4
src/mw.c

@ -1,8 +1,8 @@
#include "board.h"
#include "mw.h"
#include "cli.h"
#include "telemetry_common.h"
#include "ui/cli.h"
#include "telemetry/telemetry_common.h"
// June 2013 V2.2-dev

0
src/sbus.c → src/rx/sbus.c

0
src/spektrum.c → src/rx/spektrum.c

0
src/sumd.c → src/rx/sumd.c

0
src/telemetry_common.c → src/telemetry/telemetry_common.c

0
src/telemetry_common.h → src/telemetry/telemetry_common.h

0
src/telemetry_frsky.c → src/telemetry/telemetry_frsky.c

0
src/telemetry_frsky.h → src/telemetry/telemetry_frsky.h

0
src/telemetry_hott.c → src/telemetry/telemetry_hott.c

0
src/telemetry_hott.h → src/telemetry/telemetry_hott.h

0
src/cli.c → src/ui/cli.c

0
src/cli.h → src/ui/cli.h

4
src/serial.c → src/ui/serial.c

@ -1,8 +1,8 @@
#include "board.h"
#include "mw.h"
#include "cli.h"
#include "telemetry_common.h"
#include "ui/cli.h"
#include "telemetry/telemetry_common.h"
// Multiwii Serial Protocol 0
#define MSP_VERSION 0
Loading…
Cancel
Save