Add ADXL345 accelerometer driver. From Alan Carvalho de Assis

This commit is contained in:
Gregory Nutt 2014-12-16 08:16:53 -06:00
parent 6655ca399a
commit ee9e8f0a20
3 changed files with 4 additions and 8 deletions

View File

@ -86,7 +86,7 @@ ifeq ($(CONFIG_NSH_LIBRARY),y)
CSRCS += kl_nsh.c
endif
ifeq ($(CONFIG_INPUT_ADXL345),y)
ifeq ($(CONFIG_SENSORS_ADXL345),y)
CSRCS += kl_adxl345.c
endif

View File

@ -57,11 +57,7 @@
****************************************************************************/
/* Configuration ************************************************************/
#ifdef CONFIG_INPUT_ADXL345
#ifndef CONFIG_INPUT
# error "ADXL345 support requires CONFIG_INPUT"
#endif
#ifdef CONFIG_SENSORS_ADXL345
#ifndef CONFIG_KL_SPI0
# error "ADXL345 support requires CONFIG_KL_SPI0"
#endif
@ -286,4 +282,4 @@ int adxl345_archinitialize(int minor)
return OK;
}
#endif /* CONFIG_INPUT_ADXL345 */
#endif /* CONFIG_SENSORS_ADXL345 */

View File

@ -70,7 +70,7 @@
int nsh_archinitialize(void)
{
#if defined(CONFIG_INPUT_ADXL345)
#if defined(CONFIG_SENSORS_ADXL345)
int ret;
ret = adxl345_archinitialize(0);