1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-01 09:24:10 +01:00

CC-6 PIOS/ADXL345: Helper functions for the ADXL345 chip. Need to add

semaphores for sharing the bus between the flash chip and this though.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2473 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
peabody124 2011-01-17 08:45:37 +00:00 committed by peabody124
parent 211585c7d7
commit 18deba48c1
6 changed files with 15 additions and 4 deletions

View File

@ -215,6 +215,7 @@ SRC += $(PIOSSTM32F10X)/pios_usb_hid_prop.c
SRC += $(PIOSSTM32F10X)/pios_usb_hid_pwr.c
## PIOS Hardware (Common)
SRC += $(PIOSCOMMON)/pios_adxl345.c
SRC += $(PIOSCOMMON)/pios_sdcard.c
SRC += $(PIOSCOMMON)/pios_com.c
SRC += $(PIOSCOMMON)/pios_i2c_esc.c

View File

@ -57,6 +57,8 @@
//#define PIOS_INCLUDE_WDG
#define PIOS_INCLUDE_I2C_ESC
#define PIOS_INCLUDE_ADXL345
/* Defaults for Logging */
#define LOG_FILENAME "PIOS.LOG"
#define STARTUP_LOG_ENABLED 1

View File

@ -102,9 +102,9 @@ const struct pios_spi_cfg pios_spi_flash_accel_cfg = {
.SPI_CRCPolynomial = 7,
.SPI_CPOL = SPI_CPOL_High,
.SPI_CPHA = SPI_CPHA_2Edge,
.SPI_BaudRatePrescaler = SPI_BaudRatePrescaler_32,
.SPI_BaudRatePrescaler = SPI_BaudRatePrescaler_256,
},
.use_crc = TRUE,
.use_crc = FALSE,
.dma = {
.ahb_clk = RCC_AHBPeriph_DMA1,

View File

@ -97,6 +97,10 @@
#endif
#include <pios_iap.h>
#if defined(PIOS_INCLUDE_ADXL345)
#include <pios_adxl345.h>
#endif
#if defined(PIOS_INCLUDE_BL_HELPER)
#include <pios_bl_helper.h>
#endif

View File

@ -166,6 +166,8 @@
65209A1912208B0600453371 /* gpsposition.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = gpsposition.xml; sourceTree = "<group>"; };
6526645A122DF972006F9A3C /* pios_i2c_priv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pios_i2c_priv.h; sourceTree = "<group>"; };
6526645B122DF972006F9A3C /* pios_wdg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pios_wdg.h; sourceTree = "<group>"; };
6528CCB412E406B800CF5144 /* pios_adxl345.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pios_adxl345.c; sourceTree = "<group>"; };
6528CCE212E40F6700CF5144 /* pios_adxl345.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pios_adxl345.h; sourceTree = "<group>"; };
65322D3B122841F60046CD7C /* gpstime.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = gpstime.xml; sourceTree = "<group>"; };
65345C871288668B00A5E4E8 /* guidancesettings.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = guidancesettings.xml; sourceTree = "<group>"; };
65408AA812BB1648004DACC5 /* i2cstats.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = i2cstats.xml; sourceTree = "<group>"; };
@ -7471,6 +7473,7 @@
65E8F03511EFF25C00BBF654 /* pios_opahrs_proto.c */,
65E8F03611EFF25C00BBF654 /* pios_sdcard.c */,
65E8F03711EFF25C00BBF654 /* printf-stdarg.c */,
6528CCB412E406B800CF5144 /* pios_adxl345.c */,
);
name = Common;
path = ../../PiOS/Common;
@ -7480,6 +7483,7 @@
isa = PBXGroup;
children = (
6526645A122DF972006F9A3C /* pios_i2c_priv.h */,
6528CCE212E40F6700CF5144 /* pios_adxl345.h */,
6526645B122DF972006F9A3C /* pios_wdg.h */,
651CF9EF120B700D00EEFD70 /* pios_usb_hid_desc.h */,
651CF9F0120B700D00EEFD70 /* pios_usb_hid_istr.h */,

View File

@ -2,10 +2,10 @@
<object name="AttitudeRaw" singleinstance="true" settings="false">
<description>The raw attitude sensor data from @ref AHRSCommsModule. Not always updated.</description>
<field name="magnetometers" units="mGa" type="int16" elementnames="X,Y,Z"/>
<field name="gyros" units="raw" type="uint16" elementnames="X,Y,Z"/>
<field name="gyros" units="raw" type="int16" elementnames="X,Y,Z"/>
<field name="gyros_filtered" units="deg/s" type="float" elementnames="X,Y,Z"/>
<field name="gyrotemp" units="raw" type="uint16" elementnames="XY,Z"/>
<field name="accels" units="raw" type="uint16" elementnames="X,Y,Z"/>
<field name="accels" units="raw" type="int16" elementnames="X,Y,Z"/>
<field name="accels_filtered" units="m/s" type="float" elementnames="X,Y,Z"/>
<access gcs="readwrite" flight="readwrite"/>
<telemetrygcs acked="false" updatemode="manual" period="0"/>