diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-05-07 19:22:15 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-05-07 19:22:15 +0000 |
commit | ca700d2e3c06a80de37c5ef8383ca550fe20c750 (patch) | |
tree | d486856c6dafe9c6271b7808caaa4920bef63474 /nuttx/include/nuttx/sensors | |
parent | b238002998250df997560fac2b0f18550f998855 (diff) | |
download | nuttx-ca700d2e3c06a80de37c5ef8383ca550fe20c750.tar.gz nuttx-ca700d2e3c06a80de37c5ef8383ca550fe20c750.tar.bz2 nuttx-ca700d2e3c06a80de37c5ef8383ca550fe20c750.zip |
Mostly cosmetic changes from Uros
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3575 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/include/nuttx/sensors')
-rw-r--r-- | nuttx/include/nuttx/sensors/lis331dl.h (renamed from nuttx/include/nuttx/sensors/st_lis331dl.h) | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/nuttx/include/nuttx/sensors/st_lis331dl.h b/nuttx/include/nuttx/sensors/lis331dl.h index 404d4a480..2e83dbe1f 100644 --- a/nuttx/include/nuttx/sensors/st_lis331dl.h +++ b/nuttx/include/nuttx/sensors/lis331dl.h @@ -1,5 +1,5 @@ /**************************************************************************** - * include/nuttx/sensors/st_lis331dl.h + * include/nuttx/sensors/lis331dl.h * * Copyright (C) 2011 Uros Platise. All rights reserved. * @@ -39,8 +39,8 @@ * \brief ST LIS331DL I2C Device Driver **/ -#ifndef __INCLUDE_NUTTX_SENSORS_ST_LIS331DL_H -#define __INCLUDE_NUTTX_SENSORS_ST_LIS331DL_H +#ifndef __INCLUDE_NUTTX_SENSORS_LIS331DL_H +#define __INCLUDE_NUTTX_SENSORS_LIS331DL_H #include <nuttx/i2c.h> #include <stdbool.h> @@ -64,9 +64,9 @@ extern "C" { * Public Data Types ************************************************************************************/ -struct st_lis331dl_dev_s; +struct lis331dl_dev_s; -struct st_lis331dl_vector_s { +struct lis331dl_vector_s { int8_t x, y, z; }; @@ -86,21 +86,21 @@ struct st_lis331dl_vector_s { * - EFAULT: When there is no device at given address. * - EBUSY: When device is already addressed by other device driver (not yet supported by low-level driver) **/ -EXTERN struct st_lis331dl_dev_s * st_lis331dl_init(struct i2c_dev_s * i2c, uint16_t address); +EXTERN struct lis331dl_dev_s * lis331dl_init(struct i2c_dev_s * i2c, uint16_t address); /** Deinitialize ST LIS331DL Chip * - * \param dev Device to LIS331DL device structure, as returned by the st_lis331dl_init() + * \param dev Device to LIS331DL device structure, as returned by the lis331dl_init() * \return OK On success * **/ -EXTERN int st_lis331dl_deinit(struct st_lis331dl_dev_s * dev); +EXTERN int lis331dl_deinit(struct lis331dl_dev_s * dev); /** Power up device, start conversion */ -EXTERN int st_lis331dl_powerup(struct st_lis331dl_dev_s * dev); +EXTERN int lis331dl_powerup(struct lis331dl_dev_s * dev); /** Power down device, stop conversion */ -EXTERN int st_lis331dl_powerdown(struct st_lis331dl_dev_s * dev); +EXTERN int lis331dl_powerdown(struct lis331dl_dev_s * dev); /** Configure conversion * @@ -109,19 +109,19 @@ EXTERN int st_lis331dl_powerdown(struct st_lis331dl_dev_s * dev); * \param fast When set, conversion operates at 400 Hz, otherwise at 100 Hz * \return OK on success or errno is set **/ -EXTERN int st_lis331dl_setconversion(struct st_lis331dl_dev_s * dev, bool full, bool fast); +EXTERN int lis331dl_setconversion(struct lis331dl_dev_s * dev, bool full, bool fast); /** Get precision * * \return Precision of 1 LSB in terms of unit [mg] **/ -EXTERN int st_lis331dl_getprecision(struct st_lis331dl_dev_s * dev); +EXTERN int lis331dl_getprecision(struct lis331dl_dev_s * dev); /** Get sample rate * * \return Sample rate in unit of [Hz] **/ -EXTERN int st_lis331dl_getsamplerate(struct st_lis331dl_dev_s * dev); +EXTERN int lis331dl_getsamplerate(struct lis331dl_dev_s * dev); /** Get readings, updates internal data structure * @@ -130,8 +130,7 @@ EXTERN int st_lis331dl_getsamplerate(struct st_lis331dl_dev_s * dev); * If data is not yet ready to be read from the LIS331 then errno is set to EAGAIN otherwise * errno is set by I2C_TRANSFER(). */ -EXTERN const struct st_lis331dl_vector_s * st_lis331dl_getreadings(struct st_lis331dl_dev_s * dev); - +EXTERN const struct lis331dl_vector_s * lis331dl_getreadings(struct lis331dl_dev_s * dev); #undef EXTERN @@ -140,5 +139,4 @@ EXTERN const struct st_lis331dl_vector_s * st_lis331dl_getreadings(struct st_lis #endif #endif /* __ASSEMBLY__ */ -#endif /* __INCLUDE_NUTTX_SENSORS_ST_LIS331DL_H */ - +#endif /* __INCLUDE_NUTTX_SENSORS_LIS331DL_H */ |