Updated testes/STM32/STM32F4xx demos for STM32F4 Discovery to be compliant with new project organization/makefile mechanisms
Batch review of *_USE_ADVANCED macros git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@12618 110e8d01-0319-4d1e-a829-52ad28d1bb01
This commit is contained in:
parent
843d871e69
commit
33fef46dac
|
@ -502,14 +502,14 @@ void l3gd20Start(L3GD20Driver *devp, const L3GD20Config *config) {
|
|||
cr[0] = L3GD20_CTRL_REG1_XEN | L3GD20_CTRL_REG1_YEN |
|
||||
L3GD20_CTRL_REG1_ZEN | L3GD20_CTRL_REG1_PD |
|
||||
devp->config->gyrooutputdatarate;
|
||||
#if L3GD20_GYRO_USE_ADVANCED || defined(__DOXYGEN__)
|
||||
#if L3GD20_USE_ADVANCED || defined(__DOXYGEN__)
|
||||
cr[0] |= devp->config->gyrobandwidth;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Control register 2 configuration block.*/
|
||||
{
|
||||
#if L3GD20_GYRO_USE_ADVANCED || defined(__DOXYGEN__)
|
||||
#if L3GD20_USE_ADVANCED || defined(__DOXYGEN__)
|
||||
if(devp->config->gyrohpmode != L3GD20_HPM_BYPASSED)
|
||||
cr[1] = devp->config->gyrohpmode | devp->config->gyrohpconfiguration;
|
||||
#endif
|
||||
|
@ -518,7 +518,7 @@ void l3gd20Start(L3GD20Driver *devp, const L3GD20Config *config) {
|
|||
/* Control register 4 configuration block.*/
|
||||
{
|
||||
cr[3] = devp->config->gyrofullscale;
|
||||
#if L3GD20_GYRO_USE_ADVANCED || defined(__DOXYGEN__)
|
||||
#if L3GD20_USE_ADVANCED || defined(__DOXYGEN__)
|
||||
cr[3] |= devp->config->gyroblockdataupdate |
|
||||
devp->config->gyroendianness;
|
||||
#endif
|
||||
|
@ -526,7 +526,7 @@ void l3gd20Start(L3GD20Driver *devp, const L3GD20Config *config) {
|
|||
|
||||
/* Control register 5 configuration block.*/
|
||||
{
|
||||
#if L3GD20_GYRO_USE_ADVANCED || defined(__DOXYGEN__)
|
||||
#if L3GD20_USE_ADVANCED || defined(__DOXYGEN__)
|
||||
if((devp->config->gyrohpmode != L3GD20_HPM_BYPASSED)) {
|
||||
cr[4] = L3GD20_CTRL_REG5_HPEN;
|
||||
if(devp->config->gyrolp2mode != L3GD20_LP2M_BYPASSED) {
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
/**
|
||||
* @brief L3GD20 driver version string.
|
||||
*/
|
||||
#define EX_L3GD20_VERSION "1.1.1"
|
||||
#define EX_L3GD20_VERSION "1.1.2"
|
||||
|
||||
/**
|
||||
* @brief L3GD20 driver version major number.
|
||||
|
@ -57,7 +57,7 @@
|
|||
/**
|
||||
* @brief L3GD20 driver version patch number.
|
||||
*/
|
||||
#define EX_L3GD20_PATCH 1
|
||||
#define EX_L3GD20_PATCH 2
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
|
@ -271,13 +271,12 @@
|
|||
#endif
|
||||
|
||||
/**
|
||||
* @brief L3GD20 accelerometer subsystem advanced configurations
|
||||
* switch.
|
||||
* @brief L3GD20 advanced configurations switch.
|
||||
* @details If set to @p TRUE more configurations are available.
|
||||
* @note The default is @p FALSE.
|
||||
*/
|
||||
#if !defined(L3GD20_GYRO_USE_ADVANCED) || defined(__DOXYGEN__)
|
||||
#define L3GD20_GYRO_USE_ADVANCED FALSE
|
||||
#if !defined(L3GD20_USE_ADVANCED) || defined(__DOXYGEN__)
|
||||
#define L3GD20_USE_ADVANCED FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
@ -472,7 +471,7 @@ typedef struct {
|
|||
* @brief L3GD20 gyroscope system output data rate selection.
|
||||
*/
|
||||
l3gd20_odr_t gyrooutputdatarate;
|
||||
#if L3GD20_GYRO_USE_ADVANCED || defined(__DOXYGEN__)
|
||||
#if L3GD20_USE_ADVANCED || defined(__DOXYGEN__)
|
||||
/**
|
||||
* @brief L3GD20 gyroscope system block data update.
|
||||
*/
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
/**
|
||||
* @brief LIS302DL driver version string.
|
||||
*/
|
||||
#define EX_LIS302DL_VERSION "1.1.0"
|
||||
#define EX_LIS302DL_VERSION "1.1.1"
|
||||
|
||||
/**
|
||||
* @brief LIS302DL driver version major number.
|
||||
|
@ -58,7 +58,7 @@
|
|||
/**
|
||||
* @brief LIS302DL driver version patch number.
|
||||
*/
|
||||
#define EX_LIS302DL_PATCH 0
|
||||
#define EX_LIS302DL_PATCH 1
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
|
@ -214,13 +214,12 @@
|
|||
#endif
|
||||
|
||||
/**
|
||||
* @brief LIS302DL accelerometer subsystem advanced configurations
|
||||
* switch.
|
||||
* @brief LIS302DL advanced configurations switch.
|
||||
* @details If set to @p TRUE more configurations are available.
|
||||
* @note The default is @p FALSE.
|
||||
*/
|
||||
#if !defined(LIS302DL_ACC_USE_ADVANCED) || defined(__DOXYGEN__)
|
||||
#define LIS302DL_ACC_USE_ADVANCED FALSE
|
||||
#if !defined(LIS302DL_USE_ADVANCED) || defined(__DOXYGEN__)
|
||||
#define LIS302DL_USE_ADVANCED FALSE
|
||||
#endif
|
||||
/** @} */
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
/**
|
||||
* @brief LIS3DSH driver version string.
|
||||
*/
|
||||
#define EX_LIS3DSH_VERSION "1.1.1"
|
||||
#define EX_LIS3DSH_VERSION "1.1.2"
|
||||
|
||||
/**
|
||||
* @brief LIS3DSH driver version major number.
|
||||
|
@ -58,7 +58,7 @@
|
|||
/**
|
||||
* @brief LIS3DSH driver version patch number.
|
||||
*/
|
||||
#define EX_LIS3DSH_PATCH 1
|
||||
#define EX_LIS3DSH_PATCH 2
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
|
@ -333,13 +333,12 @@
|
|||
#endif
|
||||
|
||||
/**
|
||||
* @brief LIS3DSH accelerometer subsystem advanced configurations
|
||||
* switch.
|
||||
* @brief LIS3DSH advanced configurations switch.
|
||||
* @details If set to @p TRUE more configurations are available.
|
||||
* @note The default is @p FALSE.
|
||||
*/
|
||||
#if !defined(LIS3DSH_ACC_USE_ADVANCED) || defined(__DOXYGEN__)
|
||||
#define LIS3DSH_ACC_USE_ADVANCED FALSE
|
||||
#if !defined(LIS3DSH_USE_ADVANCED) || defined(__DOXYGEN__)
|
||||
#define LIS3DSH_USE_ADVANCED FALSE
|
||||
#endif
|
||||
/** @} */
|
||||
|
||||
|
@ -482,7 +481,7 @@ typedef struct {
|
|||
* @brief LIS3DSH output data rate selection.
|
||||
*/
|
||||
lis3dsh_acc_odr_t accoutputdatarate;
|
||||
#if LIS3DSH_ACC_USE_ADVANCED || defined(__DOXYGEN__)
|
||||
#if LIS3DSH_USE_ADVANCED || defined(__DOXYGEN__)
|
||||
/**
|
||||
* @brief LIS3DSH anti-aliasing bandwidth.
|
||||
*/
|
||||
|
|
|
@ -476,7 +476,7 @@ void lis3mdlStart(LIS3MDLDriver *devp, const LIS3MDLConfig *config) {
|
|||
{
|
||||
cr[0] = LIS3MDL_AD_CTRL_REG1;
|
||||
cr[1] = devp->config->compoutputdatarate;
|
||||
#if LIS3MDL_COMP_USE_ADVANCED || defined(__DOXYGEN__)
|
||||
#if LIS3MDL_USE_ADVANCED || defined(__DOXYGEN__)
|
||||
cr[1] |= devp->config->compoperationmodexy;
|
||||
#else
|
||||
cr[1] |= LIS3MDL_CTRL_REG1_OM0 | LIS3MDL_CTRL_REG1_OM1;
|
||||
|
@ -491,7 +491,7 @@ void lis3mdlStart(LIS3MDLDriver *devp, const LIS3MDLConfig *config) {
|
|||
/* Control register 3 configuration block.*/
|
||||
{
|
||||
cr[3] = 0;
|
||||
#if LIS3MDL_COMP_USE_ADVANCED || defined(__DOXYGEN__)
|
||||
#if LIS3MDL_USE_ADVANCED || defined(__DOXYGEN__)
|
||||
cr[3] = devp->config->compconversionmode;
|
||||
#endif
|
||||
}
|
||||
|
@ -499,7 +499,7 @@ void lis3mdlStart(LIS3MDLDriver *devp, const LIS3MDLConfig *config) {
|
|||
/* Control register 4 configuration block.*/
|
||||
{
|
||||
cr[4] = 0;
|
||||
#if LIS3MDL_COMP_USE_ADVANCED || defined(__DOXYGEN__)
|
||||
#if LIS3MDL_USE_ADVANCED || defined(__DOXYGEN__)
|
||||
cr[4] = devp->config->compoperationmodez | devp->config->endianness;
|
||||
#endif
|
||||
}
|
||||
|
@ -507,7 +507,7 @@ void lis3mdlStart(LIS3MDLDriver *devp, const LIS3MDLConfig *config) {
|
|||
/* Control register 5 configuration block.*/
|
||||
{
|
||||
cr[5] = 0;
|
||||
#if LIS3MDL_COMP_USE_ADVANCED || defined(__DOXYGEN__)
|
||||
#if LIS3MDL_USE_ADVANCED || defined(__DOXYGEN__)
|
||||
cr[5] = devp->config->blockdataupdate;
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
/**
|
||||
* @brief LIS3MDL driver version string.
|
||||
*/
|
||||
#define EX_LIS3MDL_VERSION "1.1.1"
|
||||
#define EX_LIS3MDL_VERSION "1.1.2"
|
||||
|
||||
/**
|
||||
* @brief LIS3MDL driver version major number.
|
||||
|
@ -57,7 +57,7 @@
|
|||
/**
|
||||
* @brief LIS3MDL driver version patch number.
|
||||
*/
|
||||
#define EX_LIS3MDL_PATCH 1
|
||||
#define EX_LIS3MDL_PATCH 2
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
|
@ -229,8 +229,8 @@
|
|||
* @details If set to @p TRUE more configurations are available.
|
||||
* @note The default is @p FALSE.
|
||||
*/
|
||||
#if !defined(LIS3MDL_COMP_USE_ADVANCED) || defined(__DOXYGEN__)
|
||||
#define LIS3MDL_COMP_USE_ADVANCED FALSE
|
||||
#if !defined(LIS3MDL_USE_ADVANCED) || defined(__DOXYGEN__)
|
||||
#define LIS3MDL_USE_ADVANCED FALSE
|
||||
#endif
|
||||
/** @} */
|
||||
|
||||
|
@ -428,7 +428,7 @@ typedef struct {
|
|||
* @brief LIS3MDL compass subsystem output data rate.
|
||||
*/
|
||||
lis3mdl_comp_odr_t compoutputdatarate;
|
||||
#if LIS3MDL_COMP_USE_ADVANCED || defined(__DOXYGEN__)
|
||||
#if LIS3MDL_USE_ADVANCED || defined(__DOXYGEN__)
|
||||
/**
|
||||
* @brief LIS3MDL compass subsystem low power mode configuration.
|
||||
*/
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
/**
|
||||
* @brief LPS22HB driver version string.
|
||||
*/
|
||||
#define EX_LPS22HB_VERSION "1.0.0"
|
||||
#define EX_LPS22HB_VERSION "1.0.1"
|
||||
|
||||
/**
|
||||
* @brief LPS22HB driver version major number.
|
||||
|
@ -58,7 +58,7 @@
|
|||
/**
|
||||
* @brief LPS22HB driver version patch number.
|
||||
*/
|
||||
#define EX_LPS22HB_PATCH 0
|
||||
#define EX_LPS22HB_PATCH 1
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
|
@ -247,8 +247,7 @@
|
|||
#endif
|
||||
|
||||
/**
|
||||
* @brief LPS22HB accelerometer subsystem advanced configurations
|
||||
* switch.
|
||||
* @brief LPS22HB advanced configurations switch.
|
||||
* @details If set to @p TRUE more configurations are available.
|
||||
* @note The default is @p FALSE.
|
||||
*/
|
||||
|
@ -402,7 +401,7 @@ typedef struct {
|
|||
*/
|
||||
lps22hb_bdu_t blockdataupdate;
|
||||
/**
|
||||
* @brief LPS22HB barometer subsystem resolution.
|
||||
* @brief LPS22HB barometer subsystem resolution.
|
||||
*/
|
||||
lps22hb_lp_t lowpass_filter;
|
||||
#endif
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
/**
|
||||
* @brief LPS25H driver version string.
|
||||
*/
|
||||
#define EX_LPS25H_VERSION "1.1.1"
|
||||
#define EX_LPS25H_VERSION "1.1.2"
|
||||
|
||||
/**
|
||||
* @brief LPS25H driver version major number.
|
||||
|
@ -58,7 +58,7 @@
|
|||
/**
|
||||
* @brief LPS25H driver version patch number.
|
||||
*/
|
||||
#define EX_LPS25H_PATCH 1
|
||||
#define EX_LPS25H_PATCH 2
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
|
@ -249,8 +249,7 @@
|
|||
#endif
|
||||
|
||||
/**
|
||||
* @brief LPS25H accelerometer subsystem advanced configurations
|
||||
* switch.
|
||||
* @brief LPS25H advanced configurations switch.
|
||||
* @details If set to @p TRUE more configurations are available.
|
||||
* @note The default is @p FALSE.
|
||||
*/
|
||||
|
|
|
@ -727,7 +727,7 @@ void lsm303agrStart(LSM303AGRDriver *devp, const LSM303AGRConfig *config) {
|
|||
/* Control register 1 configuration block.*/
|
||||
{
|
||||
cr[1] = LSM303AGR_ACC_AE_XYZ | devp->config->accoutdatarate;
|
||||
#if LSM303AGR_ACC_USE_ADVANCED || defined(__DOXYGEN__)
|
||||
#if LSM303AGR_USE_ADVANCED || defined(__DOXYGEN__)
|
||||
if(devp->config->accmode == LSM303AGR_ACC_MODE_LPOW)
|
||||
cr[1] |= LSM303AGR_CTRL_REG1_A_LPEN;
|
||||
#endif
|
||||
|
@ -746,7 +746,7 @@ void lsm303agrStart(LSM303AGRDriver *devp, const LSM303AGRConfig *config) {
|
|||
/* Control register 4 configuration block.*/
|
||||
{
|
||||
cr[4] = devp->config->accfullscale;
|
||||
#if LSM303AGR_ACC_USE_ADVANCED || defined(__DOXYGEN__)
|
||||
#if LSM303AGR_USE_ADVANCED || defined(__DOXYGEN__)
|
||||
cr[4] |= devp->config->accendianess |
|
||||
devp->config->accblockdataupdate;
|
||||
if(devp->config->accmode == LSM303AGR_ACC_MODE_HRES)
|
||||
|
@ -820,7 +820,7 @@ void lsm303agrStart(LSM303AGRDriver *devp, const LSM303AGRConfig *config) {
|
|||
/* Control register A configuration block.*/
|
||||
{
|
||||
cr[1] = devp->config->compoutputdatarate;
|
||||
#if LSM303AGR_COMP_USE_ADVANCED || defined(__DOXYGEN__)
|
||||
#if LSM303AGR_USE_ADVANCED || defined(__DOXYGEN__)
|
||||
cr[1] |= devp->config->compmode | devp->config->complp;
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
/**
|
||||
* @brief LSM303AGR driver version string.
|
||||
*/
|
||||
#define EX_LSM303AGR_VERSION "1.0.0"
|
||||
#define EX_LSM303AGR_VERSION "1.0.1"
|
||||
|
||||
/**
|
||||
* @brief LSM303AGR driver version major number.
|
||||
|
@ -58,7 +58,7 @@
|
|||
/**
|
||||
* @brief LSM303AGR driver version patch number.
|
||||
*/
|
||||
#define EX_LSM303AGR_PATCH 0
|
||||
#define EX_LSM303AGR_PATCH 1
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
|
@ -348,23 +348,12 @@
|
|||
#endif
|
||||
|
||||
/**
|
||||
* @brief LSM303AGR accelerometer subsystem advanced configurations
|
||||
* switch.
|
||||
* @brief LSM303AGR advanced configurations switch.
|
||||
* @details If set to @p TRUE more configurations are available.
|
||||
* @note The default is @p FALSE.
|
||||
*/
|
||||
#if !defined(LSM303AGR_ACC_USE_ADVANCED) || defined(__DOXYGEN__)
|
||||
#define LSM303AGR_ACC_USE_ADVANCED FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief LSM303AGR compass subsystem advanced configurations
|
||||
* switch.
|
||||
* @details If set to @p TRUE more configurations are available.
|
||||
* @note The default is @p FALSE.
|
||||
*/
|
||||
#if !defined(LSM303AGR_COMP_USE_ADVANCED) || defined(__DOXYGEN__)
|
||||
#define LSM303AGR_COMP_USE_ADVANCED FALSE
|
||||
#if !defined(LSM303AGR_USE_ADVANCED) || defined(__DOXYGEN__)
|
||||
#define LSM303AGR_USE_ADVANCED FALSE
|
||||
#endif
|
||||
/** @} */
|
||||
|
||||
|
@ -549,7 +538,7 @@ typedef struct {
|
|||
* @brief LSM303AGR accelerometer subsystem output data rate.
|
||||
*/
|
||||
lsm303agr_acc_odr_t accoutdatarate;
|
||||
#if LSM303AGR_ACC_USE_ADVANCED || defined(__DOXYGEN__)
|
||||
#if LSM303AGR_USE_ADVANCED || defined(__DOXYGEN__)
|
||||
/**
|
||||
* @brief LSM303AGR accelerometer subsystem mode.
|
||||
*/
|
||||
|
@ -575,7 +564,7 @@ typedef struct {
|
|||
* @brief LSM303AGR compass subsystem output data rate.
|
||||
*/
|
||||
lsm303agr_comp_odr_t compoutputdatarate;
|
||||
#if LSM303AGR_COMP_USE_ADVANCED || defined(__DOXYGEN__)
|
||||
#if LSM303AGR_USE_ADVANCED || defined(__DOXYGEN__)
|
||||
/**
|
||||
* @brief LSM303AGR compass subsystem working mode.
|
||||
*/
|
||||
|
|
|
@ -885,7 +885,7 @@ void lsm303dlhcStart(LSM303DLHCDriver *devp, const LSM303DLHCConfig *config) {
|
|||
{
|
||||
cr[1] = LSM303DLHC_CTRL_REG1_A_XEN | LSM303DLHC_CTRL_REG1_A_YEN |
|
||||
LSM303DLHC_CTRL_REG1_A_ZEN | devp->config->accoutdatarate;
|
||||
#if LSM303DLHC_ACC_USE_ADVANCED || defined(__DOXYGEN__)
|
||||
#if LSM303DLHC_USE_ADVANCED || defined(__DOXYGEN__)
|
||||
cr[1] |= devp->config->acclowpower;
|
||||
#endif
|
||||
}
|
||||
|
@ -903,7 +903,7 @@ void lsm303dlhcStart(LSM303DLHCDriver *devp, const LSM303DLHCConfig *config) {
|
|||
/* Control register 4 configuration block.*/
|
||||
{
|
||||
cr[4] = devp->config->accfullscale;
|
||||
#if LSM303DLHC_ACC_USE_ADVANCED || defined(__DOXYGEN__)
|
||||
#if LSM303DLHC_USE_ADVANCED || defined(__DOXYGEN__)
|
||||
cr[4] |= devp->config->accendianess |
|
||||
devp->config->accblockdataupdate |
|
||||
devp->config->acchighresmode;
|
||||
|
@ -986,7 +986,7 @@ void lsm303dlhcStart(LSM303DLHCDriver *devp, const LSM303DLHCConfig *config) {
|
|||
/* Mode register configuration block.*/
|
||||
{
|
||||
cr[3] = 0;
|
||||
#if LSM303DLHC_COMP_USE_ADVANCED || defined(__DOXYGEN__)
|
||||
#if LSM303DLHC_USE_ADVANCED || defined(__DOXYGEN__)
|
||||
cr[3] |= devp->config->compmode;
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
/**
|
||||
* @brief LSM303DLHC driver version string.
|
||||
*/
|
||||
#define EX_LSM303DLHC_VERSION "1.1.1"
|
||||
#define EX_LSM303DLHC_VERSION "1.1.2"
|
||||
|
||||
/**
|
||||
* @brief LSM303DLHC driver version major number.
|
||||
|
@ -58,7 +58,7 @@
|
|||
/**
|
||||
* @brief LSM303DLHC driver version patch number.
|
||||
*/
|
||||
#define EX_LSM303DLHC_PATCH 1
|
||||
#define EX_LSM303DLHC_PATCH 2
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
|
@ -343,23 +343,12 @@
|
|||
#endif
|
||||
|
||||
/**
|
||||
* @brief LSM303DLHC accelerometer subsystem advanced configurations
|
||||
* switch.
|
||||
* @brief LSM303DLHC advanced configurations switch.
|
||||
* @details If set to @p TRUE more configurations are available.
|
||||
* @note The default is @p FALSE.
|
||||
*/
|
||||
#if !defined(LSM303DLHC_ACC_USE_ADVANCED) || defined(__DOXYGEN__)
|
||||
#define LSM303DLHC_ACC_USE_ADVANCED FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief LSM303DLHC compass subsystem advanced configurations
|
||||
* switch.
|
||||
* @details If set to @p TRUE more configurations are available.
|
||||
* @note The default is @p FALSE.
|
||||
*/
|
||||
#if !defined(LSM303DLHC_COMP_USE_ADVANCED) || defined(__DOXYGEN__)
|
||||
#define LSM303DLHC_COMP_USE_ADVANCED FALSE
|
||||
#if !defined(LSM303DLHC_USE_ADVANCED) || defined(__DOXYGEN__)
|
||||
#define LSM303DLHC_USE_ADVANCED FALSE
|
||||
#endif
|
||||
/** @} */
|
||||
|
||||
|
@ -560,7 +549,7 @@ typedef struct {
|
|||
* @brief LSM303DLHC accelerometer subsystem output data rate.
|
||||
*/
|
||||
lsm303dlhc_acc_odr_t accoutdatarate;
|
||||
#if LSM303DLHC_ACC_USE_ADVANCED || defined(__DOXYGEN__)
|
||||
#if LSM303DLHC_USE_ADVANCED || defined(__DOXYGEN__)
|
||||
/**
|
||||
* @brief LSM303DLHC accelerometer subsystem low power mode.
|
||||
*/
|
||||
|
@ -594,7 +583,7 @@ typedef struct {
|
|||
* @brief LSM303DLHC compass subsystem output data rate.
|
||||
*/
|
||||
lsm303dlhc_comp_odr_t compoutputdatarate;
|
||||
#if LSM303DLHC_COMP_USE_ADVANCED || defined(__DOXYGEN__)
|
||||
#if LSM303DLHC_USE_ADVANCED || defined(__DOXYGEN__)
|
||||
/**
|
||||
* @brief LSM303DLHC compass subsystem working mode.
|
||||
*/
|
||||
|
|
|
@ -881,7 +881,7 @@ void lsm6ds0Start(LSM6DS0Driver *devp, const LSM6DS0Config *config) {
|
|||
{
|
||||
cr[1] = LSM6DS0_CTRL_REG5_XL_XEN_XL | LSM6DS0_CTRL_REG5_XL_YEN_XL |
|
||||
LSM6DS0_CTRL_REG5_XL_ZEN_XL;
|
||||
#if LSM6DS0_ACC_USE_ADVANCED || defined(__DOXYGEN__)
|
||||
#if LSM6DS0_USE_ADVANCED || defined(__DOXYGEN__)
|
||||
cr[1] |= devp->config->accdecmode;
|
||||
#endif
|
||||
}
|
||||
|
@ -967,7 +967,7 @@ void lsm6ds0Start(LSM6DS0Driver *devp, const LSM6DS0Config *config) {
|
|||
/* Control register 2 configuration block.*/
|
||||
{
|
||||
cr[2] = 0;
|
||||
#if LSM6DS0_GYRO_USE_ADVANCED || defined(__DOXYGEN__)
|
||||
#if LSM6DS0_USE_ADVANCED || defined(__DOXYGEN__)
|
||||
cr[2] |= devp->config->gyrooutsel;
|
||||
#endif
|
||||
}
|
||||
|
@ -975,7 +975,7 @@ void lsm6ds0Start(LSM6DS0Driver *devp, const LSM6DS0Config *config) {
|
|||
/* Control register 3 configuration block.*/
|
||||
{
|
||||
cr[3] = 0;
|
||||
#if LSM6DS0_GYRO_USE_ADVANCED || defined(__DOXYGEN__)
|
||||
#if LSM6DS0_USE_ADVANCED || defined(__DOXYGEN__)
|
||||
cr[3] |= devp->config->gyrohpfenable |
|
||||
devp->config->gyrolowmodecfg |
|
||||
devp->config->gyrohpcfg;
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
/**
|
||||
* @brief LSM6DS0 driver version string.
|
||||
*/
|
||||
#define EX_LSM6DS0_VERSION "1.1.1"
|
||||
#define EX_LSM6DS0_VERSION "1.1.2"
|
||||
|
||||
/**
|
||||
* @brief LSM6DS0 driver version major number.
|
||||
|
@ -58,7 +58,7 @@
|
|||
/**
|
||||
* @brief LSM6DS0 driver version patch number.
|
||||
*/
|
||||
#define EX_LSM6DS0_PATCH 1
|
||||
#define EX_LSM6DS0_PATCH 2
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
|
@ -354,26 +354,6 @@
|
|||
#define LSM6DS0_USE_ADVANCED FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief LSM6DS0 accelerometer subsystem advanced configurations
|
||||
* switch.
|
||||
* @details If set to @p TRUE more configurations are available.
|
||||
* @note The default is @p FALSE.
|
||||
*/
|
||||
#if !defined(LSM6DS0_ACC_USE_ADVANCED) || defined(__DOXYGEN__)
|
||||
#define LSM6DS0_ACC_USE_ADVANCED FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief LSM6DS0 gyroscope subsystem advanced configurations
|
||||
* switch.
|
||||
* @details If set to @p TRUE more configurations are available.
|
||||
* @note The default is @p FALSE.
|
||||
*/
|
||||
#if !defined(LSM6DS0_GYRO_USE_ADVANCED) || defined(__DOXYGEN__)
|
||||
#define LSM6DS0_GYRO_USE_ADVANCED FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Number of acquisitions for gyroscope bias removal.
|
||||
* @details This is the number of acquisitions performed to compute the
|
||||
|
@ -622,12 +602,12 @@ typedef struct {
|
|||
* @brief LSM6DS0 accelerometer subsystem output data rate.
|
||||
*/
|
||||
lsm6ds0_acc_odr_t accoutdatarate;
|
||||
#if LSM6DS0_ACC_USE_ADVANCED || defined(__DOXYGEN__)
|
||||
#if LSM6DS0_USE_ADVANCED || defined(__DOXYGEN__)
|
||||
/**
|
||||
* @brief LSM6DS0 accelerometer subsystem decimation mode.
|
||||
*/
|
||||
lsm6ds0_acc_dec_t accdecmode;
|
||||
#endif /* LSM6DS0_ACC_USE_ADVANCED */
|
||||
#endif /* LSM6DS0_USE_ADVANCED */
|
||||
/**
|
||||
* @brief LSM6DS0 gyroscope subsystem initial sensitivity.
|
||||
*/
|
||||
|
@ -644,7 +624,7 @@ typedef struct {
|
|||
* @brief LSM6DS0 gyroscope subsystem output data rate.
|
||||
*/
|
||||
lsm6ds0_gyro_odr_t gyrooutdatarate;
|
||||
#if LSM6DS0_GYRO_USE_ADVANCED || defined(__DOXYGEN__)
|
||||
#if LSM6DS0_USE_ADVANCED || defined(__DOXYGEN__)
|
||||
/**
|
||||
* @brief LSM6DS0 gyroscope subsystem low mode configuration.
|
||||
*/
|
||||
|
@ -661,8 +641,6 @@ typedef struct {
|
|||
* @brief LSM6DS0 gyroscope subsystem high pass filter configuration.
|
||||
*/
|
||||
lsm6ds0_gyro_hpcf_t gyrohpcfg;
|
||||
#endif /* LSM6DS0_GYRO_USE_ADVANCED */
|
||||
#if (LSM6DS0_USE_ADVANCED) || defined(__DOXYGEN__)
|
||||
/**
|
||||
* @brief LSM6DS0 block data update
|
||||
*/
|
||||
|
|
|
@ -903,7 +903,7 @@ void lsm6dslStart(LSM6DSLDriver *devp, const LSM6DSLConfig *config) {
|
|||
/* Control register 4 configuration block.*/
|
||||
{
|
||||
cr[4] = 0;
|
||||
#if LSM6DSL_GYRO_USE_ADVANCED || defined(__DOXYGEN__)
|
||||
#if LSM6DSL_USE_ADVANCED || defined(__DOXYGEN__)
|
||||
if(devp->config->gyrolowpassfilter != LSM6DSL_GYRO_LPF_DISABLED) {
|
||||
cr[4] |= LSMDSL_CTRL4_C_LPF1_SEL_G;
|
||||
}
|
||||
|
@ -919,11 +919,11 @@ void lsm6dslStart(LSM6DSLDriver *devp, const LSM6DSLConfig *config) {
|
|||
/* Control register 6 configuration block.*/
|
||||
{
|
||||
cr[6] = 0;
|
||||
#if LSM6DSL_ACC_USE_ADVANCED || defined(__DOXYGEN__)
|
||||
#if LSM6DSL_USE_ADVANCED || defined(__DOXYGEN__)
|
||||
cr[6] |= devp->config->acclpmode;
|
||||
|
||||
#endif
|
||||
#if LSM6DSL_GYRO_USE_ADVANCED || defined(__DOXYGEN__)
|
||||
#if LSM6DSL_USE_ADVANCED || defined(__DOXYGEN__)
|
||||
if(devp->config->gyrolowpassfilter != LSM6DSL_GYRO_LPF_DISABLED) {
|
||||
cr[6] |= devp->config->gyrolowpassfilter;
|
||||
}
|
||||
|
@ -935,7 +935,7 @@ void lsm6dslStart(LSM6DSLDriver *devp, const LSM6DSLConfig *config) {
|
|||
/* Control register 7 configuration block.*/
|
||||
{
|
||||
cr[7] = 0;
|
||||
#if LSM6DSL_GYRO_USE_ADVANCED || defined(__DOXYGEN__)
|
||||
#if LSM6DSL_USE_ADVANCED || defined(__DOXYGEN__)
|
||||
cr[7] |= devp->config->gyrolpmode;
|
||||
|
||||
#endif
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
/**
|
||||
* @brief LSM6DSL driver version string.
|
||||
*/
|
||||
#define EX_LSM6DSL_VERSION "1.0.0"
|
||||
#define EX_LSM6DSL_VERSION "1.0.1"
|
||||
|
||||
/**
|
||||
* @brief LSM6DSL driver version major number.
|
||||
|
@ -58,7 +58,7 @@
|
|||
/**
|
||||
* @brief LSM6DSL driver version patch number.
|
||||
*/
|
||||
#define EX_LSM6DSL_PATCH 0
|
||||
#define EX_LSM6DSL_PATCH 1
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
|
@ -407,26 +407,6 @@
|
|||
#define LSM6DSL_USE_ADVANCED FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief LSM6DSL accelerometer subsystem advanced configurations
|
||||
* switch.
|
||||
* @details If set to @p TRUE more configurations are available.
|
||||
* @note The default is @p FALSE.
|
||||
*/
|
||||
#if !defined(LSM6DSL_ACC_USE_ADVANCED) || defined(__DOXYGEN__)
|
||||
#define LSM6DSL_ACC_USE_ADVANCED FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief LSM6DSL gyroscope subsystem advanced configurations
|
||||
* switch.
|
||||
* @details If set to @p TRUE more configurations are available.
|
||||
* @note The default is @p FALSE.
|
||||
*/
|
||||
#if !defined(LSM6DSL_GYRO_USE_ADVANCED) || defined(__DOXYGEN__)
|
||||
#define LSM6DSL_GYRO_USE_ADVANCED FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Number of acquisitions for gyroscope bias removal.
|
||||
* @details This is the number of acquisitions performed to compute the
|
||||
|
@ -651,12 +631,12 @@ typedef struct {
|
|||
* @brief LSM6DSL accelerometer subsystem output data rate.
|
||||
*/
|
||||
lsm6dsl_acc_odr_t accoutdatarate;
|
||||
#if LSM6DSL_ACC_USE_ADVANCED || defined(__DOXYGEN__)
|
||||
#if LSM6DSL_USE_ADVANCED || defined(__DOXYGEN__)
|
||||
/**
|
||||
* @brief LSM6DSL accelerometer subsystem low power mode.
|
||||
*/
|
||||
lsm6dsl_acc_lp_t acclpmode;
|
||||
#endif /* LSM6DSL_ACC_USE_ADVANCED */
|
||||
#endif /* LSM6DSL_USE_ADVANCED */
|
||||
/**
|
||||
* @brief LSM6DSL gyroscope subsystem initial sensitivity.
|
||||
*/
|
||||
|
@ -673,7 +653,7 @@ typedef struct {
|
|||
* @brief LSM6DSL gyroscope subsystem output data rate.
|
||||
*/
|
||||
lsm6dsl_gyro_odr_t gyrooutdatarate;
|
||||
#if LSM6DSL_GYRO_USE_ADVANCED || defined(__DOXYGEN__)
|
||||
#if LSM6DSL_USE_ADVANCED || defined(__DOXYGEN__)
|
||||
/**
|
||||
* @brief LSM6DSL gyroscope subsystem low mode configuration.
|
||||
*/
|
||||
|
@ -682,8 +662,6 @@ typedef struct {
|
|||
* @brief LSM6DSL gyroscope subsystem low pass filter configuration.
|
||||
*/
|
||||
lsm6dsl_gyro_lpf_t gyrolowpassfilter;
|
||||
#endif /* LSM6DSL_GYRO_USE_ADVANCED */
|
||||
#if (LSM6DSL_USE_ADVANCED) || defined(__DOXYGEN__)
|
||||
/**
|
||||
* @brief LSM6DSL block data update
|
||||
*/
|
||||
|
|
|
@ -53,7 +53,7 @@ static const LSM303DLHCConfig lsm303dlhccfg = {
|
|||
NULL,
|
||||
LSM303DLHC_ACC_FS_4G,
|
||||
LSM303DLHC_ACC_ODR_100Hz,
|
||||
#if LSM303DLHC_ACC_USE_ADVANCED
|
||||
#if LSM303DLHC_USE_ADVANCED
|
||||
LSM303DLHC_ACC_LP_DISABLED,
|
||||
LSM303DLHC_ACC_HR_DISABLED,
|
||||
LSM303DLHC_ACC_BDU_BLOCK,
|
||||
|
@ -63,7 +63,7 @@ static const LSM303DLHCConfig lsm303dlhccfg = {
|
|||
NULL,
|
||||
LSM303DLHC_COMP_FS_1P3GA,
|
||||
LSM303DLHC_COMP_ODR_30HZ,
|
||||
#if LSM303DLHC_COMP_USE_ADVANCED
|
||||
#if LSM303DLHC_USE_ADVANCED
|
||||
LSM303DLHC_COMP_MD_BLOCK
|
||||
#endif
|
||||
};
|
||||
|
|
|
@ -51,7 +51,7 @@ static L3GD20Config l3gd20cfg = {
|
|||
NULL,
|
||||
L3GD20_FS_250DPS,
|
||||
L3GD20_ODR_760HZ,
|
||||
#if L3GD20_GYRO_USE_ADVANCED
|
||||
#if L3GD20_USE_ADVANCED
|
||||
L3GD20_BDU_CONTINUOUS,
|
||||
L3GD20_END_LITTLE,
|
||||
L3GD20_BW3,
|
||||
|
|
|
@ -49,7 +49,7 @@ static LIS3MDLConfig lis3mdlcfg = {
|
|||
NULL,
|
||||
LIS3MDL_COMP_FS_4GA,
|
||||
LIS3MDL_COMP_ODR_40HZ,
|
||||
#if LIS3MDL_COMP_USE_ADVANCED
|
||||
#if LIS3MDL_USE_ADVANCED
|
||||
LIS3MDL_COMP_LP_ENABLED,
|
||||
LIS3MDL_COMP_MD_CONTINUOUS,
|
||||
LIS3MDL_COMP_OMXY_LP,
|
||||
|
|
|
@ -51,7 +51,7 @@ static const LSM303AGRConfig lsm303agrcfg = {
|
|||
NULL,
|
||||
LSM303AGR_ACC_FS_4G,
|
||||
LSM303AGR_ACC_ODR_100Hz,
|
||||
#if LSM303AGR_ACC_USE_ADVANCED
|
||||
#if LSM303AGR_USE_ADVANCED
|
||||
LSM303AGR_ACC_MODE_LPOW,
|
||||
LSM303AGR_ACC_BDU_BLOCK,
|
||||
LSM303AGR_ACC_END_LITTLE,
|
||||
|
@ -59,7 +59,7 @@ static const LSM303AGRConfig lsm303agrcfg = {
|
|||
NULL,
|
||||
NULL,
|
||||
LSM303AGR_COMP_ODR_50HZ,
|
||||
#if LSM303AGR_COMP_USE_ADVANCED
|
||||
#if LSM303AGR_USE_ADVANCED
|
||||
LSM303AGR_COMP_MODE_NORM,
|
||||
LSM303AGR_COMP_LPOW_EN
|
||||
#endif
|
||||
|
|
|
@ -52,7 +52,7 @@ static const LSM303DLHCConfig lsm303dlhccfg = {
|
|||
NULL,
|
||||
LSM303DLHC_ACC_FS_4G,
|
||||
LSM303DLHC_ACC_ODR_100Hz,
|
||||
#if LSM303DLHC_ACC_USE_ADVANCED
|
||||
#if LSM303DLHC_USE_ADVANCED
|
||||
LSM303DLHC_ACC_LP_DISABLED,
|
||||
LSM303DLHC_ACC_HR_DISABLED,
|
||||
LSM303DLHC_ACC_BDU_BLOCK,
|
||||
|
@ -62,7 +62,7 @@ static const LSM303DLHCConfig lsm303dlhccfg = {
|
|||
NULL,
|
||||
LSM303DLHC_COMP_FS_1P3GA,
|
||||
LSM303DLHC_COMP_ODR_30HZ,
|
||||
#if LSM303DLHC_COMP_USE_ADVANCED
|
||||
#if LSM303DLHC_USE_ADVANCED
|
||||
LSM303DLHC_COMP_MD_BLOCK
|
||||
#endif
|
||||
};
|
||||
|
|
|
@ -52,20 +52,20 @@ static const LSM6DS0Config lsm6ds0cfg = {
|
|||
NULL,
|
||||
LSM6DS0_ACC_FS_2G,
|
||||
LSM6DS0_ACC_ODR_50Hz,
|
||||
#if LSM6DS0_ACC_USE_ADVANCED
|
||||
#if LSM6DS0_USE_ADVANCED
|
||||
LSM6DS0_ACC_DEC_X4,
|
||||
#endif
|
||||
NULL,
|
||||
NULL,
|
||||
LSM6DS0_GYRO_FS_245DPS,
|
||||
LSM6DS0_GYRO_ODR_119HZ_FC_31,
|
||||
#if LSM6DS0_GYRO_USE_ADVANCED
|
||||
#if LSM6DS0_USE_ADVANCED
|
||||
LSM6DS0_GYRO_LP_DISABLED,
|
||||
LSM6DS0_GYRO_OUT_SEL_0,
|
||||
LSM6DS0_GYRO_HP_DISABLED,
|
||||
LSM6DS0_GYRO_HPCF_0,
|
||||
#endif
|
||||
#if LSM6DS0_USE_ADVANCED || defined(__DOXYGEN__)
|
||||
#if LSM6DS0_USE_ADVANCED
|
||||
LSM6DS0_BDU_BLOCKED,
|
||||
LSM6DS0_END_LITTLE
|
||||
#endif
|
||||
|
|
|
@ -52,18 +52,18 @@ static const LSM6DSLConfig lsm6dslcfg = {
|
|||
NULL,
|
||||
LSM6DSL_ACC_FS_2G,
|
||||
LSM6DSL_GYRO_ODR_52Hz,
|
||||
#if LSM6DSL_ACC_USE_ADVANCED
|
||||
#if LSM6DSL_USE_ADVANCED
|
||||
LSM6DSL_ACC_LP_ENABLED,
|
||||
#endif
|
||||
NULL,
|
||||
NULL,
|
||||
LSM6DSL_GYRO_FS_250DPS,
|
||||
LSM6DSL_GYRO_ODR_104Hz,
|
||||
#if LSM6DSL_GYRO_USE_ADVANCED
|
||||
#if LSM6DSL_USE_ADVANCED
|
||||
LSM6DSL_GYRO_LP_ENABLED,
|
||||
LSM6DSL_GYRO_LPF_FTYPE1,
|
||||
#endif
|
||||
#if LSM6DSL_USE_ADVANCED || defined(__DOXYGEN__)
|
||||
#if LSM6DSL_USE_ADVANCED
|
||||
LSM6DSL_BDU_BLOCKED,
|
||||
LSM6DSL_END_LITTLE
|
||||
#endif
|
||||
|
|
|
@ -52,7 +52,7 @@ static L3GD20Config l3gd20cfg = {
|
|||
NULL,
|
||||
L3GD20_FS_250DPS,
|
||||
L3GD20_ODR_760HZ,
|
||||
#if L3GD20_GYRO_USE_ADVANCED
|
||||
#if L3GD20_USE_ADVANCED
|
||||
L3GD20_BDU_CONTINUOUS,
|
||||
L3GD20_END_LITTLE,
|
||||
L3GD20_BW3,
|
||||
|
|
|
@ -18,7 +18,7 @@ ifeq ($(USE_CPPOPT),)
|
|||
USE_CPPOPT = -fno-rtti
|
||||
endif
|
||||
|
||||
# Enable this if you want the linker to remove unused code and data
|
||||
# Enable this if you want the linker to remove unused code and data.
|
||||
ifeq ($(USE_LINK_GC),)
|
||||
USE_LINK_GC = yes
|
||||
endif
|
||||
|
@ -28,16 +28,11 @@ ifeq ($(USE_LDOPT),)
|
|||
USE_LDOPT =
|
||||
endif
|
||||
|
||||
# Enable this if you want link time optimizations (LTO)
|
||||
# Enable this if you want link time optimizations (LTO).
|
||||
ifeq ($(USE_LTO),)
|
||||
USE_LTO = yes
|
||||
endif
|
||||
|
||||
# If enabled, this option allows to compile the application in THUMB mode.
|
||||
ifeq ($(USE_THUMB),)
|
||||
USE_THUMB = yes
|
||||
endif
|
||||
|
||||
# Enable this if you want to see the full log while compiling.
|
||||
ifeq ($(USE_VERBOSE_COMPILE),)
|
||||
USE_VERBOSE_COMPILE = no
|
||||
|
@ -71,7 +66,12 @@ endif
|
|||
|
||||
# Enables the use of FPU (no, softfp, hard).
|
||||
ifeq ($(USE_FPU),)
|
||||
USE_FPU = no
|
||||
USE_FPU = hard
|
||||
endif
|
||||
|
||||
# FPU-related options.
|
||||
ifeq ($(USE_FPU_OPT),)
|
||||
USE_FPU_OPT = -mfloat-abi=$(USE_FPU) -mfpu=fpv4-sp-d16
|
||||
endif
|
||||
|
||||
#
|
||||
|
@ -79,14 +79,20 @@ endif
|
|||
##############################################################################
|
||||
|
||||
##############################################################################
|
||||
# Project, sources and paths
|
||||
# Project, target, sources and paths
|
||||
#
|
||||
|
||||
# Define project name here
|
||||
PROJECT = ch
|
||||
|
||||
# Imported source files and paths
|
||||
CHIBIOS = ../../../..
|
||||
# Target settings.
|
||||
MCU = cortex-m4
|
||||
|
||||
# Imported source files and paths.
|
||||
CHIBIOS := ../../../..
|
||||
CONFDIR := ./cfg
|
||||
BUILDDIR := ./build
|
||||
DEPDIR := ./.dep
|
||||
|
||||
# Licensing files.
|
||||
include $(CHIBIOS)/os/license/license.mk
|
||||
|
@ -100,105 +106,43 @@ include $(CHIBIOS)/os/hal/osal/rt/osal.mk
|
|||
# RTOS files (optional).
|
||||
include $(CHIBIOS)/os/rt/rt.mk
|
||||
include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk
|
||||
# EX files (optional)..
|
||||
# EX files (optional).
|
||||
include $(CHIBIOS)/os/ex/ST/lis302dl.mk
|
||||
# Auto-build files in ./source recursively.
|
||||
include $(CHIBIOS)/tools/mk/autobuild.mk
|
||||
# Other files (optional).
|
||||
include $(CHIBIOS)/os/hal/lib/streams/streams.mk
|
||||
|
||||
# Define linker script file here
|
||||
LDSCRIPT= $(STARTUPLD)/STM32F407xG.ld
|
||||
|
||||
# C sources that can be compiled in ARM or THUMB mode depending on the global
|
||||
# setting.
|
||||
CSRC = $(STARTUPSRC) \
|
||||
$(KERNSRC) \
|
||||
$(PORTSRC) \
|
||||
$(OSALSRC) \
|
||||
$(HALSRC) \
|
||||
$(PLATFORMSRC) \
|
||||
$(BOARDSRC) \
|
||||
$(LIS3DSHSRC) \
|
||||
$(STREAMSSRC) \
|
||||
$(SHELLSRC) \
|
||||
usbcfg.c main.c
|
||||
|
||||
# C sources that can be compiled in ARM or THUMB mode depending on the global
|
||||
# setting.
|
||||
CSRC = $(ALLCSRC) \
|
||||
$(TESTSRC) \
|
||||
usbcfg.c main.c
|
||||
main.c
|
||||
|
||||
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
|
||||
# setting.
|
||||
CPPSRC = $(ALLCPPSRC)
|
||||
|
||||
# C sources to be compiled in ARM mode regardless of the global setting.
|
||||
# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
|
||||
# option that results in lower performance and larger code size.
|
||||
ACSRC =
|
||||
# List ASM source files here.
|
||||
ASMSRC = $(ALLASMSRC)
|
||||
|
||||
# C++ sources to be compiled in ARM mode regardless of the global setting.
|
||||
# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
|
||||
# option that results in lower performance and larger code size.
|
||||
ACPPSRC =
|
||||
# List ASM with preprocessor source files here.
|
||||
ASMXSRC = $(ALLXASMSRC)
|
||||
|
||||
# C sources to be compiled in THUMB mode regardless of the global setting.
|
||||
# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
|
||||
# option that results in lower performance and larger code size.
|
||||
TCSRC =
|
||||
# Inclusion directories.
|
||||
INCDIR = $(CONFDIR) $(ALLINC) $(TESTINC)
|
||||
|
||||
# C sources to be compiled in THUMB mode regardless of the global setting.
|
||||
# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
|
||||
# option that results in lower performance and larger code size.
|
||||
TCPPSRC =
|
||||
|
||||
# List ASM source files here
|
||||
ASMSRC =
|
||||
ASMXSRC = $(STARTUPASM) $(PORTASM) $(OSALASM)
|
||||
|
||||
INCDIR = $(ALLINC) $(TESTINC)
|
||||
|
||||
#
|
||||
# Project, sources and paths
|
||||
##############################################################################
|
||||
|
||||
##############################################################################
|
||||
# Compiler settings
|
||||
#
|
||||
|
||||
MCU = cortex-m4
|
||||
|
||||
#TRGT = arm-elf-
|
||||
TRGT = arm-none-eabi-
|
||||
CC = $(TRGT)gcc
|
||||
CPPC = $(TRGT)g++
|
||||
# Enable loading with g++ only if you need C++ runtime support.
|
||||
# NOTE: You can use C++ even without C++ support if you are careful. C++
|
||||
# runtime support makes code size explode.
|
||||
LD = $(TRGT)gcc
|
||||
#LD = $(TRGT)g++
|
||||
CP = $(TRGT)objcopy
|
||||
AS = $(TRGT)gcc -x assembler-with-cpp
|
||||
AR = $(TRGT)ar
|
||||
OD = $(TRGT)objdump
|
||||
SZ = $(TRGT)size
|
||||
HEX = $(CP) -O ihex
|
||||
BIN = $(CP) -O binary
|
||||
|
||||
# ARM-specific options here
|
||||
AOPT =
|
||||
|
||||
# THUMB-specific options here
|
||||
TOPT = -mthumb -DTHUMB
|
||||
|
||||
# Define C warning options here
|
||||
# Define C warning options here.
|
||||
CWARN = -Wall -Wextra -Wundef -Wstrict-prototypes
|
||||
|
||||
# Define C++ warning options here
|
||||
# Define C++ warning options here.
|
||||
CPPWARN = -Wall -Wextra -Wundef
|
||||
|
||||
#
|
||||
# Compiler settings
|
||||
# Project, target, sources and paths
|
||||
##############################################################################
|
||||
|
||||
##############################################################################
|
||||
|
@ -206,8 +150,7 @@ CPPWARN = -Wall -Wextra -Wundef
|
|||
#
|
||||
|
||||
# List all user C define here, like -D_DEBUG=1
|
||||
UDEFS = -DCHPRINTF_USE_FLOAT=1 \
|
||||
-DLIS302DL_USE_ADVANCED=0 -DLIS302DL_SHARED_SPI=0
|
||||
UDEFS = -DCHPRINTF_USE_FLOAT=1
|
||||
|
||||
# Define ASM defines here
|
||||
UADEFS =
|
||||
|
@ -222,8 +165,25 @@ ULIBDIR =
|
|||
ULIBS =
|
||||
|
||||
#
|
||||
# End of user defines
|
||||
# End of user section
|
||||
##############################################################################
|
||||
|
||||
##############################################################################
|
||||
# Common rules
|
||||
#
|
||||
|
||||
RULESPATH = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk
|
||||
include $(RULESPATH)/arm-none-eabi.mk
|
||||
include $(RULESPATH)/rules.mk
|
||||
|
||||
#
|
||||
# Common rules
|
||||
##############################################################################
|
||||
|
||||
##############################################################################
|
||||
# Custom rules
|
||||
#
|
||||
|
||||
#
|
||||
# Custom rules
|
||||
##############################################################################
|
||||
|
|
|
@ -18,7 +18,7 @@ ifeq ($(USE_CPPOPT),)
|
|||
USE_CPPOPT = -fno-rtti
|
||||
endif
|
||||
|
||||
# Enable this if you want the linker to remove unused code and data
|
||||
# Enable this if you want the linker to remove unused code and data.
|
||||
ifeq ($(USE_LINK_GC),)
|
||||
USE_LINK_GC = yes
|
||||
endif
|
||||
|
@ -28,16 +28,11 @@ ifeq ($(USE_LDOPT),)
|
|||
USE_LDOPT =
|
||||
endif
|
||||
|
||||
# Enable this if you want link time optimizations (LTO)
|
||||
# Enable this if you want link time optimizations (LTO).
|
||||
ifeq ($(USE_LTO),)
|
||||
USE_LTO = yes
|
||||
endif
|
||||
|
||||
# If enabled, this option allows to compile the application in THUMB mode.
|
||||
ifeq ($(USE_THUMB),)
|
||||
USE_THUMB = yes
|
||||
endif
|
||||
|
||||
# Enable this if you want to see the full log while compiling.
|
||||
ifeq ($(USE_VERBOSE_COMPILE),)
|
||||
USE_VERBOSE_COMPILE = no
|
||||
|
@ -71,7 +66,12 @@ endif
|
|||
|
||||
# Enables the use of FPU (no, softfp, hard).
|
||||
ifeq ($(USE_FPU),)
|
||||
USE_FPU = no
|
||||
USE_FPU = hard
|
||||
endif
|
||||
|
||||
# FPU-related options.
|
||||
ifeq ($(USE_FPU_OPT),)
|
||||
USE_FPU_OPT = -mfloat-abi=$(USE_FPU) -mfpu=fpv4-sp-d16
|
||||
endif
|
||||
|
||||
#
|
||||
|
@ -79,14 +79,20 @@ endif
|
|||
##############################################################################
|
||||
|
||||
##############################################################################
|
||||
# Project, sources and paths
|
||||
# Project, target, sources and paths
|
||||
#
|
||||
|
||||
# Define project name here
|
||||
PROJECT = ch
|
||||
|
||||
# Imported source files and paths
|
||||
CHIBIOS = ../../../..
|
||||
# Target settings.
|
||||
MCU = cortex-m4
|
||||
|
||||
# Imported source files and paths.
|
||||
CHIBIOS := ../../../..
|
||||
CONFDIR := ./cfg
|
||||
BUILDDIR := ./build
|
||||
DEPDIR := ./.dep
|
||||
|
||||
# Licensing files.
|
||||
include $(CHIBIOS)/os/license/license.mk
|
||||
|
@ -100,105 +106,43 @@ include $(CHIBIOS)/os/hal/osal/rt/osal.mk
|
|||
# RTOS files (optional).
|
||||
include $(CHIBIOS)/os/rt/rt.mk
|
||||
include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk
|
||||
# EX files (optional)..
|
||||
# EX files (optional).
|
||||
include $(CHIBIOS)/os/ex/ST/lis3dsh.mk
|
||||
# Auto-build files in ./source recursively.
|
||||
include $(CHIBIOS)/tools/mk/autobuild.mk
|
||||
# Other files (optional).
|
||||
include $(CHIBIOS)/os/hal/lib/streams/streams.mk
|
||||
|
||||
# Define linker script file here
|
||||
LDSCRIPT= $(STARTUPLD)/STM32F407xG.ld
|
||||
|
||||
# C sources that can be compiled in ARM or THUMB mode depending on the global
|
||||
# setting.
|
||||
CSRC = $(STARTUPSRC) \
|
||||
$(KERNSRC) \
|
||||
$(PORTSRC) \
|
||||
$(OSALSRC) \
|
||||
$(HALSRC) \
|
||||
$(PLATFORMSRC) \
|
||||
$(BOARDSRC) \
|
||||
$(LIS3DSHSRC) \
|
||||
$(STREAMSSRC) \
|
||||
$(SHELLSRC) \
|
||||
usbcfg.c main.c
|
||||
|
||||
# C sources that can be compiled in ARM or THUMB mode depending on the global
|
||||
# setting.
|
||||
CSRC = $(ALLCSRC) \
|
||||
$(TESTSRC) \
|
||||
usbcfg.c main.c
|
||||
main.c
|
||||
|
||||
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
|
||||
# setting.
|
||||
CPPSRC = $(ALLCPPSRC)
|
||||
|
||||
# C sources to be compiled in ARM mode regardless of the global setting.
|
||||
# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
|
||||
# option that results in lower performance and larger code size.
|
||||
ACSRC =
|
||||
# List ASM source files here.
|
||||
ASMSRC = $(ALLASMSRC)
|
||||
|
||||
# C++ sources to be compiled in ARM mode regardless of the global setting.
|
||||
# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
|
||||
# option that results in lower performance and larger code size.
|
||||
ACPPSRC =
|
||||
# List ASM with preprocessor source files here.
|
||||
ASMXSRC = $(ALLXASMSRC)
|
||||
|
||||
# C sources to be compiled in THUMB mode regardless of the global setting.
|
||||
# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
|
||||
# option that results in lower performance and larger code size.
|
||||
TCSRC =
|
||||
# Inclusion directories.
|
||||
INCDIR = $(CONFDIR) $(ALLINC) $(TESTINC)
|
||||
|
||||
# C sources to be compiled in THUMB mode regardless of the global setting.
|
||||
# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
|
||||
# option that results in lower performance and larger code size.
|
||||
TCPPSRC =
|
||||
|
||||
# List ASM source files here
|
||||
ASMSRC =
|
||||
ASMXSRC = $(STARTUPASM) $(PORTASM) $(OSALASM)
|
||||
|
||||
INCDIR = $(ALLINC) $(TESTINC)
|
||||
|
||||
#
|
||||
# Project, sources and paths
|
||||
##############################################################################
|
||||
|
||||
##############################################################################
|
||||
# Compiler settings
|
||||
#
|
||||
|
||||
MCU = cortex-m4
|
||||
|
||||
#TRGT = arm-elf-
|
||||
TRGT = arm-none-eabi-
|
||||
CC = $(TRGT)gcc
|
||||
CPPC = $(TRGT)g++
|
||||
# Enable loading with g++ only if you need C++ runtime support.
|
||||
# NOTE: You can use C++ even without C++ support if you are careful. C++
|
||||
# runtime support makes code size explode.
|
||||
LD = $(TRGT)gcc
|
||||
#LD = $(TRGT)g++
|
||||
CP = $(TRGT)objcopy
|
||||
AS = $(TRGT)gcc -x assembler-with-cpp
|
||||
AR = $(TRGT)ar
|
||||
OD = $(TRGT)objdump
|
||||
SZ = $(TRGT)size
|
||||
HEX = $(CP) -O ihex
|
||||
BIN = $(CP) -O binary
|
||||
|
||||
# ARM-specific options here
|
||||
AOPT =
|
||||
|
||||
# THUMB-specific options here
|
||||
TOPT = -mthumb -DTHUMB
|
||||
|
||||
# Define C warning options here
|
||||
# Define C warning options here.
|
||||
CWARN = -Wall -Wextra -Wundef -Wstrict-prototypes
|
||||
|
||||
# Define C++ warning options here
|
||||
# Define C++ warning options here.
|
||||
CPPWARN = -Wall -Wextra -Wundef
|
||||
|
||||
#
|
||||
# Compiler settings
|
||||
# Project, target, sources and paths
|
||||
##############################################################################
|
||||
|
||||
##############################################################################
|
||||
|
@ -206,8 +150,7 @@ CPPWARN = -Wall -Wextra -Wundef
|
|||
#
|
||||
|
||||
# List all user C define here, like -D_DEBUG=1
|
||||
UDEFS = -DCHPRINTF_USE_FLOAT=1 \
|
||||
-DLIS3DSH_USE_ADVANCED=0 -DLIS3DSH_SHARED_SPI=0
|
||||
UDEFS = -DCHPRINTF_USE_FLOAT=1
|
||||
|
||||
# Define ASM defines here
|
||||
UADEFS =
|
||||
|
@ -222,8 +165,25 @@ ULIBDIR =
|
|||
ULIBS =
|
||||
|
||||
#
|
||||
# End of user defines
|
||||
# End of user section
|
||||
##############################################################################
|
||||
|
||||
##############################################################################
|
||||
# Common rules
|
||||
#
|
||||
|
||||
RULESPATH = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk
|
||||
include $(RULESPATH)/arm-none-eabi.mk
|
||||
include $(RULESPATH)/rules.mk
|
||||
|
||||
#
|
||||
# Common rules
|
||||
##############################################################################
|
||||
|
||||
##############################################################################
|
||||
# Custom rules
|
||||
#
|
||||
|
||||
#
|
||||
# Custom rules
|
||||
##############################################################################
|
||||
|
|
|
@ -51,7 +51,7 @@ static L3GD20Config l3gd20cfg = {
|
|||
NULL,
|
||||
L3GD20_FS_250DPS,
|
||||
L3GD20_ODR_760HZ,
|
||||
#if L3GD20_GYRO_USE_ADVANCED
|
||||
#if L3GD20_USE_ADVANCED
|
||||
L3GD20_BDU_CONTINUOUS,
|
||||
L3GD20_END_LITTLE,
|
||||
L3GD20_BW3,
|
||||
|
|
Loading…
Reference in New Issue