diff options
author | Rocco Marco Guglielmi <roccomarco.guglielmi@live.com> | 2016-03-06 18:25:18 +0000 |
---|---|---|
committer | Rocco Marco Guglielmi <roccomarco.guglielmi@live.com> | 2016-03-06 18:25:18 +0000 |
commit | 92c4f97fa4be92ae2ae2f0d7ee4aaa1353fe000f (patch) | |
tree | dca5456379247a87b35d09dbcf5aced7a3eef759 /os | |
parent | 7d6f337b8cb2c311a6adcd811e362bc5bd918291 (diff) | |
download | ChibiOS-92c4f97fa4be92ae2ae2f0d7ee4aaa1353fe000f.tar.gz ChibiOS-92c4f97fa4be92ae2ae2f0d7ee4aaa1353fe000f.tar.bz2 ChibiOS-92c4f97fa4be92ae2ae2f0d7ee4aaa1353fe000f.zip |
Minor indent fixes.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9044 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os')
-rw-r--r-- | os/ex/ST/l3gd20.c | 114 | ||||
-rw-r--r-- | os/ex/ST/l3gd20.h | 11 |
2 files changed, 62 insertions, 63 deletions
diff --git a/os/ex/ST/l3gd20.c b/os/ex/ST/l3gd20.c index b42d5c1fc..5bab58ddc 100644 --- a/os/ex/ST/l3gd20.c +++ b/os/ex/ST/l3gd20.c @@ -35,59 +35,59 @@ /* Driver local definitions. */ /*===========================================================================*/ -#define L3GD20_SENS_250DPS ((float)0.00875f) -#define L3GD20_SENS_500DPS ((float)0.01750f) -#define L3GD20_SENS_2000DPS ((float)0.07000f) - -#define L3GD20_DI ((uint8_t)0xFF) -#define L3GD20_DI_0 ((uint8_t)0x01) -#define L3GD20_DI_1 ((uint8_t)0x02) -#define L3GD20_DI_2 ((uint8_t)0x04) -#define L3GD20_DI_3 ((uint8_t)0x08) -#define L3GD20_DI_4 ((uint8_t)0x10) -#define L3GD20_DI_5 ((uint8_t)0x20) -#define L3GD20_DI_6 ((uint8_t)0x40) -#define L3GD20_DI_7 ((uint8_t)0x80) - -#define L3GD20_AD ((uint8_t)0x3F) -#define L3GD20_AD_0 ((uint8_t)0x01) -#define L3GD20_AD_1 ((uint8_t)0x02) -#define L3GD20_AD_2 ((uint8_t)0x04) -#define L3GD20_AD_3 ((uint8_t)0x08) -#define L3GD20_AD_4 ((uint8_t)0x10) -#define L3GD20_AD_5 ((uint8_t)0x20) - -#define L3GD20_MS ((uint8_t)0x40) -#define L3GD20_RW ((uint8_t)0x80) - -#define L3GD20_AD_WHO_AM_I ((uint8_t)0x0F) -#define L3GD20_AD_CTRL_REG1 ((uint8_t)0x20) -#define L3GD20_AD_CTRL_REG2 ((uint8_t)0x21) -#define L3GD20_AD_CTRL_REG3 ((uint8_t)0x22) -#define L3GD20_AD_CTRL_REG4 ((uint8_t)0x23) -#define L3GD20_AD_CTRL_REG5 ((uint8_t)0x24) -#define L3GD20_AD_REFERENCE ((uint8_t)0x25) -#define L3GD20_AD_OUT_TEMP ((uint8_t)0x26) -#define L3GD20_AD_STATUS_REG ((uint8_t)0x27) -#define L3GD20_AD_OUT_X_L ((uint8_t)0x28) -#define L3GD20_AD_OUT_X_H ((uint8_t)0x29) -#define L3GD20_AD_OUT_Y_L ((uint8_t)0x2A) -#define L3GD20_AD_OUT_Y_H ((uint8_t)0x2B) -#define L3GD20_AD_OUT_Z_L ((uint8_t)0x2C) -#define L3GD20_AD_OUT_Z_H ((uint8_t)0x2D) -#define L3GD20_AD_FIFO_CTRL_REG ((uint8_t)0x2E) -#define L3GD20_AD_FIFO_SRC_REG ((uint8_t)0x2F) -#define L3GD20_AD_INT1_CFG ((uint8_t)0x30) -#define L3GD20_AD_INT1_SRC ((uint8_t)0x31) -#define L3GD20_AD_INT1_TSH_XH ((uint8_t)0x32) -#define L3GD20_AD_INT1_TSH_XL ((uint8_t)0x33) -#define L3GD20_AD_INT1_TSH_YH ((uint8_t)0x34) -#define L3GD20_AD_INT1_TSH_YL ((uint8_t)0x35) -#define L3GD20_AD_INT1_TSH_ZH ((uint8_t)0x36) -#define L3GD20_AD_INT1_TSH_ZL ((uint8_t)0x37) -#define L3GD20_AD_INT1_DURATION ((uint8_t)0x38) - -#define L3GD20_CTRL_REG4_FS ((uint8_t)0x30) +#define L3GD20_SENS_250DPS ((float)0.00875f) +#define L3GD20_SENS_500DPS ((float)0.01750f) +#define L3GD20_SENS_2000DPS ((float)0.07000f) + +#define L3GD20_DI ((uint8_t)0xFF) +#define L3GD20_DI_0 ((uint8_t)0x01) +#define L3GD20_DI_1 ((uint8_t)0x02) +#define L3GD20_DI_2 ((uint8_t)0x04) +#define L3GD20_DI_3 ((uint8_t)0x08) +#define L3GD20_DI_4 ((uint8_t)0x10) +#define L3GD20_DI_5 ((uint8_t)0x20) +#define L3GD20_DI_6 ((uint8_t)0x40) +#define L3GD20_DI_7 ((uint8_t)0x80) + +#define L3GD20_AD ((uint8_t)0x3F) +#define L3GD20_AD_0 ((uint8_t)0x01) +#define L3GD20_AD_1 ((uint8_t)0x02) +#define L3GD20_AD_2 ((uint8_t)0x04) +#define L3GD20_AD_3 ((uint8_t)0x08) +#define L3GD20_AD_4 ((uint8_t)0x10) +#define L3GD20_AD_5 ((uint8_t)0x20) + +#define L3GD20_MS ((uint8_t)0x40) +#define L3GD20_RW ((uint8_t)0x80) + +#define L3GD20_AD_WHO_AM_I ((uint8_t)0x0F) +#define L3GD20_AD_CTRL_REG1 ((uint8_t)0x20) +#define L3GD20_AD_CTRL_REG2 ((uint8_t)0x21) +#define L3GD20_AD_CTRL_REG3 ((uint8_t)0x22) +#define L3GD20_AD_CTRL_REG4 ((uint8_t)0x23) +#define L3GD20_AD_CTRL_REG5 ((uint8_t)0x24) +#define L3GD20_AD_REFERENCE ((uint8_t)0x25) +#define L3GD20_AD_OUT_TEMP ((uint8_t)0x26) +#define L3GD20_AD_STATUS_REG ((uint8_t)0x27) +#define L3GD20_AD_OUT_X_L ((uint8_t)0x28) +#define L3GD20_AD_OUT_X_H ((uint8_t)0x29) +#define L3GD20_AD_OUT_Y_L ((uint8_t)0x2A) +#define L3GD20_AD_OUT_Y_H ((uint8_t)0x2B) +#define L3GD20_AD_OUT_Z_L ((uint8_t)0x2C) +#define L3GD20_AD_OUT_Z_H ((uint8_t)0x2D) +#define L3GD20_AD_FIFO_CTRL_REG ((uint8_t)0x2E) +#define L3GD20_AD_FIFO_SRC_REG ((uint8_t)0x2F) +#define L3GD20_AD_INT1_CFG ((uint8_t)0x30) +#define L3GD20_AD_INT1_SRC ((uint8_t)0x31) +#define L3GD20_AD_INT1_TSH_XH ((uint8_t)0x32) +#define L3GD20_AD_INT1_TSH_XL ((uint8_t)0x33) +#define L3GD20_AD_INT1_TSH_YH ((uint8_t)0x34) +#define L3GD20_AD_INT1_TSH_YL ((uint8_t)0x35) +#define L3GD20_AD_INT1_TSH_ZH ((uint8_t)0x36) +#define L3GD20_AD_INT1_TSH_ZL ((uint8_t)0x37) +#define L3GD20_AD_INT1_DURATION ((uint8_t)0x38) + +#define L3GD20_CTRL_REG4_FS ((uint8_t)0x30) /*===========================================================================*/ /* Driver exported variables. */ @@ -101,8 +101,8 @@ * @brief L3GD20 Power Mode */ typedef enum { - L3GD20_PM_POWER_DOWN = 0x00, - L3GD20_PM_SLEEP_NORMAL = 0x08 + L3GD20_PM_POWER_DOWN = 0x00, /**< Power down enabled. */ + L3GD20_PM_SLEEP_NORMAL = 0x08 /**< Normal operation mode. */ }l3gd20_pm_t; /*===========================================================================*/ @@ -183,7 +183,6 @@ static void l3gd20SPIWriteRegister(SPIDriver *spip, uint8_t reg, /* * Interface implementation. */ - static size_t get_axes_number(void *ip) { osalDbgCheck(ip != NULL); @@ -229,7 +228,6 @@ static msg_t read_raw(void *ip, int32_t axes[L3GD20_NUMBER_OF_AXES]) { return MSG_OK; } - static msg_t read_cooked(void *ip, float axes[]) { uint32_t i; int32_t raw[L3GD20_NUMBER_OF_AXES]; @@ -289,6 +287,7 @@ static const struct L3GD20VMT vmt = { get_axes_number, read_raw, read_cooked, reset_calibration, calibrate }; + /*===========================================================================*/ /* Driver exported functions. */ /*===========================================================================*/ @@ -384,5 +383,4 @@ void l3gd20Stop(L3GD20Driver *devp) { #endif /* L3GD20_USE_SPI */ devp->state = L3GD20_STOP; } - /** @} */ diff --git a/os/ex/ST/l3gd20.h b/os/ex/ST/l3gd20.h index 39b5d7e48..8e02ccf03 100644 --- a/os/ex/ST/l3gd20.h +++ b/os/ex/ST/l3gd20.h @@ -37,7 +37,7 @@ /** * @brief L3GD20 number of axes. */ -#define L3GD20_NUMBER_OF_AXES ((size_t) 3U) +#define L3GD20_NUMBER_OF_AXES ((size_t) 3U) /*===========================================================================*/ /* Driver pre-compile time settings. */ @@ -53,7 +53,7 @@ * @note The default is @p TRUE. */ #if !defined(L3GD20_USE_SPI) || defined(__DOXYGEN__) -#define L3GD20_USE_SPI TRUE +#define L3GD20_USE_SPI TRUE #endif /** @@ -62,7 +62,7 @@ * @note The default is @p FALSE. */ #if !defined(L3GD20_USE_I2C) || defined(__DOXYGEN__) -#define L3GD20_USE_I2C FALSE +#define L3GD20_USE_I2C FALSE #endif /** @@ -71,7 +71,7 @@ * bias. A repetition is required in order to remove noise. */ #if !defined(L3GD20_BIAS_ACQ_TIMES) || defined(__DOXYGEN__) -#define L3GD20_BIAS_ACQ_TIMES 50 +#define L3GD20_BIAS_ACQ_TIMES 50 #endif /** @@ -79,7 +79,7 @@ * @details This is the time between each bias acquisition. */ #if !defined(L3GD20_BIAS_SETTLING_uS) || defined(__DOXYGEN__) -#define L3GD20_BIAS_SETTLING_uS 5000 +#define L3GD20_BIAS_SETTLING_uS 5000 #endif /** @} */ @@ -98,6 +98,7 @@ #if L3GD20_USE_I2C && !HAL_USE_I2C #error "L3GD20_USE_I2C requires HAL_USE_I2C" #endif + /*===========================================================================*/ /* Driver data structures and types. */ /*===========================================================================*/ |