1
0
Fork 0
forked from nuttx/nuttx-update

Merged in raiden00/nuttx_h7/sensors (pull request #863)

Add some I2C devices to nucleo-h743zi and a few small fixes

configs/nucleo-h743zi: add support for ssd1306

configs/nucleo-h743zi: add support for pca9635

configs/nucleo-h743zi: add support for i2ctools

include/nuttx/sensors/lsm6dsl.h: remove whitespaces

configs/stm32f103-minimum/src/stm32_ssd1306.c: cosmetics

Documentation/NuttxPortingGuide.html: vsyslog return none

drivers/syslog/README.txt: vsyslog return none

Approved-by: Gregory Nutt <gnutt@nuttx.org>
This commit is contained in:
raiden00pl 2019-04-28 12:36:55 +00:00 committed by Gregory Nutt
parent 2b81d0dbb3
commit e1e1e0a8db
13 changed files with 678 additions and 130 deletions

View file

@ -6470,7 +6470,7 @@ int kbd_decode(FAR struct lib_instream_s *stream, FAR struct kbd_getstate_s *sta
<ul><pre>
#include &lt;syslog.h&gt;
int syslog(int priority, FAR const IPTR char *format, ...);
int vsyslog(int priority, FAR const IPTR char *src, va_list ap);
void vsyslog(int priority, FAR const IPTR char *src, va_list ap);
</pre></ul>
<p><b>Description:</b>
<code>syslog()</code> generates a log message. The priority argument is formed by ORing the facility and the level values (see <code>include/syslog.h</code>). The remaining arguments are a format, as in <code>printf()</code> and any arguments to the format.

View file

@ -321,10 +321,16 @@
#define GPIO_USART6_RX GPIO_USART6_RX_2 /* PG9 */
#define GPIO_USART6_TX GPIO_USART6_TX_2 /* PG14 */
/* I2C1 Use Nucleo I2C pins */
/* I2C1 Use Nucleo I2C1 pins */
#define GPIO_I2C1_SCL GPIO_I2C1_SCL_2 /* PB8 */
#define GPIO_I2C1_SDA GPIO_I2C1_SDA_2 /* PB9 */
#define GPIO_I2C1_SCL GPIO_I2C1_SCL_2 /* PB8 - D15 */
#define GPIO_I2C1_SDA GPIO_I2C1_SDA_2 /* PB9 - D14 */
/* I2C2 Use Nucleo I2C2 pins */
#define GPIO_I2C2_SCL GPIO_I2C2_SCL_2 /* PF1 - D69 */
#define GPIO_I2C2_SDA GPIO_I2C2_SDA_2 /* PF0 - D68 */
#define GPIO_I2C2_SMBA GPIO_I2C2_SMBA_2 /* PF2 - D70 */
/* SPI3 */

View file

@ -0,0 +1,76 @@
#
# This file is autogenerated: PLEASE DO NOT EDIT IT.
#
# You can use "make menuconfig" to make any modifications to the installed .config file.
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
# modifications.
#
# CONFIG_ARCH_FPU is not set
# CONFIG_EXAMPLES_NXLINES_DEFAULT_COLORS is not set
# CONFIG_NSH_DISABLE_IFCONFIG is not set
# CONFIG_NSH_DISABLE_PS is not set
# CONFIG_NX_DISABLE_1BPP is not set
# CONFIG_STANDARD_SERIAL is not set
CONFIG_ARCH="arm"
CONFIG_ARCH_BOARD="nucleo-h743zi"
CONFIG_ARCH_BOARD_NUCLEO_H743ZI=y
CONFIG_ARCH_CHIP_STM32H743ZI=y
CONFIG_ARCH_CHIP_STM32H7=y
CONFIG_ARCH_STACKDUMP=y
CONFIG_ARMV7M_DCACHE=y
CONFIG_ARMV7M_DCACHE_WRITETHROUGH=y
CONFIG_ARMV7M_DTCM=y
CONFIG_ARMV7M_ICACHE=y
CONFIG_BOARD_LOOPSPERMSEC=43103
CONFIG_BUILTIN=y
CONFIG_DEBUG_NOOPT=y
CONFIG_DISABLE_POLL=y
CONFIG_EXAMPLES_NXLINES=y
CONFIG_EXAMPLES_NXLINES_BORDERWIDTH=1
CONFIG_EXAMPLES_NXLINES_BPP=1
CONFIG_EXAMPLES_NXLINES_LINECOLOR=0xff
CONFIG_EXAMPLES_NXLINES_LINEWIDTH=1
CONFIG_EXPERIMENTAL=y
CONFIG_HAVE_CXX=y
CONFIG_HAVE_CXXINITIALIZE=y
CONFIG_INTELHEX_BINARY=y
CONFIG_LCD=y
CONFIG_LCD_MAXCONTRAST=255
CONFIG_LCD_SH1106_OLED_132=y
CONFIG_LCD_SSD1306_I2C=y
CONFIG_MAX_TASKS=16
CONFIG_MAX_WDOGPARMS=2
CONFIG_MM_REGIONS=3
CONFIG_MQ_MAXMSGSIZE=128
CONFIG_NFILE_DESCRIPTORS=8
CONFIG_NFILE_STREAMS=8
CONFIG_NSH_ARCHINIT=y
CONFIG_NSH_BUILTIN_APPS=y
CONFIG_NSH_FILEIOSIZE=512
CONFIG_NSH_LINELEN=64
CONFIG_NSH_READLINE=y
CONFIG_NX=y
CONFIG_NXFONTS_DISABLE_1BPP=y
CONFIG_NXFONT_MONO5X8=y
CONFIG_NX_BLOCKING=y
CONFIG_PREALLOC_MQ_MSGS=4
CONFIG_PREALLOC_TIMERS=4
CONFIG_PREALLOC_WDOGS=4
CONFIG_RAM_SIZE=245760
CONFIG_RAM_START=0x20010000
CONFIG_RAW_BINARY=y
CONFIG_RR_INTERVAL=200
CONFIG_SCHED_WAITPID=y
CONFIG_SDCLONE_DISABLE=y
CONFIG_START_DAY=6
CONFIG_START_MONTH=12
CONFIG_START_YEAR=2011
CONFIG_STM32H7_I2C2=y
CONFIG_STM32H7_USART3=y
CONFIG_SYSLOG_NONE=y
CONFIG_SYSTEM_NSH=y
CONFIG_SYSTEM_NSH_CXXINITIALIZE=y
CONFIG_TASK_NAME_SIZE=0
CONFIG_USART3_SERIAL_CONSOLE=y
CONFIG_USER_ENTRYPOINT="nsh_main"
CONFIG_WDOG_INTRESERVE=0

View file

@ -60,10 +60,22 @@ ifeq ($(CONFIG_SENSORS_LSM6DSL),y)
CSRCS += stm32_lsm6dsl.c
endif
ifeq ($(CONFIG_SENSORS_LSM9DS1),y)
CSRCS += stm32_lsm9ds1.c
endif
ifeq ($(CONFIG_SENSORS_LSM303AGR),y)
CSRCS += stm32_lsm303agr.c
endif
ifeq ($(CONFIG_PCA9635PW),y)
CSRCS += stm32_pca9635.c
endif
ifeq ($(CONFIG_LCD_SSD1306),y)
CSRCS += stm32_ssd1306.c
endif
ifeq ($(CONFIG_LIB_BOARDCTL),y)
CSRCS += stm32_appinitialize.c
endif

View file

@ -133,6 +133,19 @@
GPIO_OUTPUT_CLEAR | GPIO_PORTF | GPIO_PIN12)
#define GPIO_NRF24L01_IRQ (GPIO_INPUT | GPIO_FLOAT | GPIO_PORTD | GPIO_PIN15)
/* LMS9DS1 configuration */
#define LMS9DS1_I2CBUS 1
/* PCA9635 configuration */
#define PCA9635_I2CBUS 1
#define PCA9635_I2CADDR 0x40
/* Oled configuration */
#define OLED_I2C_PORT 2
/************************************************************************************
* Public Functions
************************************************************************************/
@ -225,4 +238,26 @@ int stm32_lsm303agr_initialize(char *devpath);
int stm32_wlinitialize(void);
#endif
/*****************************************************************************
* Name: stm32_lsm9ds1_initialize
*
* Description:
* Initialize I2C-based LSM9DS1.
****************************************************************************/
#ifdef CONFIG_SENSORS_LSM9DS1
int stm32_lsm9ds1_initialize(char *devpath);
#endif
/****************************************************************************
* Name: stm32_pca9635_initialize
*
* Description:
* Initialize I2C-based PCA9635PW LED driver.
****************************************************************************/
#ifdef CONFIG_PCA9635PW
int stm32_pca9635_initialize(void);
#endif
#endif /* __CONFIGS_NUCLEO_H743ZI_SRC_NUCLEO_H743ZI_H */

View file

@ -50,6 +50,68 @@
# include <nuttx/input/buttons.h>
#endif
/****************************************************************************
* Private Functions
****************************************************************************/
/****************************************************************************
* Name: stm32_i2c_register
*
* Description:
* Register one I2C drivers for the I2C tool.
*
****************************************************************************/
#if defined(CONFIG_I2C) && defined(CONFIG_SYSTEM_I2CTOOL)
static void stm32_i2c_register(int bus)
{
FAR struct i2c_master_s *i2c;
int ret;
i2c = stm32_i2cbus_initialize(bus);
if (i2c == NULL)
{
syslog(LOG_ERR, "ERROR: Failed to get I2C%d interface\n", bus);
}
else
{
ret = i2c_register(i2c, bus);
if (ret < 0)
{
syslog(LOG_ERR, "ERROR: Failed to register I2C%d driver: %d\n",
bus, ret);
stm32_i2cbus_uninitialize(i2c);
}
}
}
#endif
/****************************************************************************
* Name: stm32_i2ctool
*
* Description:
* Register I2C drivers for the I2C tool.
*
****************************************************************************/
#if defined(CONFIG_I2C) && defined(CONFIG_SYSTEM_I2CTOOL)
static void stm32_i2ctool(void)
{
#ifdef CONFIG_STM32H7_I2C1
stm32_i2c_register(1);
#endif
#ifdef CONFIG_STM32H7_I2C2
stm32_i2c_register(2);
#endif
#ifdef CONFIG_STM32H7_I2C3
stm32_i2c_register(3);
#endif
#ifdef CONFIG_STM32H7_I2C4
stm32_i2c_register(4);
#endif
}
#endif
/****************************************************************************
* Public Functions
****************************************************************************/
@ -74,6 +136,10 @@ int stm32_bringup(void)
UNUSED(ret);
#if defined(CONFIG_I2C) && defined(CONFIG_SYSTEM_I2CTOOL)
stm32_i2ctool();
#endif
#ifdef CONFIG_FS_PROCFS
#ifdef CONFIG_STM32_CCM_PROCFS
/* Register the CCM procfs entry. This must be done before the procfs is
@ -122,6 +188,14 @@ int stm32_bringup(void)
}
#endif /* CONFIG_SENSORS_LSM6DSL */
#ifdef CONFIG_SENSORS_LSM9DS1
ret = stm32_lsm9ds1_initialize();
if (ret < 0)
{
syslog(LOG_ERR, "ERROR: Failed to initialize LSM9DS1 driver: %d\n", ret);
}
#endif /* CONFIG_SENSORS_LSM6DSL */
#ifdef CONFIG_SENSORS_LSM303AGR
ret = stm32_lsm303agr_initialize("/dev/lsm303mag0");
if (ret < 0)
@ -130,6 +204,16 @@ int stm32_bringup(void)
}
#endif /* CONFIG_SENSORS_LSM303AGR */
#ifdef CONFIG_PCA9635PW
/* Initialize the PCA9635 chip */
ret = stm32_pca9635_initialize();
if (ret < 0)
{
syslog(LOG_ERR, "ERROR: stm32_pca9635_initialize failed: %d\n", ret);
}
#endif
#ifdef CONFIG_WL_NRF24L01
ret = stm32_wlinitialize();
if (ret < 0)

View file

@ -86,7 +86,7 @@ int stm32_lsm6dsl_initialize(char *devpath)
sninfo("INFO: Initializing LMS6DSL accelero-gyro sensor over I2C%d\n", ret);
ret = lsm6dsl_sensor_register("/dev/lsm6dsl0", i2c, LSM6DSLACCEL_ADDR1);
ret = lsm6dsl_sensor_register(devpath, i2c, LSM6DSLACCEL_ADDR1);
if (ret < 0)
{
snerr("ERROR: Failed to initialize LMS6DSL accelero-gyro driver %s\n", devpath);

View file

@ -0,0 +1,114 @@
/*****************************************************************************
* configs/nucleo-h743zi/src/stm32_lsm9ds1.c
*
* Copyright (C) 2019 Greg Nutt. All rights reserved.
* Author: Mateusz Szafoni <raiden00@railab.me>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
****************************************************************************/
/*****************************************************************************
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#include <nuttx/arch.h>
#include <errno.h>
#include <debug.h>
#include <nuttx/board.h>
#include "stm32.h"
#include <nucleo-h743zi.h>
#include <nuttx/sensors/lsm9ds1.h>
/*****************************************************************************
* Pre-processor Definitions
****************************************************************************/
#ifndef CONFIG_STM32H7_I2C1
# error "LSM9DS1 driver requires CONFIG_STM32H7_I2C1 to be enabled"
#endif
#define LSM9DS1MAG_DEVPATH "/dev/lsm9ds1mag0"
#define LSM9DS1ACC_DEVPATH "/dev/lsm9ds1acc0"
#define LSM9DS1GYR_DEVPATH "/dev/lsm9ds1gyr0"
/*****************************************************************************
* Public Functions
****************************************************************************/
/*****************************************************************************
* Name: stm32_lsm9ds1_initialize
*
* Description:
* Initialize I2C-based LSM9DS1.
****************************************************************************/
int stm32_lsm9ds1_initialize(void)
{
FAR struct i2c_master_s *i2c;
int ret = OK;
sninfo("Initializing LMS9DS1!\n");
#if defined(CONFIG_STM32H7_I2C1)
i2c = stm32_i2cbus_initialize(LMS9DS1_I2CBUS);
if (i2c == NULL)
{
return -ENODEV;
}
sninfo("INFO: Initializing LMS9DS1 9DoF sensor over I2C%d\n", LMS9DS1_I2CBUS);
ret = lsm9ds1mag_register(LSM9DS1MAG_DEVPATH, i2c, LSM9DS1MAG_ADDR1);
if (ret < 0)
{
snerr("ERROR: Failed to initialize LMS9DS1 mag driver %s\n", LSM9DS1MAG_DEVPATH);
return -ENODEV;
}
ret = lsm9ds1gyro_register(LSM9DS1GYR_DEVPATH, i2c, LSM9DS1GYRO_ADDR1);
if (ret < 0)
{
snerr("ERROR: Failed to initialize LMS9DS1 gyro driver %s\n", LSM9DS1MAG_DEVPATH);
return -ENODEV;
}
ret = lsm9ds1accel_register(LSM9DS1ACC_DEVPATH, i2c, LSM9DS1ACCEL_ADDR1);
if (ret < 0)
{
snerr("ERROR: Failed to initialize LMS9DS1 accel driver %s\n", LSM9DS1MAG_DEVPATH);
return -ENODEV;
}
sninfo("INFO: LMS9DS1 sensor has been initialized successfully\n");
#endif
return ret;
}

View file

@ -0,0 +1,98 @@
/************************************************************************************
* configs/nucleo-h743zi/src/stm32_pca9635.c
*
* Copyright (C) 2019 Gregory Nutt. All rights reserved.
* Author: Mateusz Szafoni <raiden00@railab.me>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
************************************************************************************/
/****************************************************************************
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#include <stdbool.h>
#include <stdio.h>
#include <debug.h>
#include <errno.h>
#include <nuttx/i2c/i2c_master.h>
#include <nuttx/leds/pca9635pw.h>
#include <arch/irq.h>
#include "stm32.h"
#include "nucleo-h743zi.h"
/****************************************************************************
* Public Functions
****************************************************************************/
/****************************************************************************
* Name: stm32_pca9635_initialize
*
* Description:
* This function is called by board initialization logic to configure the
* LED PWM chip. This function will register the driver as /dev/leddrv0.
*
* Input Parameters:
* None
*
* Returned Value:
* Zero is returned on success. Otherwise, a negated errno value is
* returned to indicate the nature of the failure.
*
****************************************************************************/
int stm32_pca9635_initialize(void)
{
FAR struct i2c_master_s *i2c;
int ret;
/* Get the I2C driver that interfaces with the pca9635 */
i2c = stm32_i2cbus_initialize(PCA9635_I2CBUS);
if (!i2c)
{
_err("ERROR: Failed to initialize I2C%d\n", PCA9635_I2CBUS);
return -1;
}
ret = pca9635pw_register("/dev/leddrv0", i2c, PCA9635_I2CADDR);
if (ret < 0)
{
snerr("ERROR: Failed to register PCA9635 driver: %d\n", ret);
return ret;
}
return OK;
}

View file

@ -0,0 +1,123 @@
/****************************************************************************
* config/nucleo-h743zi/src/stm32_ssd1306.c
*
* Copyright (C) 2019 Gregory Nutt. All rights reserved.
* Author: Mateusz Szafoni <raiden00@railab.me>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/
/****************************************************************************
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#include <debug.h>
#include <nuttx/board.h>
#include <nuttx/lcd/lcd.h>
#include <nuttx/lcd/ssd1306.h>
#include <nuttx/i2c/i2c_master.h>
#include "stm32.h"
#include "nucleo-h743zi.h"
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/* Configuration ************************************************************/
#ifndef CONFIG_LCD_MAXPOWER
# define CONFIG_LCD_MAXPOWER 1
#endif
/****************************************************************************
* Private Data
****************************************************************************/
FAR struct i2c_master_s *g_i2c;
FAR struct lcd_dev_s *g_lcddev;
/****************************************************************************
* Public Functions
****************************************************************************/
/****************************************************************************
* Name: board_lcd_initialize
****************************************************************************/
int board_lcd_initialize(void)
{
/* Initialize I2C */
g_i2c = stm32_i2cbus_initialize(OLED_I2C_PORT);
if (!g_i2c)
{
lcderr("ERROR: Failed to initialize I2C port %d\n", OLED_I2C_PORT);
return -ENODEV;
}
return OK;
}
/****************************************************************************
* Name: board_lcd_getdev
****************************************************************************/
FAR struct lcd_dev_s *board_lcd_getdev(int devno)
{
/* Bind the I2C port to the OLED */
g_lcddev = ssd1306_initialize(g_i2c, NULL, devno);
if (!g_lcddev)
{
lcderr("ERROR: Failed to bind I2C port 1 to OLED %d: %d\n", devno);
}
else
{
lcdinfo("Bound I2C port %d to OLED %d\n", OLED_I2C_PORT, devno);
/* And turn the OLED on */
(void)g_lcddev->setpower(g_lcddev, CONFIG_LCD_MAXPOWER);
return g_lcddev;
}
return NULL;
}
/****************************************************************************
* Name: board_lcd_uninitialize
****************************************************************************/
void board_lcd_uninitialize(void)
{
/* TO-FIX */
}

View file

@ -1,5 +1,5 @@
/****************************************************************************
* config/stm32f103-minimum/src/sam_ug2832hsweg04.c
* config/stm32f103-minimum/src/stm32_ssd1306.c
*
* Copyright (C) 2014 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@ -105,7 +105,7 @@ FAR struct lcd_dev_s *board_lcd_getdev(int devno)
g_lcddev = ssd1306_initialize(g_i2c, NULL, devno);
if (!g_lcddev)
{
lcderr("ERROR: Failed to bind SPI port 1 to OLED %d: %d\n", devno);
lcderr("ERROR: Failed to bind I2C port 1 to OLED %d: %d\n", devno);
}
else
{

View file

@ -16,7 +16,7 @@ SYSLOG Interfaces
Prototypes:
int syslog(int priority, FAR const IPTR char *format, ...);
int vsyslog(int priority, FAR const IPTR char *src, va_list ap);
void vsyslog(int priority, FAR const IPTR char *src, va_list ap);
Description:

View file

@ -221,10 +221,10 @@ functions (r/w). */
#define LSM6DSL_SENSOR_SYNC_RES_RATIO_SHIFT 0
#define LSM6DSL_SENSOR_SYNC_RES_RATIO_MASK (3 << LSM6DSL_SENSOR_SYNC_RES_RATIO_SHIFT)
#define LSM6DSL_SENSOR_SYNC_RES_RATIO_RR_2_11 (0 << LSM6DSL_SENSOR_SYNC_RES_RATIO_SHIFT)
#define LSM6DSL_SENSOR_SYNC_RES_RATIO_RR_2_12 (1 << LSM6DSL_SENSOR_SYNC_RES_RATIO_SHIFT)
#define LSM6DSL_SENSOR_SYNC_RES_RATIO_RR_2_13 (2 << LSM6DSL_SENSOR_SYNC_RES_RATIO_SHIFT)
#define LSM6DSL_SENSOR_SYNC_RES_RATIO_RR_2_14 (3 << LSM6DSL_SENSOR_SYNC_RES_RATIO_SHIFT)
#define LSM6DSL_SENSOR_SYNC_RES_RATIO_RR_2_11 (0 << LSM6DSL_SENSOR_SYNC_RES_RATIO_SHIFT)
#define LSM6DSL_SENSOR_SYNC_RES_RATIO_RR_2_12 (1 << LSM6DSL_SENSOR_SYNC_RES_RATIO_SHIFT)
#define LSM6DSL_SENSOR_SYNC_RES_RATIO_RR_2_13 (2 << LSM6DSL_SENSOR_SYNC_RES_RATIO_SHIFT)
#define LSM6DSL_SENSOR_SYNC_RES_RATIO_RR_2_14 (3 << LSM6DSL_SENSOR_SYNC_RES_RATIO_SHIFT)
#define LSM6DSL_FIFO_CTRL1_SHIFT 0
#define LSM6DSL_FIFO_CTRL1_MASK (255 << LSM6DSL_FIFO_CTRL1_SHIFT)
@ -289,14 +289,14 @@ functions (r/w). */
#define LSM6DSL_CTRL1_XL_LPF1_BW_SEL (1 << 1)
#define LSM6DSL_CTRL1_XL_FS_XL_SHIFT 2
#define LSM6DSL_CTRL1_XL_FS_XL_MASK (3 << LSM6DSL_CTRL1_XL_FS_XL_SHIFT)
#define LSM6DSL_CTRL1_XL_FS_XL_2G (0 << LSM6DSL_CTRL1_XL_FS_XL_SHIFT)
#define LSM6DSL_CTRL1_XL_FS_XL_16G (1 << LSM6DSL_CTRL1_XL_FS_XL_SHIFT)
#define LSM6DSL_CTRL1_XL_FS_XL_4G (2 << LSM6DSL_CTRL1_XL_FS_XL_SHIFT)
#define LSM6DSL_CTRL1_XL_FS_XL_8G (3 << LSM6DSL_CTRL1_XL_FS_XL_SHIFT)
#define LSM6DSL_CTRL1_XL_FS_XL_2G (0 << LSM6DSL_CTRL1_XL_FS_XL_SHIFT)
#define LSM6DSL_CTRL1_XL_FS_XL_16G (1 << LSM6DSL_CTRL1_XL_FS_XL_SHIFT)
#define LSM6DSL_CTRL1_XL_FS_XL_4G (2 << LSM6DSL_CTRL1_XL_FS_XL_SHIFT)
#define LSM6DSL_CTRL1_XL_FS_XL_8G (3 << LSM6DSL_CTRL1_XL_FS_XL_SHIFT)
#define LSM6DSL_CTRL1_XL_ODR_XL_SHIFT 4
#define LSM6DSL_CTRL1_XL_ODR_XL_MASK (15 << LSM6DSL_CTRL1_XL_ODR_XL_SHIFT)
#define LSM6DSL_CTRL1_XL_ODR_XL_POWER_DOWN (0 << LSM6DSL_CTRL1_XL_ODR_XL_SHIFT)
#define LSM6DSL_CTRL1_XL_ODR_XL_POWER_DOWN (0 << LSM6DSL_CTRL1_XL_ODR_XL_SHIFT)
#define LSM6DSL_CTRL1_XL_ODR_XL_1_6HZ_12_5HZ (11 << LSM6DSL_CTRL1_XL_ODR_XL_SHIFT)
#define LSM6DSL_CTRL1_XL_ODR_XL_12_5HZ_12_5HZ (1 << LSM6DSL_CTRL1_XL_ODR_XL_SHIFT)
#define LSM6DSL_CTRL1_XL_ODR_XL_26HZ_26HZ (2 << LSM6DSL_CTRL1_XL_ODR_XL_SHIFT)
@ -313,14 +313,14 @@ functions (r/w). */
#define LSM6DSL_CTRL2_G_FS_125 (1 << 1)
#define LSM6DSL_CTRL2_G_FS_G_SHIFT 2
#define LSM6DSL_CTRL2_G_FS_G_MASK (3 << LSM6DSL_CTRL2_G_FS_G_SHIFT)
#define LSM6DSL_CTRL2_G_FS_G_250DPS (0 << LSM6DSL_CTRL2_G_FS_G_SHIFT)
#define LSM6DSL_CTRL2_G_FS_G_500DPS (1 << LSM6DSL_CTRL2_G_FS_G_SHIFT)
#define LSM6DSL_CTRL2_G_FS_G_1000DPS (2 << LSM6DSL_CTRL2_G_FS_G_SHIFT)
#define LSM6DSL_CTRL2_G_FS_G_2000DPS (3 << LSM6DSL_CTRL2_G_FS_G_SHIFT)
#define LSM6DSL_CTRL2_G_FS_G_250DPS (0 << LSM6DSL_CTRL2_G_FS_G_SHIFT)
#define LSM6DSL_CTRL2_G_FS_G_500DPS (1 << LSM6DSL_CTRL2_G_FS_G_SHIFT)
#define LSM6DSL_CTRL2_G_FS_G_1000DPS (2 << LSM6DSL_CTRL2_G_FS_G_SHIFT)
#define LSM6DSL_CTRL2_G_FS_G_2000DPS (3 << LSM6DSL_CTRL2_G_FS_G_SHIFT)
#define LSM6DSL_CTRL2_G_ODR_G_SHIFT 4
#define LSM6DSL_CTRL2_G_ODR_G_MASK (15 << LSM6DSL_CTRL2_G_ODR_G_SHIFT)
#define LSM6DSL_CTRL2_G_ODR_G_POWER_DOWN (0 << LSM6DSL_CTRL2_G_ODR_G_SHIFT)
#define LSM6DSL_CTRL2_G_ODR_G_POWER_DOWN (0 << LSM6DSL_CTRL2_G_ODR_G_SHIFT)
#define LSM6DSL_CTRL2_G_ODR_G_1_6HZ_12_5HZ (11 << LSM6DSL_CTRL2_G_ODR_G_SHIFT)
#define LSM6DSL_CTRL2_G_ODR_G_12_5HZ_12_5HZ (1 << LSM6DSL_CTRL2_G_ODR_G_SHIFT)
#define LSM6DSL_CTRL2_G_ODR_G_26HZ_26HZ (2 << LSM6DSL_CTRL2_G_ODR_G_SHIFT)
@ -333,7 +333,7 @@ functions (r/w). */
#define LSM6DSL_CTRL2_G_ODR_G_3_3kHz_3_3kHZ (9 << LSM6DSL_CTRL2_G_ODR_G_SHIFT)
#define LSM6DSL_CTRL2_G_ODR_G_6_6kHZ_6_6kHZ (10 << LSM6DSL_CTRL2_G_ODR_G_SHIFT)
#define LSM6DSL_CTRL3_C_SHIFT 0
#define LSM6DSL_CTRL3_C_SHIFT 0
#define LSM6DSL_CTRL3_C_MASK (0 << LSM6DSL_CTRL3_C_SHIFT)
#define LSM6DSL_CTRL3_C_SW_RESET (1 << 0)
#define LSM6DSL_CTRL3_C_BLE (1 << 1)
@ -439,139 +439,139 @@ functions (r/w). */
#define LSM6DSL_CTRL5_C_SHIFT 0
#define LSM6DSL_CTRL5_C_ST_XL_MASK (3 << LSM6DSL_CTRL5_C_SHIFT)
#define LSM6DSL_OUT_TEMP_L_TEMP_SHIFT 0
#define LSM6DSL_OUT_TEMP_L_TEMP_SHIFT 0
#define LSM6DSL_OUT_TEMP_L_TEMP_MASK (255 << LSM6DSL_OUT_TEMP_L_TEMP_SHIFT)
#define LSM6DSL_OUT_TEMP_H_TEMP_SHIFT 0
#define LSM6DSL_OUT_TEMP_H_TEMP_MASK (255 << LSM6DSL_OUT_TEMP_H_TEMP_SHIFT)
#define LSM6DSL_OUTX_L_G_SHIFT 0
#define LSM6DSL_OUTX_L_G_SHIFT 0
#define LSM6DSL_OUTX_L_G_MASK (255 << LSM6DSL_OUTX_L_G_SHIFT)
#define LSM6DSL_OUTX_H_G_SHIFT 0
#define LSM6DSL_OUTX_H_G_SHIFT 0
#define LSM6DSL_OUTX_H_G_MASK (255 << LSM6DSL_OUTX_H_G_SHIFT)
#define LSM6DSL_OUTY_L_G_SHIFT 0
#define LSM6DSL_OUTY_L_G_SHIFT 0
#define LSM6DSL_OUTY_L_G_MASK (255 << LSM6DSL_OUTY_L_G_SHIFT)
#define LSM6DSL_OUTY_H_G_SHIFT 0
#define LSM6DSL_OUTY_H_G_SHIFT 0
#define LSM6DSL_OUTY_H_G_MASK (255 << LSM6DSL_OUTY_H_G_SHIFT)
#define LSM6DSL_OUTZ_L_G_SHIFT 0
#define LSM6DSL_OUTZ_L_G_SHIFT 0
#define LSM6DSL_OUTZ_L_G_MASK (255 << LSM6DSL_OUTZ_L_G_SHIFT)
#define LSM6DSL_OUTZ_H_G_SHIFT 0
#define LSM6DSL_OUTZ_H_G_SHIFT 0
#define LSM6DSL_OUTZ_H_G_MASK (255 << LSM6DSL_OUTZ_H_G_SHIFT)
#define LSM6DSL_OUTX_L_XL_SHIFT 0
#define LSM6DSL_OUTX_L_XL_SHIFT 0
#define LSM6DSL_OUTX_L_XL_MASK (255 << LSM6DSL_OUTX_L_XL_SHIFT)
#define LSM6DSL_OUTX_H_XL_SHIFT 0
#define LSM6DSL_OUTX_H_XL_SHIFT 0
#define LSM6DSL_OUTX_H_XL_MASK (255 << LSM6DSL_OUTX_H_XL_SHIFT)
#define LSM6DSL_OUTY_L_XL_SHIFT 0
#define LSM6DSL_OUTY_L_XL_SHIFT 0
#define LSM6DSL_OUTY_L_XL_MASK (255 << LSM6DSL_OUTY_L_XL_SHIFT)
#define LSM6DSL_OUTY_H_XL_SHIFT 0
#define LSM6DSL_OUTY_H_XL_SHIFT 0
#define LSM6DSL_OUTY_H_XL_MASK (255 << LSM6DSL_OUTY_H_XL_SHIFT)
#define LSM6DSL_OUTZ_L_XL_SHIFT 0
#define LSM6DSL_OUTZ_L_XL_SHIFT 0
#define LSM6DSL_OUTZ_L_XL_MASK (255 << LSM6DSL_OUTZ_L_XL_SHIFT)
#define LSM6DSL_OUTZ_H_XL_SHIFT 0
#define LSM6DSL_OUTZ_H_XL_SHIFT 0
#define LSM6DSL_OUTZ_H_XL_MASK (255 << LSM6DSL_OUTZ_H_XL_SHIFT)
#define LSM6DSL_SENSORHUB1_REG_SHIFT 0
#define LSM6DSL_SENSORHUB1_REG_SHIFT 0
#define LSM6DSL_SENSORHUB1_REG_MASK (255 << LSM6DSL_SENSORHUB1_REG_SHIFT)
#define LSM6DSL_SENSORHUB2_REG_SHIFT 0
#define LSM6DSL_SENSORHUB2_REG_SHIFT 0
#define LSM6DSL_SENSORHUB2_REG_MASK (255 << LSM6DSL_SENSORHUB2_REG_SHIFT)
#define LSM6DSL_SENSORHUB3_REG_SHIFT 0
#define LSM6DSL_SENSORHUB3_REG_SHIFT 0
#define LSM6DSL_SENSORHUB3_REG_MASK (255 << LSM6DSL_SENSORHUB3_REG_SHIFT)
#define LSM6DSL_SENSORHUB4_REG_SHIFT 0
#define LSM6DSL_SENSORHUB4_REG_SHIFT 0
#define LSM6DSL_SENSORHUB4_REG_MASK (255 << LSM6DSL_SENSORHUB4_REG_SHIFT)
#define LSM6DSL_SENSORHUB5_REG_SHIFT 0
#define LSM6DSL_SENSORHUB5_REG_SHIFT 0
#define LSM6DSL_SENSORHUB5_REG_MASK (255 << LSM6DSL_SENSORHUB5_REG_SHIFT)
#define LSM6DSL_SENSORHUB6_REG_SHIFT 0
#define LSM6DSL_SENSORHUB6_REG_SHIFT 0
#define LSM6DSL_SENSORHUB6_REG_MASK (255 << LSM6DSL_SENSORHUB6_REG_SHIFT)
#define LSM6DSL_SENSORHUB7_REG_SHIFT 0
#define LSM6DSL_SENSORHUB7_REG_SHIFT 0
#define LSM6DSL_SENSORHUB7_REG_MASK (255 << LSM6DSL_SENSORHUB7_REG_SHIFT)
#define LSM6DSL_SENSORHUB8_REG_SHIFT 0
#define LSM6DSL_SENSORHUB8_REG_SHIFT 0
#define LSM6DSL_SENSORHUB8_REG_MASK (255 << LSM6DSL_SENSORHUB8_REG_SHIFT)
#define LSM6DSL_SENSORHUB9_REG_SHIFT 0
#define LSM6DSL_SENSORHUB9_REG_SHIFT 0
#define LSM6DSL_SENSORHUB9_REG_MASK (255 << LSM6DSL_SENSORHUB9_REG_SHIFT)
#define LSM6DSL_SENSORHUB10_REG_SHIFT 0
#define LSM6DSL_SENSORHUB10_REG_SHIFT 0
#define LSM6DSL_SENSORHUB10_REG_MASK (255 << LSM6DSL_SENSORHUB10_REG_SHIFT)
#define LSM6DSL_SENSORHUB11_REG_SHIFT 0
#define LSM6DSL_SENSORHUB11_REG_SHIFT 0
#define LSM6DSL_SENSORHUB11_REG_MASK (255 << LSM6DSL_SENSORHUB11_REG_SHIFT)
#define LSM6DSL_SENSORHUB12_REG_SHIFT 0
#define LSM6DSL_SENSORHUB12_REG_SHIFT 0
#define LSM6DSL_SENSORHUB12_REG_MASK (255 << LSM6DSL_SENSORHUB12_REG_SHIFT)
#define LSM6DSL_FIFO_STATUS1_SHIFT 0
#define LSM6DSL_FIFO_STATUS1_SHIFT 0
#define LSM6DSL_FIFO_STATUS1_MASK (255 << LSM6DSL_FIFO_STATUS1_SHIFT)
#define LSM6DSL_FIFO_STATUS2_DIFF_FIFO_SHIFT 0
#define LSM6DSL_FIFO_STATUS2_DIFF_FIFO_SHIFT 0
#define LSM6DSL_FIFO_STATUS2_DIFF_FIFO_MASK (7 << LSM6DSL_FIFO_STATUS2_DIFF_FIFO_SHIFT)
#define LSM6DSL_FIFO_STATUS2_FIFO_EMPTY (1 << 1)
#define LSM6DSL_FIFO_STATUS2_FIFO_FULL_ART (1 << 1)
#define LSM6DSL_FIFO_STATUS2_OVER_RUN (1 << 2)
#define LSM6DSL_FIFO_STATUS2_WaterM (1 << 3)
#define LSM6DSL_FIFO_STATUS3_SHIFT 0
#define LSM6DSL_FIFO_STATUS3_SHIFT 0
#define LSM6DSL_FIFO_STATUS3_MASK (255 << LSM6DSL_FIFO_STATUS3_SHIFT)
#define LSM6DSL_FIFO_STATUS4_SHIFT 0
#define LSM6DSL_FIFO_STATUS4_SHIFT 0
#define LSM6DSL_FIFO_STATUS4_MASK (3 << LSM6DSL_FIFO_STATUS4_SHIFT)
#define LSM6DSL_FIFO_DATA_OUT_L_SHIFT 0
#define LSM6DSL_FIFO_DATA_OUT_L_SHIFT 0
#define LSM6DSL_FIFO_DATA_OUT_L_MASK (255 << LSM6DSL_FIFO_DATA_OUT_L_SHIFT)
#define LSM6DSL_FIFO_DATA_OUT_H_SHIFT 0
#define LSM6DSL_FIFO_DATA_OUT_H_SHIFT 0
#define LSM6DSL_FIFO_DATA_OUT_H_MASK (255 << LSM6DSL_FIFO_DATA_OUT_H_SHIFT)
#define LSM6DSL_TIMESTAMP0_REG_SHIFT 0
#define LSM6DSL_TIMESTAMP0_REG_SHIFT 0
#define LSM6DSL_TIMESTAMP0_REG_MASK (255 << LSM6DSL_TIMESTAMP0_REG_SHIFT)
#define LSM6DSL_TIMESTAMP1_REG_SHIFT 0
#define LSM6DSL_TIMESTAMP1_REG_SHIFT 0
#define LSM6DSL_TIMESTAMP1_REG_MASK (255 << LSM6DSL_TIMESTAMP1_REG_SHIFT)
#define LSM6DSL_TIMESTAMP2_REG_SHIFT 0
#define LSM6DSL_TIMESTAMP2_REG_SHIFT 0
#define LSM6DSL_TIMESTAMP2_REG_MASK (255 << LSM6DSL_TIMESTAMP2_REG_SHIFT)
#define LSM6DSL_STEP_TIMESTAMP_L_SHIFT 0
#define LSM6DSL_STEP_TIMESTAMP_L_SHIFT 0
#define LSM6DSL_STEP_TIMESTAMP_L_MASK (255 << LSM6DSL_STEP_TIMESTAMP_L_SHIFT)
#define LSM6DSL_STEP_TIMESTAMP_H_SHIFT 0
#define LSM6DSL_STEP_TIMESTAMP_H_SHIFT 0
#define LSM6DSL_STEP_TIMESTAMP_H_MASK (255 << LSM6DSL_STEP_TIMESTAMP_H_SHIFT)
#define LSM6DSL_STEP_COUNTER_L_SHIFT 0
#define LSM6DSL_STEP_COUNTER_L_SHIFT 0
#define LSM6DSL_STEP_COUNTER_L_MASK (255 << LSM6DSL_STEP_COUNTER_L_SHIFT)
#define LSM6DSL_SENSORHUB13_REG_SHIFT 0
#define LSM6DSL_SENSORHUB13_REG_SHIFT 0
#define LSM6DSL_SENSORHUB13_REG_MASK (255 << LSM6DSL_SENSORHUB13_REG_SHIFT)
#define LSM6DSL_SENSORHUB14_REG_SHIFT 0
#define LSM6DSL_SENSORHUB14_REG_SHIFT 0
#define LSM6DSL_SENSORHUB14_REG_MASK (255 << LSM6DSL_SENSORHUB14_REG_SHIFT)
#define LSM6DSL_SENSORHUB15_REG_SHIFT 0
#define LSM6DSL_SENSORHUB15_REG_SHIFT 0
#define LSM6DSL_SENSORHUB15_REG_MASK (255 << LSM6DSL_SENSORHUB15_REG_SHIFT)
#define LSM6DSL_SENSORHUB16_REG_SHIFT 0
#define LSM6DSL_SENSORHUB16_REG_SHIFT 0
#define LSM6DSL_SENSORHUB16_REG_MASK (255 << LSM6DSL_SENSORHUB16_REG_SHIFT)
#define LSM6DSL_SENSORHUB17_REG_SHIFT 0
#define LSM6DSL_SENSORHUB17_REG_SHIFT 0
#define LSM6DSL_SENSORHUB17_REG_MASK (255 << LSM6DSL_SENSORHUB17_REG_SHIFT)
#define LSM6DSL_SENSORHUB18_REG_SHIFT 0
#define LSM6DSL_SENSORHUB18_REG_SHIFT 0
#define LSM6DSL_SENSORHUB18_REG_MASK (255 << LSM6DSL_SENSORHUB18_REG_SHIFT)
#define LSM6DSL_FUNC_SRC1_SENSORHUB_END_OP (1 << 0)
@ -589,7 +589,7 @@ functions (r/w). */
#define LSM6DSL_FUNC_SRC2_SLAVE2_NACK (1 << 5)
#define LSM6DSL_FUNC_SRC2_SLAVE3_NACK (1 << 6)
#define LSM6DSL_WRIST_TILT_IA_SHIFT 2
#define LSM6DSL_WRIST_TILT_IA_SHIFT 2
#define LSM6DSL_WRIST_TILT_IA_MASK (63 << LSM6DSL_WRIST_TILT_IA_SHIFT)
#define LSM6DSL_TAP_CFG_LIR (1 << 0)
@ -597,13 +597,13 @@ functions (r/w). */
#define LSM6DSL_TAP_CFG_TAP_Y_EN (1 << 2)
#define LSM6DSL_TAP_CFG_TAP_X_EN (1 << 3)
#define LSM6DSL_TAP_CFG_SLOPE_FDS (1 << 4)
#define LSM6DSL_TAP_CFG_INACT_EN_SHIFT 2
#define LSM6DSL_TAP_CFG_INACT_EN_SHIFT 2
#define LSM6DSL_TAP_CFG_INACT_EN_MASK (3 << LSM6DSL_TAP_CFG_INACT_EN_SHIFT)
#define LSM6DSL_TAP_CFG_INTERRUPTS_ENABLE (1 << 7)
#define LSM6DSL_TAP_THS_6D_TAP_THS_SHIFT 0
#define LSM6DSL_TAP_THS_6D_TAP_THS_SHIFT 0
#define LSM6DSL_TAP_THS_6D_TAP_THS_MASK (31 << LSM6DSL_TAP_THS_6D_TAP_THS_SHIFT)
#define LSM6DSL_TAP_THS_6D_SIXD_THS_SHIFT 5
#define LSM6DSL_TAP_THS_6D_SIXD_THS_SHIFT 5
#define LSM6DSL_TAP_THS_6D_SIXD_THS_MASK (3 << LSM6DSL_TAP_THS_6D_SIXD_THS_SHIFT)
#define LSM6DSL_TAP_THS_6D_SIXD_THS_80DEGR (0 << LSM6DSL_TAP_THS_6D_SIXD_THS_SHIFT)
#define LSM6DSL_TAP_THS_6D_SIXD_THS_70DEGR (1 << LSM6DSL_TAP_THS_6D_SIXD_THS_SHIFT)
@ -611,27 +611,27 @@ functions (r/w). */
#define LSM6DSL_TAP_THS_6D_SIXD_THS_50DEGR (3 << LSM6DSL_TAP_THS_6D_SIXD_THS_SHIFT)
#define LSM6DSL_TAP_THS_6D_D4D_EN (1 << 7)
#define LSM6DSL_INT_DUR2_SHOCK_SHIFT 0
#define LSM6DSL_INT_DUR2_SHOCK_SHIFT 0
#define LSM6DSL_INT_DUR2_SHOCK_MASK (3 << LSM6DSL_INT_DUR2_SHOCK_SHIFT)
#define LSM6DSL_INT_DUR2_QUIET_SHIFT 2
#define LSM6DSL_INT_DUR2_QUIET_SHIFT 2
#define LSM6DSL_INT_DUR2_QUIET_MASK (3 << LSM6DSL_INT_DUR2_QUIET_SHIFT)
#define LSM6DSL_INT_DUR2_DUR_SHIFT 4
#define LSM6DSL_INT_DUR2_DUR_SHIFT 4
#define LSM6DSL_INT_DUR2_DUR_MASK (7 << LSM6DSL_INT_DUR2_QUIET_SHIFT)
#define LSM6DSL_WAKE_UP_THS_WK_THS_SHIFT 0
#define LSM6DSL_WAKE_UP_THS_WK_THS_SHIFT 0
#define LSM6DSL_WAKE_UP_THS_WK_THS_MASK (31 << LSM6DSL_WAKE_UP_THS_WK_THS_SHIFT)
#define LSM6DSL_WAKE_UP_THS_SINGLE_DOUBLE_TAP4D_EN (1 << 7)
#define LSM6DSL_WAKE_UP_DUR_SLEEP_DUR_SHIFT 0
#define LSM6DSL_WAKE_UP_DUR_SLEEP_DUR_SHIFT 0
#define LSM6DSL_WAKE_UP_DUR_SLEEP_DUR_MASK (15 << LSM6DSL_WAKE_UP_DUR_SLEEP_DUR_SHIFT)
#define LSM6DSL_WAKE_UP_DUR_TIMER_HR (1 << 4)
#define LSM6DSL_WAKE_UP_DUR_WAKE_DUR_SHIFT 5
#define LSM6DSL_WAKE_UP_DUR_WAKE_DUR_SHIFT 5
#define LSM6DSL_WAKE_UP_DUR_WAKE_DUR_MASK (15 << LSM6DSL_WAKE_UP_DUR_WAKE_DUR_SHIFT)
#define LSM6DSL_WAKE_UP_DUR_FF_DUR5 (1 << 7)
#define LSM6DSL_FREE_FALL_FF_THS_SHIFT 0
#define LSM6DSL_FREE_FALL_FF_THS_SHIFT 0
#define LSM6DSL_FREE_FALL_FF_THS_MASK (7 << LSM6DSL_FREE_FALL_FF_THS_SHIFT)
#define LSM6DSL_FREE_FALL_FF_DUR_SHIFT 4
#define LSM6DSL_FREE_FALL_FF_DUR_SHIFT 4
#define LSM6DSL_FREE_FALL_FF_DUR_MASK (31 << LSM6DSL_FREE_FALL_FF_DUR_SHIFT)
#define LSM6DSL_MD1_CFG_INT1_TIMER (1 << 0)
@ -652,165 +652,165 @@ functions (r/w). */
#define LSM6DSL_MD2_CFG_INT1_SINGLE_TAP (1 << 6)
#define LSM6DSL_MD2_CFG_INT1_INACT_STATE (1 << 7)
#define LSM6DSL_MASTER_CMD_CODE_SHIFT 0
#define LSM6DSL_MASTER_CMD_CODE_SHIFT 0
#define LSM6DSL_MASTER_CMD_CODE_MASK (255 << LSM6DSL_MASTER_CMD_CODE_SHIFT)
#define LSM6DSL_SENS_SYNC_SPI_ERROR_CODE_SHIFT 0
#define LSM6DSL_SENS_SYNC_SPI_ERROR_CODE_SHIFT 0
#define LSM6DSL_SENS_SYNC_SPI_ERROR_CODE_MASK (255 << LSM6DSL_SENS_SYNC_SPI_ERROR_CODE_SHIFT)
#define LSM6DSL_OUT_MAG_RAW_X_L_SHIFT 0
#define LSM6DSL_OUT_MAG_RAW_X_L_SHIFT 0
#define LSM6DSL_OUT_MAG_RAW_X_L_MASK (255 << LSM6DSL_OUT_MAG_RAW_X_L_SHIFT)
#define LSM6DSL_OUT_MAG_RAW_X_H_SHIFT 0
#define LSM6DSL_OUT_MAG_RAW_X_H_SHIFT 0
#define LSM6DSL_OUT_MAG_RAW_X_H_MASK (255 << LSM6DSL_OUT_MAG_RAW_X_H_SHIFT)
#define LSM6DSL_OUT_MAG_RAW_Y_L_SHIFT 0
#define LSM6DSL_OUT_MAG_RAW_Y_L_SHIFT 0
#define LSM6DSL_OUT_MAG_RAW_Y_L_MASK (255 << LSM6DSL_OUT_MAG_RAW_Y_L_SHIFT)
#define LSM6DSL_OUT_MAG_RAW_Y_H_SHIFT 0
#define LSM6DSL_OUT_MAG_RAW_Y_H_SHIFT 0
#define LSM6DSL_OUT_MAG_RAW_Y_H_MASK (255 << LSM6DSL_OUT_MAG_RAW_Y_H_SHIFT)
#define LSM6DSL_OUT_MAG_RAW_Z_L_SHIFT 0
#define LSM6DSL_OUT_MAG_RAW_Z_L_SHIFT 0
#define LSM6DSL_OUT_MAG_RAW_Z_L_MASK (255 << LSM6DSL_OUT_MAG_RAW_Z_L_SHIFT)
#define LSM6DSL_OUT_MAG_RAW_Z_H_SHIFT 0
#define LSM6DSL_OUT_MAG_RAW_Z_H_SHIFT 0
#define LSM6DSL_OUT_MAG_RAW_Z_H_MASK (255 << LSM6DSL_OUT_MAG_RAW_Z_H_SHIFT)
#define LSM6DSL_X_OFS_USR_SHIFT 0
#define LSM6DSL_X_OFS_USR_SHIFT 0
#define LSM6DSL_X_OFS_USR_MASK (255 << LSM6DSL_X_OFS_USR_SHIFT)
#define LSM6DSL_Y_OFS_USR_SHIFT 0
#define LSM6DSL_Y_OFS_USR_SHIFT 0
#define LSM6DSL_Y_OFS_USR_MASK (255 << LSM6DSL_Y_OFS_USR_SHIFT)
#define LSM6DSL_Z_OFS_USR_SHIFT 0
#define LSM6DSL_Z_OFS_USR_SHIFT 0
#define LSM6DSL_Z_OFS_USR_MASK (255 << LSM6DSL_Z_OFS_USR_SHIFT)
/* Embedded functions registers description - Bank A */
#define LSM6DSL_SLV0_ADD_rw_0 (1 << 0)
#define LSM6DSL_SLV0_ADD_Slave0_add_SHIFT 1
#define LSM6DSL_SLV0_ADD_Slave0_add_SHIFT 1
#define LSM6DSL_SLV0_ADD_Slave0_add_MASK (127 << LSM6DSL_SLV0_ADD_Slave0_add_SHIFT)
#define LSM6DSL_SLV0_SUBADD_SHIFT 0
#define LSM6DSL_SLV0_SUBADD_SHIFT 0
#define LSM6DSL_SLV0_SUBADD_MASK (255 << LSM6DSL_SLV0_SUBADD_SHIFT)
#define LSM6DSL_SLAVE0_CONFIG_Slave0_numop_SHIFT 0
#define LSM6DSL_SLAVE0_CONFIG_Slave0_numop_SHIFT 0
#define LSM6DSL_SLAVE0_CONFIG_Slave0_numop_MASK (7 << LSM6DSL_SLAVE0_CONFIG_Slave0_numop_SHIFT)
#define LSM6DSL_SLAVE0_CONFIG_Src_mode (1 << 3)
#define LSM6DSL_SLAVE0_CONFIG_Aux_sens_on_SHIFT 4
#define LSM6DSL_SLAVE0_CONFIG_Aux_sens_on_SHIFT 4
#define LSM6DSL_SLAVE0_CONFIG_Aux_sens_on_MASK (3 << LSM6DSL_SLAVE0_CONFIG_Aux_sens_on_SHIFT)
#define LSM6DSL_SLAVE0_CONFIG_Slave0_rate_SHIFT 6
#define LSM6DSL_SLAVE0_CONFIG_Slave0_rate_SHIFT 6
#define LSM6DSL_SLAVE0_CONFIG_Slave0_rate_MASK (3 << LSM6DSL_SLAVE0_CONFIG_Slave0_rate_SHIFT)
#define LSM6DSL_SLV1_ADD_r_1 (1 << 0)
#define LSM6DSL_SLV1_ADD_Slave1_add_SHIFT 1
#define LSM6DSL_SLV1_ADD_Slave1_add_SHIFT 1
#define LSM6DSL_SLV1_ADD_Slave1_add_MASK (127 << LSM6DSL_SLV1_ADD_Slave1_add_SHIFT)
#define LSM6DSL_SLV1_SUBADD_SHIFT 0
#define LSM6DSL_SLV1_SUBADD_SHIFT 0
#define LSM6DSL_SLV1_SUBADD_MASK (255 << LSM6DSL_SLV1_SUBADD_SHIFT)
#define LSM6DSL_SLAVE1_CONFIG_Slave1_numop_SHIFT 0
#define LSM6DSL_SLAVE1_CONFIG_Slave1_numop_SHIFT 0
#define LSM6DSL_SLAVE1_CONFIG_Slave1_numop_MASK (7 << LSM6DSL_SLAVE1_CONFIG_Slave1_numop_SHIFT)
#define LSM6DSL_SLAVE1_CONFIG_write_once (1 << 5)
#define LSM6DSL_SLAVE1_CONFIG_Slave1_rate_SHIFT 6
#define LSM6DSL_SLAVE1_CONFIG_Slave1_rate_SHIFT 6
#define LSM6DSL_SLAVE1_CONFIG_Slave1_rate_MASK (3 << LSM6DSL_SLAVE1_CONFIG_Slave1_rate_SHIFT)
#define LSM6DSL_SLV2_ADD_r_2 (1 << 0)
#define LSM6DSL_SLV2_ADD_Slave2_add_SHIFT 1
#define LSM6DSL_SLV2_ADD_Slave2_add_SHIFT 1
#define LSM6DSL_SLV2_ADD_Slave2_add_MASK (127 << LSM6DSL_SLV2_ADD_Slave2_add_SHIFT)
#define LSM6DSL_SLV2_SUBADD_SHIFT 0
#define LSM6DSL_SLV2_SUBADD_SHIFT 0
#define LSM6DSL_SLV2_SUBADD_MASK (255 << LSM6DSL_SLV2_SUBADD_SHIFT)
#define LSM6DSL_SLAVE2_CONFIG_Slave2_numop_SHIFT 0
#define LSM6DSL_SLAVE2_CONFIG_Slave2_numop_SHIFT 0
#define LSM6DSL_SLAVE2_CONFIG_Slave2_numop_MASK (7 << LSM6DSL_SLAVE1_CONFIG_Slave1_numop_SHIFT)
#define LSM6DSL_SLAVE2_CONFIG_Slave2_rate_SHIFT 6
#define LSM6DSL_SLAVE2_CONFIG_Slave2_rate_SHIFT 6
#define LSM6DSL_SLAVE2_CONFIG_Slave2_rate_MASK (3 << LSM6DSL_SLAVE1_CONFIG_Slave1_rate_SHIFT)
#define LSM6DSL_SLV3_ADD_r_3 (1 << 0)
#define LSM6DSL_SLV3_ADD_Slave3_add_SHIFT 1
#define LSM6DSL_SLV3_ADD_Slave3_add_SHIFT 1
#define LSM6DSL_SLV3_ADD_Slave3_add_MASK (127 << LSM6DSL_SLV3_ADD_Slave3_add_SHIFT)
#define LSM6DSL_SLV3_SUBADD_SHIFT 0
#define LSM6DSL_SLV3_SUBADD_SHIFT 0
#define LSM6DSL_SLV3_SUBADD_MASK (255 << LSM6DSL_SLV2_SUBADD_SHIFT)
#define LSM6DSL_SLAVE3_CONFIG_Slave3_numop_SHIFT 0
#define LSM6DSL_SLAVE3_CONFIG_Slave3_numop_SHIFT 0
#define LSM6DSL_SLAVE3_CONFIG_Slave3_numop_MASK (7 << LSM6DSL_SLAVE1_CONFIG_Slave1_numop_SHIFT)
#define LSM6DSL_SLAVE3_CONFIG_Slave3_rate_SHIFT 6
#define LSM6DSL_SLAVE3_CONFIG_Slave3_rate_SHIFT 6
#define LSM6DSL_SLAVE3_CONFIG_Slave3_rate_MASK (3 << LSM6DSL_SLAVE1_CONFIG_Slave1_rate_SHIFT)
#define LSM6DSL_DATAWRITE_SRC_MODE_SUB_SLV0_SHIFT 0
#define LSM6DSL_DATAWRITE_SRC_MODE_SUB_SLV0_SHIFT 0
#define LSM6DSL_DATAWRITE_SRC_MODE_SUB_SLV0_MASK (255 << LSM6DSL_DATAWRITE_SRC_MODE_SUB_SLV0_SHIFT)
#define LSM6DSL_CONFIG_PEDO_THS_MIN_ths_min_SHIFT 0
#define LSM6DSL_CONFIG_PEDO_THS_MIN_ths_min_SHIFT 0
#define LSM6DSL_CONFIG_PEDO_THS_MIN_ths_min_MASK (31 << LSM6DSL_CONFIG_PEDO_THS_MIN_ths_min_SHIFT)
#define LSM6DSL_CONFIG_PEDO_THS_MIN_PEDO_FS (1 << 7>
#define LSM6DSL_SM_THS_SHIFT 0
#define LSM6DSL_SM_THS_SHIFT 0
#define LSM6DSL_SM_THS_MASK (255 << LSM6DSL_SM_THS_SHIFT)
#define LSM6DSL_PEDO_DEB_REG_DEB_STEP_SHIFT 0
#define LSM6DSL_PEDO_DEB_REG_DEB_STEP_SHIFT 0
#define LSM6DSL_PEDO_DEB_REG_DEB_STEP_MASK (7 << LSM6DSL_PEDO_DEB_REG_DEB_STEP_SHIFT)
#define LSM6DSL_PEDO_DEB_REG_DEB_TIME_SHIFT 3
#define LSM6DSL_PEDO_DEB_REG_DEB_TIME_SHIFT 3
#define LSM6DSL_PEDO_DEB_REG_DEB_TIME_MASK (31 << LSM6DSL_PEDO_DEB_REG_DEB_TIME_SHIFT)
#define LSM6DSL_STEP_COUNT_DELTA_SHIFT 0
#define LSM6DSL_STEP_COUNT_DELTA_SHIFT 0
#define LSM6DSL_STEP_COUNT_DELTA_MASK (255 << LSM6DSL_STEP_COUNT_DELTA_SHIFT)
#define LSM6DSL_MAG_SI_XX_SHIFT 0
#define LSM6DSL_MAG_SI_XX_SHIFT 0
#define LSM6DSL_MAG_SI_XX_MASK (255 << LSM6DSL_MAG_SI_XX_SHIFT)
#define LSM6DSL_MAG_SI_XY_SHIFT 0
#define LSM6DSL_MAG_SI_XY_SHIFT 0
#define LSM6DSL_MAG_SI_XY_MASK (255 << LSM6DSL_MAG_SI_XY_SHIFT)
#define LSM6DSL_MAG_SI_XZ_SHIFT 0
#define LSM6DSL_MAG_SI_XZ_SHIFT 0
#define LSM6DSL_MAG_SI_XZ_MASK (255 << LSM6DSL_MAG_SI_XZ_SHIFT)
#define LSM6DSL_MAG_SI_YX_SHIFT 0
#define LSM6DSL_MAG_SI_YX_SHIFT 0
#define LSM6DSL_MAG_SI_YX_MASK (255 << LSM6DSL_MAG_SI_YX_SHIFT)
#define LSM6DSL_MAG_SI_YY_SHIFT 0
#define LSM6DSL_MAG_SI_YY_SHIFT 0
#define LSM6DSL_MAG_SI_YY_MASK (255 << LSM6DSL_MAG_SI_YY_SHIFT)
#define LSM6DSL_MAG_SI_YZ_SHIFT 0
#define LSM6DSL_MAG_SI_YZ_SHIFT 0
#define LSM6DSL_MAG_SI_YZ_MASK (255 << LSM6DSL_MAG_SI_YZ_SHIFT)
#define LSM6DSL_MAG_SI_ZX_SHIFT 0
#define LSM6DSL_MAG_SI_ZX_SHIFT 0
#define LSM6DSL_MAG_SI_ZX_MASK (255 << LSM6DSL_MAG_SI_ZX_SHIFT)
#define LSM6DSL_MAG_SI_ZY_SHIFT 0
#define LSM6DSL_MAG_SI_ZY_SHIFT 0
#define LSM6DSL_MAG_SI_ZY_MASK (255 << LSM6DSL_MAG_SI_ZY_SHIFT)
#define LSM6DSL_MAG_SI_ZZ_SHIFT 0
#define LSM6DSL_MAG_SI_ZZ_SHIFT 0
#define LSM6DSL_MAG_SI_ZZ_MASK (255 << LSM6DSL_MAG_SI_ZZ_SHIFT)
#define LSM6DSL_MAG_OFFX_L_SHIFT 0
#define LSM6DSL_MAG_OFFX_L_SHIFT 0
#define LSM6DSL_MAG_OFFX_L_MASK (255 << LSM6DSL_MAG_OFFX_L_SHIFT)
#define LSM6DSL_MAG_OFFX_H_SHIFT 0
#define LSM6DSL_MAG_OFFX_H_SHIFT 0
#define LSM6DSL_MAG_OFFX_H_MASK (255 << LSM6DSL_MAG_OFFX_H_SHIFT)
#define LSM6DSL_MAG_OFFY_L_SHIFT 0
#define LSM6DSL_MAG_OFFY_L_SHIFT 0
#define LSM6DSL_MAG_OFFY_L_MASK (255 << LSM6DSL_MAG_OFFY_L_SHIFT)
#define LSM6DSL_MAG_OFFY_H_SHIFT 0
#define LSM6DSL_MAG_OFFY_H_SHIFT 0
#define LSM6DSL_MAG_OFFY_H_MASK (255 << LSM6DSL_MAG_OFFY_H_SHIFT)
#define LSM6DSL_MAG_OFFZ_L_SHIFT 0
#define LSM6DSL_MAG_OFFZ_L_SHIFT 0
#define LSM6DSL_MAG_OFFZ_L_MASK (255 << LSM6DSL_MAG_OFFZ_L_SHIFT)
#define LSM6DSL_MAG_OFFZ_H_SHIFT 0
#define LSM6DSL_MAG_OFFZ_H_SHIFT 0
#define LSM6DSL_MAG_OFFZ_H_MASK (255 << LSM6DSL_MAG_OFFZ_H_SHIFT)
/* Embedded functions registers description - Bank B */
#define LSM6DSL_A_WRIST_TILT_LAT_SHIFT 0
#define LSM6DSL_A_WRIST_TILT_LAT_SHIFT 0
#define LSM6DSL_A_WRIST_TILT_LAT_MASK (255 << LSM6DSL_A_WRIST_TILT_LAT_SHIFT)
#define LSM6DSL_A_WRIST_TILT_THS_SHIFT 0
#define LSM6DSL_A_WRIST_TILT_THS_SHIFT 0
#define LSM6DSL_A_WRIST_TILT_THS_MASK (255 << LSM6DSL_A_WRIST_TILT_THS_SHIFT)
#define LSM6DSL_A_WRIST_TILT_Mask_SHIFT 2
#define LSM6DSL_A_WRIST_TILT_Mask_SHIFT 2
#define LSM6DSL_A_WRIST_TILT_Mask_MASK (63 << LSM6DSL_A_WRIST_TILT_Mask_SHIFT)
/****************************************************************************************************