1 Star 7 Fork 2

flyloong/NRF52832_LSM6DSL

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
LSM6DSL_ACC_GYRO_driver.h 114.49 KB
一键复制 编辑 原始数据 按行查看 历史
flyloong 提交于 2019-09-24 00:39 . first commit
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905
/**
******************************************************************************
* @file LSM6DSL_ACC_GYRO_driver.h
* @author MEMS Application Team
* @version V1.5
* @date 17-May-2016
* @brief LSM6DSL header driver file
******************************************************************************
* @attention
*
* <h2><center>&copy; COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
*
* 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 of STMicroelectronics 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 HOLDER 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.
*
******************************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __LSM6DSL_ACC_GYRO_DRIVER__H
#define __LSM6DSL_ACC_GYRO_DRIVER__H
/* Includes ------------------------------------------------------------------*/
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
/* Exported types ------------------------------------------------------------*/
//these could change accordingly with the architecture
#ifndef __ARCHDEP__TYPES
#define __ARCHDEP__TYPES
typedef unsigned char u8_t;
typedef unsigned short int u16_t;
typedef unsigned int u32_t;
typedef int i32_t;
typedef short int i16_t;
typedef signed char i8_t;
#endif /*__ARCHDEP__TYPES*/
/* Exported common structure --------------------------------------------------------*/
#ifndef __SHARED__TYPES
#define __SHARED__TYPES
typedef union
{
i16_t i16bit[3];
u8_t u8bit[6];
} Type3Axis16bit_U;
typedef union
{
i16_t i16bit;
u8_t u8bit[2];
} Type1Axis16bit_U;
typedef union
{
i32_t i32bit;
u8_t u8bit[4];
} Type1Axis32bit_U;
typedef enum
{
MEMS_SUCCESS = 0x01,
MEMS_ERROR = 0x00
} status_t;
#endif /*__SHARED__TYPES*/
/* Exported macro ------------------------------------------------------------*/
/* Exported constants --------------------------------------------------------*/
/************** I2C Address *****************/
#define LSM6DSL_ACC_GYRO_I2C_ADDRESS_LOW 0xD4 // SAD[0] = 0
#define LSM6DSL_ACC_GYRO_I2C_ADDRESS_HIGH 0xD6 // SAD[0] = 1
/************** Who am I *******************/
#define LSM6DSL_ACC_GYRO_WHO_AM_I 0x6A
/************** Device Register *******************/
#define LSM6DSL_ACC_GYRO_FUNC_CFG_ACCESS 0X01
#define LSM6DSL_ACC_GYRO_SENSOR_SYNC_TIME 0X04
#define LSM6DSL_ACC_GYRO_SENSOR_RES_RATIO 0X05
#define LSM6DSL_ACC_GYRO_FIFO_CTRL1 0X06
#define LSM6DSL_ACC_GYRO_FIFO_CTRL2 0X07
#define LSM6DSL_ACC_GYRO_FIFO_CTRL3 0X08
#define LSM6DSL_ACC_GYRO_FIFO_CTRL4 0X09
#define LSM6DSL_ACC_GYRO_FIFO_CTRL5 0X0A
#define LSM6DSL_ACC_GYRO_DRDY_PULSE_CFG_G 0X0B
#define LSM6DSL_ACC_GYRO_INT1_CTRL 0X0D
#define LSM6DSL_ACC_GYRO_INT2_CTRL 0X0E
#define LSM6DSL_ACC_GYRO_WHO_AM_I_REG 0X0F
#define LSM6DSL_ACC_GYRO_CTRL1_XL 0X10
#define LSM6DSL_ACC_GYRO_CTRL2_G 0X11
#define LSM6DSL_ACC_GYRO_CTRL3_C 0X12
#define LSM6DSL_ACC_GYRO_CTRL4_C 0X13
#define LSM6DSL_ACC_GYRO_CTRL5_C 0X14
#define LSM6DSL_ACC_GYRO_CTRL6_G 0X15
#define LSM6DSL_ACC_GYRO_CTRL7_G 0X16
#define LSM6DSL_ACC_GYRO_CTRL8_XL 0X17
#define LSM6DSL_ACC_GYRO_CTRL9_XL 0X18
#define LSM6DSL_ACC_GYRO_CTRL10_C 0X19
#define LSM6DSL_ACC_GYRO_MASTER_CONFIG 0X1A
#define LSM6DSL_ACC_GYRO_WAKE_UP_SRC 0X1B
#define LSM6DSL_ACC_GYRO_TAP_SRC 0X1C
#define LSM6DSL_ACC_GYRO_D6D_SRC 0X1D
#define LSM6DSL_ACC_GYRO_STATUS_REG 0X1E
#define LSM6DSL_ACC_GYRO_OUT_TEMP_L 0X20
#define LSM6DSL_ACC_GYRO_OUT_TEMP_H 0X21
#define LSM6DSL_ACC_GYRO_OUTX_L_G 0X22
#define LSM6DSL_ACC_GYRO_OUTX_H_G 0X23
#define LSM6DSL_ACC_GYRO_OUTY_L_G 0X24
#define LSM6DSL_ACC_GYRO_OUTY_H_G 0X25
#define LSM6DSL_ACC_GYRO_OUTZ_L_G 0X26
#define LSM6DSL_ACC_GYRO_OUTZ_H_G 0X27
#define LSM6DSL_ACC_GYRO_OUTX_L_XL 0X28
#define LSM6DSL_ACC_GYRO_OUTX_H_XL 0X29
#define LSM6DSL_ACC_GYRO_OUTY_L_XL 0X2A
#define LSM6DSL_ACC_GYRO_OUTY_H_XL 0X2B
#define LSM6DSL_ACC_GYRO_OUTZ_L_XL 0X2C
#define LSM6DSL_ACC_GYRO_OUTZ_H_XL 0X2D
#define LSM6DSL_ACC_GYRO_SENSORHUB1_REG 0X2E
#define LSM6DSL_ACC_GYRO_SENSORHUB2_REG 0X2F
#define LSM6DSL_ACC_GYRO_SENSORHUB3_REG 0X30
#define LSM6DSL_ACC_GYRO_SENSORHUB4_REG 0X31
#define LSM6DSL_ACC_GYRO_SENSORHUB5_REG 0X32
#define LSM6DSL_ACC_GYRO_SENSORHUB6_REG 0X33
#define LSM6DSL_ACC_GYRO_SENSORHUB7_REG 0X34
#define LSM6DSL_ACC_GYRO_SENSORHUB8_REG 0X35
#define LSM6DSL_ACC_GYRO_SENSORHUB9_REG 0X36
#define LSM6DSL_ACC_GYRO_SENSORHUB10_REG 0X37
#define LSM6DSL_ACC_GYRO_SENSORHUB11_REG 0X38
#define LSM6DSL_ACC_GYRO_SENSORHUB12_REG 0X39
#define LSM6DSL_ACC_GYRO_FIFO_STATUS1 0X3A
#define LSM6DSL_ACC_GYRO_FIFO_STATUS2 0X3B
#define LSM6DSL_ACC_GYRO_FIFO_STATUS3 0X3C
#define LSM6DSL_ACC_GYRO_FIFO_STATUS4 0X3D
#define LSM6DSL_ACC_GYRO_FIFO_DATA_OUT_L 0X3E
#define LSM6DSL_ACC_GYRO_FIFO_DATA_OUT_H 0X3F
#define LSM6DSL_ACC_GYRO_TIMESTAMP0_REG 0X40
#define LSM6DSL_ACC_GYRO_TIMESTAMP1_REG 0X41
#define LSM6DSL_ACC_GYRO_TIMESTAMP2_REG 0X42
#define LSM6DSL_ACC_GYRO_TIMESTAMP_L 0X49
#define LSM6DSL_ACC_GYRO_TIMESTAMP_H 0X4A
#define LSM6DSL_ACC_GYRO_STEP_COUNTER_L 0X4B
#define LSM6DSL_ACC_GYRO_STEP_COUNTER_H 0X4C
#define LSM6DSL_ACC_GYRO_SENSORHUB13_REG 0X4D
#define LSM6DSL_ACC_GYRO_SENSORHUB14_REG 0X4E
#define LSM6DSL_ACC_GYRO_SENSORHUB15_REG 0X4F
#define LSM6DSL_ACC_GYRO_SENSORHUB16_REG 0X50
#define LSM6DSL_ACC_GYRO_SENSORHUB17_REG 0X51
#define LSM6DSL_ACC_GYRO_SENSORHUB18_REG 0X52
#define LSM6DSL_ACC_GYRO_FUNC_SRC 0X53
#define LSM6DSL_ACC_GYRO_TAP_CFG1 0X58
#define LSM6DSL_ACC_GYRO_TAP_THS_6D 0X59
#define LSM6DSL_ACC_GYRO_INT_DUR2 0X5A
#define LSM6DSL_ACC_GYRO_WAKE_UP_THS 0X5B
#define LSM6DSL_ACC_GYRO_WAKE_UP_DUR 0X5C
#define LSM6DSL_ACC_GYRO_FREE_FALL 0X5D
#define LSM6DSL_ACC_GYRO_MD1_CFG 0X5E
#define LSM6DSL_ACC_GYRO_MD2_CFG 0X5F
#define LSM6DSL_ACC_GYRO_OUT_MAG_RAW_X_L 0X66
#define LSM6DSL_ACC_GYRO_OUT_MAG_RAW_X_H 0X67
#define LSM6DSL_ACC_GYRO_OUT_MAG_RAW_Y_L 0X68
#define LSM6DSL_ACC_GYRO_OUT_MAG_RAW_Y_H 0X69
#define LSM6DSL_ACC_GYRO_OUT_MAG_RAW_Z_L 0X6A
#define LSM6DSL_ACC_GYRO_OUT_MAG_RAW_Z_H 0X6B
#define LSM6DSL_ACC_GYRO_X_OFS_USR 0X73
#define LSM6DSL_ACC_GYRO_Y_OFS_USR 0X74
#define LSM6DSL_ACC_GYRO_Z_OFS_USR 0X75
/************** Embedded functions register mapping *******************/
#define LSM6DSL_ACC_GYRO_SLV0_ADD 0x02
#define LSM6DSL_ACC_GYRO_SLV0_SUBADD 0x03
#define LSM6DSL_ACC_GYRO_SLAVE0_CONFIG 0x04
#define LSM6DSL_ACC_GYRO_SLV1_ADD 0x05
#define LSM6DSL_ACC_GYRO_SLV1_SUBADD 0x06
#define LSM6DSL_ACC_GYRO_SLAVE1_CONFIG 0x07
#define LSM6DSL_ACC_GYRO_SLV2_ADD 0x08
#define LSM6DSL_ACC_GYRO_SLV2_SUBADD 0x09
#define LSM6DSL_ACC_GYRO_SLAVE2_CONFIG 0x0A
#define LSM6DSL_ACC_GYRO_SLV3_ADD 0x0B
#define LSM6DSL_ACC_GYRO_SLV3_SUBADD 0x0C
#define LSM6DSL_ACC_GYRO_SLAVE3_CONFIG 0x0D
#define LSM6DSL_ACC_GYRO_DATAWRITE_SRC_MODE_SUB_SLV0 0x0E
#define LSM6DSL_ACC_GYRO_CONFIG_PEDO_THS_MIN 0x0F
#define LSM6DSL_ACC_GYRO_SM_STEP_THS 0x13
#define LSM6DSL_ACC_GYRO_PEDO_DEB_REG 0x14
#define LSM6DSL_ACC_GYRO_STEP_COUNT_DELTA 0x15
#define LSM6DSL_ACC_GYRO_MAG_SI_XX 0x24
#define LSM6DSL_ACC_GYRO_MAG_SI_XY 0x25
#define LSM6DSL_ACC_GYRO_MAG_SI_XZ 0x26
#define LSM6DSL_ACC_GYRO_MAG_SI_YX 0x27
#define LSM6DSL_ACC_GYRO_MAG_SI_YY 0x28
#define LSM6DSL_ACC_GYRO_MAG_SI_YZ 0x29
#define LSM6DSL_ACC_GYRO_MAG_SI_ZX 0x2A
#define LSM6DSL_ACC_GYRO_MAG_SI_ZY 0x2B
#define LSM6DSL_ACC_GYRO_MAG_SI_ZZ 0x2C
#define LSM6DSL_ACC_GYRO_MAG_OFFX_L 0x2D
#define LSM6DSL_ACC_GYRO_MAG_OFFX_H 0x2E
#define LSM6DSL_ACC_GYRO_MAG_OFFY_L 0x2F
#define LSM6DSL_ACC_GYRO_MAG_OFFY_H 0x30
#define LSM6DSL_ACC_GYRO_MAG_OFFZ_L 0x31
#define LSM6DSL_ACC_GYRO_MAG_OFFZ_H 0x32
/************** Generic Function *******************/
/*******************************************************************************
* Register : Generic - All
* Address : Generic - All
* Bit Group Name: None
* Permission : W
*******************************************************************************/
status_t LSM6DSL_ACC_GYRO_WriteReg( void *handle, u8_t Reg, u8_t *Bufp, u16_t len );
/*******************************************************************************
* Register : Generic - All
* Address : Generic - All
* Bit Group Name: None
* Permission : R
*******************************************************************************/
status_t LSM6DSL_ACC_GYRO_ReadReg( void *handle, u8_t Reg, u8_t *Bufp, u16_t len );
/**************** Base Function *******************/
/*******************************************************************************
* Register : WHO_AM_I
* Address : 0X0F
* Bit Group Name: WHO_AM_I_BIT
* Permission : RO
*******************************************************************************/
#define LSM6DSL_ACC_GYRO_WHO_AM_I_BIT_MASK 0xFF
#define LSM6DSL_ACC_GYRO_WHO_AM_I_BIT_POSITION 0
status_t LSM6DSL_ACC_GYRO_R_WHO_AM_I(void *handle, u8_t *value);
/*******************************************************************************
* Register : CTRL3_C
* Address : 0X12
* Bit Group Name: BDU
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_BDU_CONTINUOS = 0x00,
LSM6DSL_ACC_GYRO_BDU_BLOCK_UPDATE = 0x40,
} LSM6DSL_ACC_GYRO_BDU_t;
#define LSM6DSL_ACC_GYRO_BDU_MASK 0x40
status_t LSM6DSL_ACC_GYRO_W_BDU(void *handle, LSM6DSL_ACC_GYRO_BDU_t newValue);
status_t LSM6DSL_ACC_GYRO_R_BDU(void *handle, LSM6DSL_ACC_GYRO_BDU_t *value);
/*******************************************************************************
* Register : CTRL1_XL
* Address : 0X10
* Bit Group Name: FS_XL
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_FS_XL_2g = 0x00,
LSM6DSL_ACC_GYRO_FS_XL_16g = 0x04,
LSM6DSL_ACC_GYRO_FS_XL_4g = 0x08,
LSM6DSL_ACC_GYRO_FS_XL_8g = 0x0C,
} LSM6DSL_ACC_GYRO_FS_XL_t;
#define LSM6DSL_ACC_GYRO_FS_XL_MASK 0x0C
status_t LSM6DSL_ACC_GYRO_W_FS_XL(void *handle, LSM6DSL_ACC_GYRO_FS_XL_t newValue);
status_t LSM6DSL_ACC_GYRO_R_FS_XL(void *handle, LSM6DSL_ACC_GYRO_FS_XL_t *value);
/*******************************************************************************
* Register : <REGISTER_L> - <REGISTER_H>
* Output Type : GetAccData
* Permission : RO
*******************************************************************************/
status_t LSM6DSL_ACC_GYRO_GetRawAccData(void *handle, u8_t *buff);
status_t LSM6DSL_ACC_Get_Acceleration(void *handle, int *buff, u8_t from_fifo);
/*******************************************************************************
* Register : CTRL1_XL
* Address : 0X10
* Bit Group Name: ODR_XL
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_ODR_XL_POWER_DOWN = 0x00,
LSM6DSL_ACC_GYRO_ODR_XL_13Hz = 0x10,
LSM6DSL_ACC_GYRO_ODR_XL_26Hz = 0x20,
LSM6DSL_ACC_GYRO_ODR_XL_52Hz = 0x30,
LSM6DSL_ACC_GYRO_ODR_XL_104Hz = 0x40,
LSM6DSL_ACC_GYRO_ODR_XL_208Hz = 0x50,
LSM6DSL_ACC_GYRO_ODR_XL_416Hz = 0x60,
LSM6DSL_ACC_GYRO_ODR_XL_833Hz = 0x70,
LSM6DSL_ACC_GYRO_ODR_XL_1660Hz = 0x80,
LSM6DSL_ACC_GYRO_ODR_XL_3330Hz = 0x90,
LSM6DSL_ACC_GYRO_ODR_XL_6660Hz = 0xA0,
} LSM6DSL_ACC_GYRO_ODR_XL_t;
#define LSM6DSL_ACC_GYRO_ODR_XL_MASK 0xF0
status_t LSM6DSL_ACC_GYRO_W_ODR_XL(void *handle, LSM6DSL_ACC_GYRO_ODR_XL_t newValue);
status_t LSM6DSL_ACC_GYRO_R_ODR_XL(void *handle, LSM6DSL_ACC_GYRO_ODR_XL_t *value);
status_t LSM6DSL_ACC_GYRO_translate_ODR_XL(LSM6DSL_ACC_GYRO_ODR_XL_t value, u16_t *odr_hz_val);
/*******************************************************************************
* Register : CTRL2_G
* Address : 0X11
* Bit Group Name: FS_G
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_FS_G_245dps = 0x00,
LSM6DSL_ACC_GYRO_FS_G_500dps = 0x04,
LSM6DSL_ACC_GYRO_FS_G_1000dps = 0x08,
LSM6DSL_ACC_GYRO_FS_G_2000dps = 0x0C,
} LSM6DSL_ACC_GYRO_FS_G_t;
#define LSM6DSL_ACC_GYRO_FS_G_MASK 0x0C
status_t LSM6DSL_ACC_GYRO_W_FS_G(void *handle, LSM6DSL_ACC_GYRO_FS_G_t newValue);
status_t LSM6DSL_ACC_GYRO_R_FS_G(void *handle, LSM6DSL_ACC_GYRO_FS_G_t *value);
/*******************************************************************************
* Register : CTRL2_G
* Address : 0X11
* Bit Group Name: ODR_G
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_ODR_G_POWER_DOWN = 0x00,
LSM6DSL_ACC_GYRO_ODR_G_13Hz = 0x10,
LSM6DSL_ACC_GYRO_ODR_G_26Hz = 0x20,
LSM6DSL_ACC_GYRO_ODR_G_52Hz = 0x30,
LSM6DSL_ACC_GYRO_ODR_G_104Hz = 0x40,
LSM6DSL_ACC_GYRO_ODR_G_208Hz = 0x50,
LSM6DSL_ACC_GYRO_ODR_G_416Hz = 0x60,
LSM6DSL_ACC_GYRO_ODR_G_833Hz = 0x70,
LSM6DSL_ACC_GYRO_ODR_G_1660Hz = 0x80,
LSM6DSL_ACC_GYRO_ODR_G_3330Hz = 0x90,
LSM6DSL_ACC_GYRO_ODR_G_6660Hz = 0xA0,
} LSM6DSL_ACC_GYRO_ODR_G_t;
#define LSM6DSL_ACC_GYRO_ODR_G_MASK 0xF0
status_t LSM6DSL_ACC_GYRO_W_ODR_G(void *handle, LSM6DSL_ACC_GYRO_ODR_G_t newValue);
status_t LSM6DSL_ACC_GYRO_R_ODR_G(void *handle, LSM6DSL_ACC_GYRO_ODR_G_t *value);
status_t LSM6DSL_ACC_GYRO_translate_ODR_G(LSM6DSL_ACC_GYRO_ODR_G_t value, u16_t *odr_hz_val);
/*******************************************************************************
* Register : <REGISTER_L> - <REGISTER_H>
* Output Type : GetGyroData
* Permission : RO
*******************************************************************************/
status_t LSM6DSL_ACC_GYRO_GetRawGyroData(void *handle, u8_t *buff);
status_t LSM6DSL_ACC_Get_AngularRate(void *handle, int *buff, u8_t from_fifo);
/*******************************************************************************
* Register : CTRL1_XL
* Address : 0X10
* Bit Group Name: BW_SEL
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_BW_SEL_ODR2 = 0x00,
LSM6DSL_ACC_GYRO_BW_SEL_ODR4 = 0x02,
} LSM6DSL_ACC_GYRO_BW_SEL_t;
#define LSM6DSL_ACC_GYRO_BW_SEL_MASK 0x02
status_t LSM6DSL_ACC_GYRO_W_BW_SEL(void *handle, LSM6DSL_ACC_GYRO_BW_SEL_t newValue);
status_t LSM6DSL_ACC_GYRO_R_BW_SEL(void *handle, LSM6DSL_ACC_GYRO_BW_SEL_t *value);
/*******************************************************************************
* Register : CTRL2_G
* Address : 0X11
* Bit Group Name: FS_125
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_FS_125_DISABLED = 0x00,
LSM6DSL_ACC_GYRO_FS_125_ENABLED = 0x02,
} LSM6DSL_ACC_GYRO_FS_125_t;
#define LSM6DSL_ACC_GYRO_FS_125_MASK 0x02
status_t LSM6DSL_ACC_GYRO_W_FS_125(void *handle, LSM6DSL_ACC_GYRO_FS_125_t newValue);
status_t LSM6DSL_ACC_GYRO_R_FS_125(void *handle, LSM6DSL_ACC_GYRO_FS_125_t *value);
/**************** Advanced Function *******************/
/*******************************************************************************
* Register : CTRL3_C
* Address : 0X12
* Bit Group Name: BLE
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_BLE_LSB = 0x00,
LSM6DSL_ACC_GYRO_BLE_MSB = 0x02,
} LSM6DSL_ACC_GYRO_BLE_t;
#define LSM6DSL_ACC_GYRO_BLE_MASK 0x02
status_t LSM6DSL_ACC_GYRO_W_BLE(void *handle, LSM6DSL_ACC_GYRO_BLE_t newValue);
status_t LSM6DSL_ACC_GYRO_R_BLE(void *handle, LSM6DSL_ACC_GYRO_BLE_t *value);
/*******************************************************************************
* Register : FUNC_CFG_ACCESS
* Address : 0X01
* Bit Group Name: EMB_ACC
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_EMBEDDED_ACCESS_DISABLED = 0x00,
LSM6DSL_ACC_GYRO_EMBEDDED_ACCESS_ENABLED = 0x80,
} LSM6DSL_ACC_GYRO_EMB_ACC_t;
#define LSM6DSL_ACC_GYRO_EMB_ACC_MASK 0x80
status_t LSM6DSL_ACC_GYRO_W_EmbeddedAccess(void *handle, LSM6DSL_ACC_GYRO_EMB_ACC_t newValue);
status_t LSM6DSL_ACC_GYRO_R_EmbeddedAccess(void *handle, LSM6DSL_ACC_GYRO_EMB_ACC_t *value);
/*******************************************************************************
* Register : SENSOR_SYNC_TIME
* Address : 0X04
* Bit Group Name: TPH
* Permission : RW
*******************************************************************************/
#define LSM6DSL_ACC_GYRO_TPH_MASK 0xFF
#define LSM6DSL_ACC_GYRO_TPH_POSITION 0
status_t LSM6DSL_ACC_GYRO_W_Stamping_Time_Frame(void *handle, u8_t newValue);
status_t LSM6DSL_ACC_GYRO_R_Stamping_Time_Frame(void *handle, u8_t *value);
/*******************************************************************************
* Register : SENSOR_SYNC_RES_RATIO
* Address : 0X05
* Bit Group Name: RR
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_TIM_RATIO_2_11 = 0x00,
LSM6DSL_ACC_GYRO_TIM_RATIO_2_12 = 0x01,
LSM6DSL_ACC_GYRO_TIM_RATIO_2_13 = 0x02,
LSM6DSL_ACC_GYRO_TIM_RATIO_2_14 = 0x03,
} LSM6DSL_ACC_GYRO_SYNC_RES_RATIO_t;
#define LSM6DSL_ACC_GYRO_SYNC_RES_RATIO_MASK 0x03
status_t LSM6DSL_ACC_GYRO_W_SYNC_RES_RATIO(void *handle, LSM6DSL_ACC_GYRO_SYNC_RES_RATIO_t newValue);
status_t LSM6DSL_ACC_GYRO_R_SYNC_RES_RATIO(void *handle, LSM6DSL_ACC_GYRO_SYNC_RES_RATIO_t *value);
/*******************************************************************************
* Register : FIFO_CTRL1
* Address : 0X06
* Bit Group Name: WTM_FIFO
* Permission : RW
*******************************************************************************/
#define LSM6DSL_ACC_GYRO_WTM_FIFO_CTRL1_MASK 0xFF
#define LSM6DSL_ACC_GYRO_WTM_FIFO_CTRL1_POSITION 0
#define LSM6DSL_ACC_GYRO_WTM_FIFO_CTRL2_MASK 0x07
#define LSM6DSL_ACC_GYRO_WTM_FIFO_CTRL2_POSITION 0
status_t LSM6DSL_ACC_GYRO_W_FIFO_Watermark(void *handle, u16_t newValue);
status_t LSM6DSL_ACC_GYRO_R_FIFO_Watermark(void *handle, u16_t *value);
/*******************************************************************************
* Register : FIFO_CTRL2
* Address : 0X07
* Bit Group Name: FIFO_TEMP_EN
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_FIFO_TEMP_DISABLE = 0x00,
LSM6DSL_ACC_GYRO_FIFO_TEMP_ENABLE = 0x08,
} LSM6DSL_ACC_GYRO_FIFO_TEMP_t;
#define LSM6DSL_ACC_GYRO_FIFO_TEMP_MASK 0x08
status_t LSM6DSL_ACC_GYRO_W_FIFO_TEMP(void *handle, LSM6DSL_ACC_GYRO_FIFO_TEMP_t newValue);
status_t LSM6DSL_ACC_GYRO_R_FIFO_TEMP(void *handle, LSM6DSL_ACC_GYRO_FIFO_TEMP_t *value);
/*******************************************************************************
* Register : FIFO_CTRL2
* Address : 0X07
* Bit Group Name: TIM_PEDO_FIFO_DRDY
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_TIM_PEDO_FIFO_DRDY_DISABLED = 0x00,
LSM6DSL_ACC_GYRO_TIM_PEDO_FIFO_DRDY_ENABLED = 0x40,
} LSM6DSL_ACC_GYRO_TIM_PEDO_FIFO_DRDY_t;
#define LSM6DSL_ACC_GYRO_TIM_PEDO_FIFO_DRDY_MASK 0x40
status_t LSM6DSL_ACC_GYRO_W_TIM_PEDO_FIFO_Write_En(void *handle, LSM6DSL_ACC_GYRO_TIM_PEDO_FIFO_DRDY_t newValue);
status_t LSM6DSL_ACC_GYRO_R_TIM_PEDO_FIFO_Write_En(void *handle, LSM6DSL_ACC_GYRO_TIM_PEDO_FIFO_DRDY_t *value);
/*******************************************************************************
* Register : FIFO_CTRL2
* Address : 0X07
* Bit Group Name: TIM_PEDO_FIFO_EN
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_TIM_PEDO_FIFO_EN_DISABLED = 0x00,
LSM6DSL_ACC_GYRO_TIM_PEDO_FIFO_EN_ENABLED = 0x80,
} LSM6DSL_ACC_GYRO_TIM_PEDO_FIFO_EN_t;
#define LSM6DSL_ACC_GYRO_TIM_PEDO_FIFO_EN_MASK 0x80
status_t LSM6DSL_ACC_GYRO_W_TIM_PEDO_FIFO_En(void *handle, LSM6DSL_ACC_GYRO_TIM_PEDO_FIFO_EN_t newValue);
status_t LSM6DSL_ACC_GYRO_R_TIM_PEDO_FIFO_En(void *handle, LSM6DSL_ACC_GYRO_TIM_PEDO_FIFO_EN_t *value);
/*******************************************************************************
* Register : FIFO_CTRL3
* Address : 0X08
* Bit Group Name: DEC_FIFO_XL
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_DEC_FIFO_XL_DATA_NOT_IN_FIFO = 0x00,
LSM6DSL_ACC_GYRO_DEC_FIFO_XL_NO_DECIMATION = 0x01,
LSM6DSL_ACC_GYRO_DEC_FIFO_XL_DECIMATION_BY_2 = 0x02,
LSM6DSL_ACC_GYRO_DEC_FIFO_XL_DECIMATION_BY_3 = 0x03,
LSM6DSL_ACC_GYRO_DEC_FIFO_XL_DECIMATION_BY_4 = 0x04,
LSM6DSL_ACC_GYRO_DEC_FIFO_XL_DECIMATION_BY_8 = 0x05,
LSM6DSL_ACC_GYRO_DEC_FIFO_XL_DECIMATION_BY_16 = 0x06,
LSM6DSL_ACC_GYRO_DEC_FIFO_XL_DECIMATION_BY_32 = 0x07,
} LSM6DSL_ACC_GYRO_DEC_FIFO_XL_t;
#define LSM6DSL_ACC_GYRO_DEC_FIFO_XL_MASK 0x07
status_t LSM6DSL_ACC_GYRO_W_DEC_FIFO_XL(void *handle, LSM6DSL_ACC_GYRO_DEC_FIFO_XL_t newValue);
status_t LSM6DSL_ACC_GYRO_W_DEC_FIFO_XL_val(void *handle, u16_t newValue);
status_t LSM6DSL_ACC_GYRO_R_DEC_FIFO_XL(void *handle, LSM6DSL_ACC_GYRO_DEC_FIFO_XL_t *value);
/*******************************************************************************
* Register : FIFO_CTRL3
* Address : 0X08
* Bit Group Name: DEC_FIFO_G
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_DEC_FIFO_G_DATA_NOT_IN_FIFO = 0x00,
LSM6DSL_ACC_GYRO_DEC_FIFO_G_NO_DECIMATION = 0x08,
LSM6DSL_ACC_GYRO_DEC_FIFO_G_DECIMATION_BY_2 = 0x10,
LSM6DSL_ACC_GYRO_DEC_FIFO_G_DECIMATION_BY_3 = 0x18,
LSM6DSL_ACC_GYRO_DEC_FIFO_G_DECIMATION_BY_4 = 0x20,
LSM6DSL_ACC_GYRO_DEC_FIFO_G_DECIMATION_BY_8 = 0x28,
LSM6DSL_ACC_GYRO_DEC_FIFO_G_DECIMATION_BY_16 = 0x30,
LSM6DSL_ACC_GYRO_DEC_FIFO_G_DECIMATION_BY_32 = 0x38,
} LSM6DSL_ACC_GYRO_DEC_FIFO_G_t;
#define LSM6DSL_ACC_GYRO_DEC_FIFO_G_MASK 0x38
status_t LSM6DSL_ACC_GYRO_W_DEC_FIFO_G(void *handle, LSM6DSL_ACC_GYRO_DEC_FIFO_G_t newValue);
status_t LSM6DSL_ACC_GYRO_W_DEC_FIFO_G_val(void *handle, u16_t newValue);
status_t LSM6DSL_ACC_GYRO_R_DEC_FIFO_G(void *handle, LSM6DSL_ACC_GYRO_DEC_FIFO_G_t *value);
/*******************************************************************************
* Register : FIFO_CTRL4
* Address : 0X09
* Bit Group Name: DEC_DS3_FIFO
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_DEC_FIFO_DS3_DATA_NOT_IN_FIFO = 0x00,
LSM6DSL_ACC_GYRO_DEC_FIFO_DS3_NO_DECIMATION = 0x01,
LSM6DSL_ACC_GYRO_DEC_FIFO_DS3_DECIMATION_BY_2 = 0x02,
LSM6DSL_ACC_GYRO_DEC_FIFO_DS3_DECIMATION_BY_3 = 0x03,
LSM6DSL_ACC_GYRO_DEC_FIFO_DS3_DECIMATION_BY_4 = 0x04,
LSM6DSL_ACC_GYRO_DEC_FIFO_DS3_DECIMATION_BY_8 = 0x05,
LSM6DSL_ACC_GYRO_DEC_FIFO_DS3_DECIMATION_BY_16 = 0x06,
LSM6DSL_ACC_GYRO_DEC_FIFO_DS3_DECIMATION_BY_32 = 0x07,
} LSM6DSL_ACC_GYRO_DEC_FIFO_DS3_t;
#define LSM6DSL_ACC_GYRO_DEC_FIFO_DS3_MASK 0x07
status_t LSM6DSL_ACC_GYRO_W_DEC_FIFO_DS3(void *handle, LSM6DSL_ACC_GYRO_DEC_FIFO_DS3_t newValue);
status_t LSM6DSL_ACC_GYRO_R_DEC_FIFO_DS3(void *handle, LSM6DSL_ACC_GYRO_DEC_FIFO_DS3_t *value);
/*******************************************************************************
* Register : FIFO_CTRL4
* Address : 0X09
* Bit Group Name: DEC_DS4_FIFO
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_DEC_FIFO_DS4_DATA_NOT_IN_FIFO = 0x00,
LSM6DSL_ACC_GYRO_DEC_FIFO_DS4_NO_DECIMATION = 0x08,
LSM6DSL_ACC_GYRO_DEC_FIFO_DS4_DECIMATION_BY_2 = 0x10,
LSM6DSL_ACC_GYRO_DEC_FIFO_DS4_DECIMATION_BY_3 = 0x18,
LSM6DSL_ACC_GYRO_DEC_FIFO_DS4_DECIMATION_BY_4 = 0x20,
LSM6DSL_ACC_GYRO_DEC_FIFO_DS4_DECIMATION_BY_8 = 0x28,
LSM6DSL_ACC_GYRO_DEC_FIFO_DS4_DECIMATION_BY_16 = 0x30,
LSM6DSL_ACC_GYRO_DEC_FIFO_DS4_DECIMATION_BY_32 = 0x38,
} LSM6DSL_ACC_GYRO_DEC_FIFO_DS4_t;
#define LSM6DSL_ACC_GYRO_DEC_FIFO_DS4_MASK 0x38
status_t LSM6DSL_ACC_GYRO_W_DEC_FIFO_DS4(void *handle, LSM6DSL_ACC_GYRO_DEC_FIFO_DS4_t newValue);
status_t LSM6DSL_ACC_GYRO_R_DEC_FIFO_DS4(void *handle, LSM6DSL_ACC_GYRO_DEC_FIFO_DS4_t *value);
/*******************************************************************************
* Register : FIFO_CTRL4
* Address : 0X09
* Bit Group Name: HI_DATA_ONLY
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_HI_DATA_ONLY_DISABLED = 0x00,
LSM6DSL_ACC_GYRO_HI_DATA_ONLY_ENABLED = 0x40,
} LSM6DSL_ACC_GYRO_HI_DATA_ONLY_t;
#define LSM6DSL_ACC_GYRO_HI_DATA_ONLY_MASK 0x40
status_t LSM6DSL_ACC_GYRO_W_HI_DATA_ONLY(void *handle, LSM6DSL_ACC_GYRO_HI_DATA_ONLY_t newValue);
status_t LSM6DSL_ACC_GYRO_R_HI_DATA_ONLY(void *handle, LSM6DSL_ACC_GYRO_HI_DATA_ONLY_t *value);
/*******************************************************************************
* Register : FIFO_CTRL4
* Address : 0X09
* Bit Group Name: STOP_ON_FTH
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_STOP_ON_FTH_DISABLED = 0x00,
LSM6DSL_ACC_GYRO_STOP_ON_FTH_ENABLED = 0x80,
} LSM6DSL_ACC_GYRO_STOP_ON_FTH_t;
#define LSM6DSL_ACC_GYRO_STOP_ON_FTH_MASK 0x80
status_t LSM6DSL_ACC_GYRO_W_STOP_ON_FTH(void *handle, LSM6DSL_ACC_GYRO_STOP_ON_FTH_t newValue);
status_t LSM6DSL_ACC_GYRO_R_STOP_ON_FTH(void *handle, LSM6DSL_ACC_GYRO_STOP_ON_FTH_t *value);
/*******************************************************************************
* Register : FIFO_CTRL5
* Address : 0X0A
* Bit Group Name: FIFO_MODE
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_FIFO_MODE_BYPASS = 0x00,
LSM6DSL_ACC_GYRO_FIFO_MODE_FIFO = 0x01,
LSM6DSL_ACC_GYRO_FIFO_MODE_STREAM = 0x02,
LSM6DSL_ACC_GYRO_FIFO_MODE_STF = 0x03,
LSM6DSL_ACC_GYRO_FIFO_MODE_BTS = 0x04,
LSM6DSL_ACC_GYRO_FIFO_MODE_DYN_STREAM = 0x05,
LSM6DSL_ACC_GYRO_FIFO_MODE_DYN_STREAM_2 = 0x06,
LSM6DSL_ACC_GYRO_FIFO_MODE_BTF = 0x07,
} LSM6DSL_ACC_GYRO_FIFO_MODE_t;
#define LSM6DSL_ACC_GYRO_FIFO_MODE_MASK 0x07
status_t LSM6DSL_ACC_GYRO_W_FIFO_MODE(void *handle, LSM6DSL_ACC_GYRO_FIFO_MODE_t newValue);
status_t LSM6DSL_ACC_GYRO_R_FIFO_MODE(void *handle, LSM6DSL_ACC_GYRO_FIFO_MODE_t *value);
/*******************************************************************************
* Register : FIFO_CTRL5
* Address : 0X0A
* Bit Group Name: ODR_FIFO
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_ODR_FIFO_10Hz = 0x08,
LSM6DSL_ACC_GYRO_ODR_FIFO_25Hz = 0x10,
LSM6DSL_ACC_GYRO_ODR_FIFO_50Hz = 0x18,
LSM6DSL_ACC_GYRO_ODR_FIFO_100Hz = 0x20,
LSM6DSL_ACC_GYRO_ODR_FIFO_200Hz = 0x28,
LSM6DSL_ACC_GYRO_ODR_FIFO_400Hz = 0x30,
LSM6DSL_ACC_GYRO_ODR_FIFO_800Hz = 0x38,
LSM6DSL_ACC_GYRO_ODR_FIFO_1600Hz = 0x40,
LSM6DSL_ACC_GYRO_ODR_FIFO_3300Hz = 0x48,
LSM6DSL_ACC_GYRO_ODR_FIFO_6600Hz = 0x50,
LSM6DSL_ACC_GYRO_ODR_FIFO_13300Hz = 0x58,
} LSM6DSL_ACC_GYRO_ODR_FIFO_t;
#define LSM6DSL_ACC_GYRO_ODR_FIFO_MASK 0x78
status_t LSM6DSL_ACC_GYRO_W_ODR_FIFO(void *handle, LSM6DSL_ACC_GYRO_ODR_FIFO_t newValue);
status_t LSM6DSL_ACC_GYRO_R_ODR_FIFO(void *handle, LSM6DSL_ACC_GYRO_ODR_FIFO_t *value);
/*******************************************************************************
* Register : DRDY_PULSE_CFG_G
* Address : 0X0B
* Bit Group Name: DRDY_PULSE
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_DRDY_LATCH = 0x00,
LSM6DSL_ACC_GYRO_DRDY_PULSE = 0x80,
} LSM6DSL_ACC_GYRO_DRDY_PULSE_t;
#define LSM6DSL_ACC_GYRO_DRDY_PULSE_MASK 0x80
status_t LSM6DSL_ACC_GYRO_W_DRDY_PULSE(void *handle, LSM6DSL_ACC_GYRO_DRDY_PULSE_t newValue);
status_t LSM6DSL_ACC_GYRO_R_DRDY_PULSE(void *handle, LSM6DSL_ACC_GYRO_DRDY_PULSE_t *value);
/*******************************************************************************
* Register : INT1_CTRL
* Address : 0X0D
* Bit Group Name: INT1_DRDY_XL
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_INT1_DRDY_XL_DISABLED = 0x00,
LSM6DSL_ACC_GYRO_INT1_DRDY_XL_ENABLED = 0x01,
} LSM6DSL_ACC_GYRO_INT1_DRDY_XL_t;
#define LSM6DSL_ACC_GYRO_INT1_DRDY_XL_MASK 0x01
status_t LSM6DSL_ACC_GYRO_W_DRDY_XL_on_INT1(void *handle, LSM6DSL_ACC_GYRO_INT1_DRDY_XL_t newValue);
status_t LSM6DSL_ACC_GYRO_R_DRDY_XL_on_INT1(void *handle, LSM6DSL_ACC_GYRO_INT1_DRDY_XL_t *value);
/*******************************************************************************
* Register : INT1_CTRL
* Address : 0X0D
* Bit Group Name: INT1_DRDY_G
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_INT1_DRDY_G_DISABLED = 0x00,
LSM6DSL_ACC_GYRO_INT1_DRDY_G_ENABLED = 0x02,
} LSM6DSL_ACC_GYRO_INT1_DRDY_G_t;
#define LSM6DSL_ACC_GYRO_INT1_DRDY_G_MASK 0x02
status_t LSM6DSL_ACC_GYRO_W_DRDY_G_on_INT1(void *handle, LSM6DSL_ACC_GYRO_INT1_DRDY_G_t newValue);
status_t LSM6DSL_ACC_GYRO_R_DRDY_G_on_INT1(void *handle, LSM6DSL_ACC_GYRO_INT1_DRDY_G_t *value);
/*******************************************************************************
* Register : INT1_CTRL
* Address : 0X0D
* Bit Group Name: INT1_BOOT
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_INT1_BOOT_DISABLED = 0x00,
LSM6DSL_ACC_GYRO_INT1_BOOT_ENABLED = 0x04,
} LSM6DSL_ACC_GYRO_INT1_BOOT_t;
#define LSM6DSL_ACC_GYRO_INT1_BOOT_MASK 0x04
status_t LSM6DSL_ACC_GYRO_W_BOOT_on_INT1(void *handle, LSM6DSL_ACC_GYRO_INT1_BOOT_t newValue);
status_t LSM6DSL_ACC_GYRO_R_BOOT_on_INT1(void *handle, LSM6DSL_ACC_GYRO_INT1_BOOT_t *value);
/*******************************************************************************
* Register : INT1_CTRL
* Address : 0X0D
* Bit Group Name: INT1_FTH
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_INT1_FTH_DISABLED = 0x00,
LSM6DSL_ACC_GYRO_INT1_FTH_ENABLED = 0x08,
} LSM6DSL_ACC_GYRO_INT1_FTH_t;
#define LSM6DSL_ACC_GYRO_INT1_FTH_MASK 0x08
status_t LSM6DSL_ACC_GYRO_W_FIFO_TSHLD_on_INT1(void *handle, LSM6DSL_ACC_GYRO_INT1_FTH_t newValue);
status_t LSM6DSL_ACC_GYRO_R_FIFO_TSHLD_on_INT1(void *handle, LSM6DSL_ACC_GYRO_INT1_FTH_t *value);
/*******************************************************************************
* Register : INT1_CTRL
* Address : 0X0D
* Bit Group Name: INT1_OVR
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_INT1_OVR_DISABLED = 0x00,
LSM6DSL_ACC_GYRO_INT1_OVR_ENABLED = 0x10,
} LSM6DSL_ACC_GYRO_INT1_OVR_t;
#define LSM6DSL_ACC_GYRO_INT1_OVR_MASK 0x10
status_t LSM6DSL_ACC_GYRO_W_OVERRUN_on_INT1(void *handle, LSM6DSL_ACC_GYRO_INT1_OVR_t newValue);
status_t LSM6DSL_ACC_GYRO_R_OVERRUN_on_INT1(void *handle, LSM6DSL_ACC_GYRO_INT1_OVR_t *value);
/*******************************************************************************
* Register : INT1_CTRL
* Address : 0X0D
* Bit Group Name: INT1_FULL_FLAG
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_INT1_FULL_FLAG_DISABLED = 0x00,
LSM6DSL_ACC_GYRO_INT1_FULL_FLAG_ENABLED = 0x20,
} LSM6DSL_ACC_GYRO_INT1_FULL_FLAG_t;
#define LSM6DSL_ACC_GYRO_INT1_FULL_FLAG_MASK 0x20
status_t LSM6DSL_ACC_GYRO_W_FULL_FLAG_on_INT1(void *handle, LSM6DSL_ACC_GYRO_INT1_FULL_FLAG_t newValue);
status_t LSM6DSL_ACC_GYRO_R_FULL_FLAG_on_INT1(void *handle, LSM6DSL_ACC_GYRO_INT1_FULL_FLAG_t *value);
/*******************************************************************************
* Register : INT1_CTRL
* Address : 0X0D
* Bit Group Name: INT1_SIGN_MOT
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_INT1_SIGN_MOT_DISABLED = 0x00,
LSM6DSL_ACC_GYRO_INT1_SIGN_MOT_ENABLED = 0x40,
} LSM6DSL_ACC_GYRO_INT1_SIGN_MOT_t;
#define LSM6DSL_ACC_GYRO_INT1_SIGN_MOT_MASK 0x40
status_t LSM6DSL_ACC_GYRO_W_SIGN_MOT_on_INT1(void *handle, LSM6DSL_ACC_GYRO_INT1_SIGN_MOT_t newValue);
status_t LSM6DSL_ACC_GYRO_R_SIGN_MOT_on_INT1(void *handle, LSM6DSL_ACC_GYRO_INT1_SIGN_MOT_t *value);
/*******************************************************************************
* Register : INT1_CTRL
* Address : 0X0D
* Bit Group Name: INT1_STEP_DETECTOR
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_INT1_PEDO_DISABLED = 0x00,
LSM6DSL_ACC_GYRO_INT1_PEDO_ENABLED = 0x80,
} LSM6DSL_ACC_GYRO_INT1_PEDO_t;
#define LSM6DSL_ACC_GYRO_INT1_PEDO_MASK 0x80
status_t LSM6DSL_ACC_GYRO_W_STEP_DET_on_INT1(void *handle, LSM6DSL_ACC_GYRO_INT1_PEDO_t newValue);
status_t LSM6DSL_ACC_GYRO_R_STEP_DET_on_INT1(void *handle, LSM6DSL_ACC_GYRO_INT1_PEDO_t *value);
/*******************************************************************************
* Register : INT2_CTRL
* Address : 0X0E
* Bit Group Name: INT2_DRDY_XL
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_INT2_DRDY_XL_DISABLED = 0x00,
LSM6DSL_ACC_GYRO_INT2_DRDY_XL_ENABLED = 0x01,
} LSM6DSL_ACC_GYRO_INT2_DRDY_XL_t;
#define LSM6DSL_ACC_GYRO_INT2_DRDY_XL_MASK 0x01
status_t LSM6DSL_ACC_GYRO_W_DRDY_XL_on_INT2(void *handle, LSM6DSL_ACC_GYRO_INT2_DRDY_XL_t newValue);
status_t LSM6DSL_ACC_GYRO_R_DRDY_XL_on_INT2(void *handle, LSM6DSL_ACC_GYRO_INT2_DRDY_XL_t *value);
/*******************************************************************************
* Register : INT2_CTRL
* Address : 0X0E
* Bit Group Name: INT2_DRDY_G
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_INT2_DRDY_G_DISABLED = 0x00,
LSM6DSL_ACC_GYRO_INT2_DRDY_G_ENABLED = 0x02,
} LSM6DSL_ACC_GYRO_INT2_DRDY_G_t;
#define LSM6DSL_ACC_GYRO_INT2_DRDY_G_MASK 0x02
status_t LSM6DSL_ACC_GYRO_W_DRDY_G_on_INT2(void *handle, LSM6DSL_ACC_GYRO_INT2_DRDY_G_t newValue);
status_t LSM6DSL_ACC_GYRO_R_DRDY_G_on_INT2(void *handle, LSM6DSL_ACC_GYRO_INT2_DRDY_G_t *value);
/*******************************************************************************
* Register : INT2_CTRL
* Address : 0X0E
* Bit Group Name: INT2_DRDY_TEMP
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_INT2_DRDY_TEMP_DISABLED = 0x00,
LSM6DSL_ACC_GYRO_INT2_DRDY_TEMP_ENABLED = 0x04,
} LSM6DSL_ACC_GYRO_INT2_DRDY_TEMP_t;
#define LSM6DSL_ACC_GYRO_INT2_DRDY_TEMP_MASK 0x04
status_t LSM6DSL_ACC_GYRO_W_DRDY_TEMP_on_INT2(void *handle, LSM6DSL_ACC_GYRO_INT2_DRDY_TEMP_t newValue);
status_t LSM6DSL_ACC_GYRO_R_DRDY_TEMP_on_INT2(void *handle, LSM6DSL_ACC_GYRO_INT2_DRDY_TEMP_t *value);
/*******************************************************************************
* Register : INT2_CTRL
* Address : 0X0E
* Bit Group Name: INT2_FTH
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_INT2_FTH_DISABLED = 0x00,
LSM6DSL_ACC_GYRO_INT2_FTH_ENABLED = 0x08,
} LSM6DSL_ACC_GYRO_INT2_FTH_t;
#define LSM6DSL_ACC_GYRO_INT2_FTH_MASK 0x08
status_t LSM6DSL_ACC_GYRO_W_FIFO_TSHLD_on_INT2(void *handle, LSM6DSL_ACC_GYRO_INT2_FTH_t newValue);
status_t LSM6DSL_ACC_GYRO_R_FIFO_TSHLD_on_INT2(void *handle, LSM6DSL_ACC_GYRO_INT2_FTH_t *value);
/*******************************************************************************
* Register : INT2_CTRL
* Address : 0X0E
* Bit Group Name: INT2_OVR
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_INT2_OVR_DISABLED = 0x00,
LSM6DSL_ACC_GYRO_INT2_OVR_ENABLED = 0x10,
} LSM6DSL_ACC_GYRO_INT2_OVR_t;
#define LSM6DSL_ACC_GYRO_INT2_OVR_MASK 0x10
status_t LSM6DSL_ACC_GYRO_W_OVERRUN_on_INT2(void *handle, LSM6DSL_ACC_GYRO_INT2_OVR_t newValue);
status_t LSM6DSL_ACC_GYRO_R_OVERRUN_on_INT2(void *handle, LSM6DSL_ACC_GYRO_INT2_OVR_t *value);
/*******************************************************************************
* Register : INT2_CTRL
* Address : 0X0E
* Bit Group Name: INT2_FULL_FLAG
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_INT2_FULL_FLAG_DISABLED = 0x00,
LSM6DSL_ACC_GYRO_INT2_FULL_FLAG_ENABLED = 0x20,
} LSM6DSL_ACC_GYRO_INT2_FULL_FLAG_t;
#define LSM6DSL_ACC_GYRO_INT2_FULL_FLAG_MASK 0x20
status_t LSM6DSL_ACC_GYRO_W_FULL_FLAG_on_INT2(void *handle, LSM6DSL_ACC_GYRO_INT2_FULL_FLAG_t newValue);
status_t LSM6DSL_ACC_GYRO_R_FULL_FLAG_on_INT2(void *handle, LSM6DSL_ACC_GYRO_INT2_FULL_FLAG_t *value);
/*******************************************************************************
* Register : INT2_CTRL
* Address : 0X0E
* Bit Group Name: INT2_STEP_COUNT_OV
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_INT2_STEP_COUNT_OV_DISABLED = 0x00,
LSM6DSL_ACC_GYRO_INT2_STEP_COUNT_OV_ENABLED = 0x40,
} LSM6DSL_ACC_GYRO_INT2_STEP_COUNT_OV_t;
#define LSM6DSL_ACC_GYRO_INT2_STEP_COUNT_OV_MASK 0x40
status_t LSM6DSL_ACC_GYRO_W_STEP_COUNT_OV_on_INT2(void *handle, LSM6DSL_ACC_GYRO_INT2_STEP_COUNT_OV_t newValue);
status_t LSM6DSL_ACC_GYRO_R_STEP_COUNT_OV_on_INT2(void *handle, LSM6DSL_ACC_GYRO_INT2_STEP_COUNT_OV_t *value);
/*******************************************************************************
* Register : INT2_CTRL
* Address : 0X0E
* Bit Group Name: INT2_STEP_DELTA
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_INT2_STEP_DELTA_DISABLED = 0x00,
LSM6DSL_ACC_GYRO_INT2_STEP_DELTA_ENABLED = 0x80,
} LSM6DSL_ACC_GYRO_INT2_STEP_DELTA_t;
#define LSM6DSL_ACC_GYRO_INT2_STEP_DELTA_MASK 0x80
status_t LSM6DSL_ACC_GYRO_W_STEP_DELTA_on_INT2(void *handle, LSM6DSL_ACC_GYRO_INT2_STEP_DELTA_t newValue);
status_t LSM6DSL_ACC_GYRO_R_STEP_DELTA_on_INT2(void *handle, LSM6DSL_ACC_GYRO_INT2_STEP_DELTA_t *value);
/*******************************************************************************
* Register : CTRL3_C
* Address : 0X12
* Bit Group Name: SW_RESET
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_SW_RESET_NORMAL_MODE = 0x00,
LSM6DSL_ACC_GYRO_SW_RESET_RESET_DEVICE = 0x01,
} LSM6DSL_ACC_GYRO_SW_RESET_t;
#define LSM6DSL_ACC_GYRO_SW_RESET_MASK 0x01
status_t LSM6DSL_ACC_GYRO_W_SW_RESET(void *handle, LSM6DSL_ACC_GYRO_SW_RESET_t newValue);
status_t LSM6DSL_ACC_GYRO_R_SW_RESET(void *handle, LSM6DSL_ACC_GYRO_SW_RESET_t *value);
/*******************************************************************************
* Register : CTRL3_C
* Address : 0X12
* Bit Group Name: IF_INC
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_IF_INC_DISABLED = 0x00,
LSM6DSL_ACC_GYRO_IF_INC_ENABLED = 0x04,
} LSM6DSL_ACC_GYRO_IF_INC_t;
#define LSM6DSL_ACC_GYRO_IF_INC_MASK 0x04
status_t LSM6DSL_ACC_GYRO_W_IF_Addr_Incr(void *handle, LSM6DSL_ACC_GYRO_IF_INC_t newValue);
status_t LSM6DSL_ACC_GYRO_R_IF_Addr_Incr(void *handle, LSM6DSL_ACC_GYRO_IF_INC_t *value);
/*******************************************************************************
* Register : CTRL3_C
* Address : 0X12
* Bit Group Name: SIM
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_SIM_4_WIRE = 0x00,
LSM6DSL_ACC_GYRO_SIM_3_WIRE = 0x08,
} LSM6DSL_ACC_GYRO_SIM_t;
#define LSM6DSL_ACC_GYRO_SIM_MASK 0x08
status_t LSM6DSL_ACC_GYRO_W_SPI_Mode(void *handle, LSM6DSL_ACC_GYRO_SIM_t newValue);
status_t LSM6DSL_ACC_GYRO_R_SPI_Mode(void *handle, LSM6DSL_ACC_GYRO_SIM_t *value);
/*******************************************************************************
* Register : CTRL3_C
* Address : 0X12
* Bit Group Name: PP_OD
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_PP_OD_PUSH_PULL = 0x00,
LSM6DSL_ACC_GYRO_PP_OD_OPEN_DRAIN = 0x10,
} LSM6DSL_ACC_GYRO_PP_OD_t;
#define LSM6DSL_ACC_GYRO_PP_OD_MASK 0x10
status_t LSM6DSL_ACC_GYRO_W_PadSel(void *handle, LSM6DSL_ACC_GYRO_PP_OD_t newValue);
status_t LSM6DSL_ACC_GYRO_R_PadSel(void *handle, LSM6DSL_ACC_GYRO_PP_OD_t *value);
/*******************************************************************************
* Register : CTRL3_C
* Address : 0X12
* Bit Group Name: H_LACTIVE
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_INT_ACT_LEVEL_ACTIVE_HI = 0x00,
LSM6DSL_ACC_GYRO_INT_ACT_LEVEL_ACTIVE_LO = 0x20,
} LSM6DSL_ACC_GYRO_INT_ACT_LEVEL_t;
#define LSM6DSL_ACC_GYRO_INT_ACT_LEVEL_MASK 0x20
status_t LSM6DSL_ACC_GYRO_W_INT_ACT_LEVEL(void *handle, LSM6DSL_ACC_GYRO_INT_ACT_LEVEL_t newValue);
status_t LSM6DSL_ACC_GYRO_R_INT_ACT_LEVEL(void *handle, LSM6DSL_ACC_GYRO_INT_ACT_LEVEL_t *value);
/*******************************************************************************
* Register : CTRL3_C
* Address : 0X12
* Bit Group Name: BOOT
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_BOOT_NORMAL_MODE = 0x00,
LSM6DSL_ACC_GYRO_BOOT_REBOOT_MODE = 0x80,
} LSM6DSL_ACC_GYRO_BOOT_t;
#define LSM6DSL_ACC_GYRO_BOOT_MASK 0x80
status_t LSM6DSL_ACC_GYRO_W_BOOT(void *handle, LSM6DSL_ACC_GYRO_BOOT_t newValue);
status_t LSM6DSL_ACC_GYRO_R_BOOT(void *handle, LSM6DSL_ACC_GYRO_BOOT_t *value);
/*******************************************************************************
* Register : CTRL4_C
* Address : 0X13
* Bit Group Name: LPF1_SEL_G
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_MODE3_LPF1_G_DISABLED = 0x00,
LSM6DSL_ACC_GYRO_MODE3_LPF1_G_ENABLED = 0x02,
} LSM6DSL_ACC_GYRO_LPF1_SEL_G_t;
#define LSM6DSL_ACC_GYRO_LPF1_SEL_G_MASK 0x02
status_t LSM6DSL_ACC_GYRO_W_LPF1_SEL_G(void *handle, LSM6DSL_ACC_GYRO_LPF1_SEL_G_t newValue);
status_t LSM6DSL_ACC_GYRO_R_LPF1_SEL_G(void *handle, LSM6DSL_ACC_GYRO_LPF1_SEL_G_t *value);
/*******************************************************************************
* Register : CTRL4_C
* Address : 0X13
* Bit Group Name: I2C_DISABLE
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_I2C_DISABLE_I2C_AND_SPI = 0x00,
LSM6DSL_ACC_GYRO_I2C_DISABLE_SPI_ONLY = 0x04,
} LSM6DSL_ACC_GYRO_I2C_DISABLE_t;
#define LSM6DSL_ACC_GYRO_I2C_DISABLE_MASK 0x04
status_t LSM6DSL_ACC_GYRO_W_I2C_DISABLE(void *handle, LSM6DSL_ACC_GYRO_I2C_DISABLE_t newValue);
status_t LSM6DSL_ACC_GYRO_R_I2C_DISABLE(void *handle, LSM6DSL_ACC_GYRO_I2C_DISABLE_t *value);
/*******************************************************************************
* Register : CTRL4_C
* Address : 0X13
* Bit Group Name: DRDY_MSK
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_DRDY_MSK_DISABLED = 0x00,
LSM6DSL_ACC_GYRO_DRDY_MSK_ENABLED = 0x08,
} LSM6DSL_ACC_GYRO_DRDY_MSK_t;
#define LSM6DSL_ACC_GYRO_DRDY_MSK_MASK 0x08
status_t LSM6DSL_ACC_GYRO_W_DRDY_MSK(void *handle, LSM6DSL_ACC_GYRO_DRDY_MSK_t newValue);
status_t LSM6DSL_ACC_GYRO_R_DRDY_MSK(void *handle, LSM6DSL_ACC_GYRO_DRDY_MSK_t *value);
/*******************************************************************************
* Register : CTRL4_C
* Address : 0X13
* Bit Group Name: INT2_ON_INT1
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_INT2_ON_INT1_DISABLED = 0x00,
LSM6DSL_ACC_GYRO_INT2_ON_INT1_ENABLED = 0x20,
} LSM6DSL_ACC_GYRO_INT2_ON_INT1_t;
#define LSM6DSL_ACC_GYRO_INT2_ON_INT1_MASK 0x20
status_t LSM6DSL_ACC_GYRO_W_INT2_ON_INT1(void *handle, LSM6DSL_ACC_GYRO_INT2_ON_INT1_t newValue);
status_t LSM6DSL_ACC_GYRO_R_INT2_ON_INT1(void *handle, LSM6DSL_ACC_GYRO_INT2_ON_INT1_t *value);
/*******************************************************************************
* Register : CTRL4_C
* Address : 0X13
* Bit Group Name: SLEEP_G
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_SLEEP_G_DISABLED = 0x00,
LSM6DSL_ACC_GYRO_SLEEP_G_ENABLED = 0x40,
} LSM6DSL_ACC_GYRO_SLEEP_G_t;
#define LSM6DSL_ACC_GYRO_SLEEP_G_MASK 0x40
status_t LSM6DSL_ACC_GYRO_W_SleepMode_G(void *handle, LSM6DSL_ACC_GYRO_SLEEP_G_t newValue);
status_t LSM6DSL_ACC_GYRO_R_SleepMode_G(void *handle, LSM6DSL_ACC_GYRO_SLEEP_G_t *value);
/*******************************************************************************
* Register : CTRL5_C
* Address : 0X14
* Bit Group Name: ST_XL
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_ST_XL_NORMAL_MODE = 0x00,
LSM6DSL_ACC_GYRO_ST_XL_POS_SIGN_TEST = 0x01,
LSM6DSL_ACC_GYRO_ST_XL_NEG_SIGN_TEST = 0x02,
LSM6DSL_ACC_GYRO_ST_XL_NA = 0x03,
} LSM6DSL_ACC_GYRO_ST_XL_t;
#define LSM6DSL_ACC_GYRO_ST_XL_MASK 0x03
status_t LSM6DSL_ACC_GYRO_W_SelfTest_XL(void *handle, LSM6DSL_ACC_GYRO_ST_XL_t newValue);
status_t LSM6DSL_ACC_GYRO_R_SelfTest_XL(void *handle, LSM6DSL_ACC_GYRO_ST_XL_t *value);
/*******************************************************************************
* Register : CTRL5_C
* Address : 0X14
* Bit Group Name: ST_G
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_ST_G_NORMAL_MODE = 0x00,
LSM6DSL_ACC_GYRO_ST_G_POS_SIGN_TEST = 0x04,
LSM6DSL_ACC_GYRO_ST_G_NA = 0x08,
LSM6DSL_ACC_GYRO_ST_G_NEG_SIGN_TEST = 0x0C,
} LSM6DSL_ACC_GYRO_ST_G_t;
#define LSM6DSL_ACC_GYRO_ST_G_MASK 0x0C
status_t LSM6DSL_ACC_GYRO_W_SelfTest_G(void *handle, LSM6DSL_ACC_GYRO_ST_G_t newValue);
status_t LSM6DSL_ACC_GYRO_R_SelfTest_G(void *handle, LSM6DSL_ACC_GYRO_ST_G_t *value);
/*******************************************************************************
* Register : CTRL5_C
* Address : 0X14
* Bit Group Name: DEN_LH
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_DEN_LOW = 0x00,
LSM6DSL_ACC_GYRO_DEN_HIGH = 0x10,
} LSM6DSL_ACC_GYRO_DEN_LH_t;
#define LSM6DSL_ACC_GYRO_DEN_LH_MASK 0x10
status_t LSM6DSL_ACC_GYRO_W_DEN_Polarity(void *handle, LSM6DSL_ACC_GYRO_DEN_LH_t newValue);
status_t LSM6DSL_ACC_GYRO_R_DEN_Polarity(void *handle, LSM6DSL_ACC_GYRO_DEN_LH_t *value);
/*******************************************************************************
* Register : CTRL5_C
* Address : 0X14
* Bit Group Name: ST_ROUNDING
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_NO_ROUNDING = 0x00,
LSM6DSL_ACC_GYRO_ACC_ONLY = 0x20,
LSM6DSL_ACC_GYRO_GYRO_ONLY = 0x40,
LSM6DSL_ACC_GYRO_ACC_GYRO = 0x60,
LSM6DSL_ACC_GYRO_SH1_SH6 = 0x80,
LSM6DSL_ACC_GYRO_ACC_SH1_SH6 = 0xA0,
LSM6DSL_ACC_GYRO_ACC_GYRO_SH1_SH6_SH7_SH12 = 0xC0,
LSM6DSL_ACC_GYRO_ACC_GYRO_SH1_SH6 = 0xE0,
} LSM6DSL_ACC_GYRO_ROUNDING_t;
#define LSM6DSL_ACC_GYRO_LSM6DSL_ACC_GYRO_ROUNDING_t_MASK 0xE0
status_t LSM6DSL_ACC_GYRO_W_CircularBurstMode(void *handle, LSM6DSL_ACC_GYRO_ROUNDING_t newValue);
status_t LSM6DSL_ACC_GYRO_R_CircularBurstMode(void *handle, LSM6DSL_ACC_GYRO_ROUNDING_t *value);
/*******************************************************************************
* Register : CTRL6_G
* Address : 0X15
* Bit Group Name: FTYPE
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_LP_G_NORMAL = 0x00,
LSM6DSL_ACC_GYRO_LP_G_NARROW = 0x01,
LSM6DSL_ACC_GYRO_LP_G_VERY_NARROW = 0x02,
LSM6DSL_ACC_GYRO_LP_G_WIDE = 0x03,
} LSM6DSL_ACC_GYRO_FTYPE_t;
#define LSM6DSL_ACC_GYRO_FTYPE_MASK 0x03
status_t LSM6DSL_ACC_GYRO_W_LP_BW_G(void *handle, LSM6DSL_ACC_GYRO_FTYPE_t newValue);
status_t LSM6DSL_ACC_GYRO_R_LP_BW_G(void *handle, LSM6DSL_ACC_GYRO_FTYPE_t *value);
/*******************************************************************************
* Register : CTRL6_G
* Address : 0X15
* Bit Group Name: USR_OFF_W
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_2Emin10 = 0x00,
LSM6DSL_ACC_GYRO_2Emin6 = 0x08,
} LSM6DSL_ACC_GYRO_USR_OFF_W_t;
#define LSM6DSL_ACC_GYRO_USR_OFF_W_MASK 0x08
status_t LSM6DSL_ACC_GYRO_W_UserOffsetWeight(void *handle, LSM6DSL_ACC_GYRO_USR_OFF_W_t newValue);
status_t LSM6DSL_ACC_GYRO_R_UserOffsetWeight(void *handle, LSM6DSL_ACC_GYRO_USR_OFF_W_t *value);
/*******************************************************************************
* Register : CTRL6_G
* Address : 0X15
* Bit Group Name: LP_XL
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_LP_XL_DISABLED = 0x00,
LSM6DSL_ACC_GYRO_LP_XL_ENABLED = 0x10,
} LSM6DSL_ACC_GYRO_LP_XL_t;
#define LSM6DSL_ACC_GYRO_LP_XL_MASK 0x10
status_t LSM6DSL_ACC_GYRO_W_LowPower_XL(void *handle, LSM6DSL_ACC_GYRO_LP_XL_t newValue);
status_t LSM6DSL_ACC_GYRO_R_LowPower_XL(void *handle, LSM6DSL_ACC_GYRO_LP_XL_t *value);
/*******************************************************************************
* Register : CTRL6_G
* Address : 0X15
* Bit Group Name: DEN_LVL2_EN
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_DEN_LVL2_EN_DISABLED = 0x00,
LSM6DSL_ACC_GYRO_DEN_LVL2_EN_ENABLED = 0x20,
} LSM6DSL_ACC_GYRO_DEN_LVL2_EN_t;
#define LSM6DSL_ACC_GYRO_DEN_LVL2_EN_MASK 0x20
status_t LSM6DSL_ACC_GYRO_W_DEN_LVL2_EN(void *handle, LSM6DSL_ACC_GYRO_DEN_LVL2_EN_t newValue);
status_t LSM6DSL_ACC_GYRO_R_DEN_LVL2_EN(void *handle, LSM6DSL_ACC_GYRO_DEN_LVL2_EN_t *value);
/*******************************************************************************
* Register : CTRL6_G
* Address : 0X15
* Bit Group Name: DEN_LVL_EN
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_DEN_LVL_EN_DISABLED = 0x00,
LSM6DSL_ACC_GYRO_DEN_LVL_EN_ENABLED = 0x40,
} LSM6DSL_ACC_GYRO_DEN_LVL_EN_t;
#define LSM6DSL_ACC_GYRO_DEN_LVL_EN_MASK 0x40
status_t LSM6DSL_ACC_GYRO_W_DEN_LVL_EN(void *handle, LSM6DSL_ACC_GYRO_DEN_LVL_EN_t newValue);
status_t LSM6DSL_ACC_GYRO_R_DEN_LVL_EN(void *handle, LSM6DSL_ACC_GYRO_DEN_LVL_EN_t *value);
/*******************************************************************************
* Register : CTRL6_G
* Address : 0X15
* Bit Group Name: TRIG_EN
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_DEN_EDGE_EN_DISABLED = 0x00,
LSM6DSL_ACC_GYRO_DEN_EDGE_EN_ENABLED = 0x80,
} LSM6DSL_ACC_GYRO_DEN_EDGE_EN_t;
#define LSM6DSL_ACC_GYRO_DEN_EDGE_EN_MASK 0x80
status_t LSM6DSL_ACC_GYRO_W_ExternalTrigger(void *handle, LSM6DSL_ACC_GYRO_DEN_EDGE_EN_t newValue);
status_t LSM6DSL_ACC_GYRO_R_ExternalTrigger(void *handle, LSM6DSL_ACC_GYRO_DEN_EDGE_EN_t *value);
/*******************************************************************************
* Register : CTRL7_G
* Address : 0X16
* Bit Group Name: ROUNDING_STATUS
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_RND_DISABLE = 0x00,
LSM6DSL_ACC_GYRO_RND_ENABLE = 0x04,
} LSM6DSL_ACC_GYRO_RND_STATUS_t;
#define LSM6DSL_ACC_GYRO_RND_STATUS_MASK 0x04
status_t LSM6DSL_ACC_GYRO_W_RoundingOnStatusRegisters(void *handle, LSM6DSL_ACC_GYRO_RND_STATUS_t newValue);
status_t LSM6DSL_ACC_GYRO_R_RoundingOnStatusRegisters(void *handle, LSM6DSL_ACC_GYRO_RND_STATUS_t *value);
/*******************************************************************************
* Register : CTRL7_G
* Address : 0X16
* Bit Group Name: HPM_G
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_HPM_G_0Hz016 = 0x00,
LSM6DSL_ACC_GYRO_HPM_G_0Hz065 = 0x10,
LSM6DSL_ACC_GYRO_HPM_G_2Hz260 = 0x20,
LSM6DSL_ACC_GYRO_HPM_G_1Hz04 = 0x30,
} LSM6DSL_ACC_GYRO_HPM_G_t;
#define LSM6DSL_ACC_GYRO_HPM_G_MASK 0x30
status_t LSM6DSL_ACC_GYRO_W_HPM_G(void *handle, LSM6DSL_ACC_GYRO_HPM_G_t newValue);
status_t LSM6DSL_ACC_GYRO_R_HPM_G(void *handle, LSM6DSL_ACC_GYRO_HPM_G_t *value);
/*******************************************************************************
* Register : CTRL7_G
* Address : 0X16
* Bit Group Name: HP_EN_G
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_HP_EN_DISABLED = 0x00,
LSM6DSL_ACC_GYRO_HP_EN_ENABLED = 0x40,
} LSM6DSL_ACC_GYRO_HP_EN_t;
#define LSM6DSL_ACC_GYRO_HP_EN_MASK 0x40
status_t LSM6DSL_ACC_GYRO_W_HPFilter_En(void *handle, LSM6DSL_ACC_GYRO_HP_EN_t newValue);
status_t LSM6DSL_ACC_GYRO_R_HPFilter_En(void *handle, LSM6DSL_ACC_GYRO_HP_EN_t *value);
/*******************************************************************************
* Register : CTRL7_G
* Address : 0X16
* Bit Group Name: LP_EN
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_LP_EN_DISABLED = 0x00,
LSM6DSL_ACC_GYRO_LP_EN_ENABLED = 0x80,
} LSM6DSL_ACC_GYRO_LP_EN_t;
#define LSM6DSL_ACC_GYRO_LP_EN_MASK 0x80
status_t LSM6DSL_ACC_GYRO_W_LP_Mode(void *handle, LSM6DSL_ACC_GYRO_LP_EN_t newValue);
status_t LSM6DSL_ACC_GYRO_R_LP_Mode(void *handle, LSM6DSL_ACC_GYRO_LP_EN_t *value);
/*******************************************************************************
* Register : CTRL7_G
* Address : 0X16
* Bit Group Name: ROUNDING_STATUS
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_ROUNDING_STATUS_DISABLED = 0x00,
LSM6DSL_ACC_GYRO_ROUNDING_STATUS_ENABLED = 0x04,
} LSM6DSL_ACC_GYRO_ROUNDING_STATUS_t;
#define LSM6DSL_ACC_GYRO_ROUNDING_STATUS_MASK 0x04
status_t LSM6DSL_ACC_GYRO_W_ROUNDING_STATUS(void *handle, LSM6DSL_ACC_GYRO_ROUNDING_STATUS_t newValue);
status_t LSM6DSL_ACC_GYRO_R_ROUNDING_STATUS(void *handle, LSM6DSL_ACC_GYRO_ROUNDING_STATUS_t *value);
/*******************************************************************************
* Register : CTRL7_G
* Address : 0X16
* Bit Group Name: HP_G_RST
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_HP_G_RST_OFF = 0x00,
LSM6DSL_ACC_GYRO_HP_G_RST_ON = 0x08,
} LSM6DSL_ACC_GYRO_HP_G_RST_t;
#define LSM6DSL_ACC_GYRO_HP_G_RST_MASK 0x08
status_t LSM6DSL_ACC_GYRO_W_HP_G_RST(void *handle, LSM6DSL_ACC_GYRO_HP_G_RST_t newValue);
status_t LSM6DSL_ACC_GYRO_R_HP_G_RST(void *handle, LSM6DSL_ACC_GYRO_HP_G_RST_t *value);
/*******************************************************************************
* Register : CTRL8_XL
* Address : 0X17
* Bit Group Name: LOW_PASS_ON_6D
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_LOW_PASS_ON_6D_OFF = 0x00,
LSM6DSL_ACC_GYRO_LOW_PASS_ON_6D_ON = 0x01,
} LSM6DSL_ACC_GYRO_LOW_PASS_ON_6D_t;
#define LSM6DSL_ACC_GYRO_LOW_PASS_ON_6D_MASK 0x01
status_t LSM6DSL_ACC_GYRO_W_LOW_PASS_ON_6D(void *handle, LSM6DSL_ACC_GYRO_LOW_PASS_ON_6D_t newValue);
status_t LSM6DSL_ACC_GYRO_R_LOW_PASS_ON_6D(void *handle, LSM6DSL_ACC_GYRO_LOW_PASS_ON_6D_t *value);
/*******************************************************************************
* Register : CTRL8_XL
* Address : 0X17
* Bit Group Name: HP_SLOPE_XL_EN
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_HP_SLOPE_XL_EN = 0x00,
LSM6DSL_ACC_GYRO_HP_SLOPE_XL_DIS = 0x04,
} LSM6DSL_ACC_GYRO_HP_SLOPE_XL_t;
#define LSM6DSL_ACC_GYRO_HP_SLOPE_XL_MASK 0x04
status_t LSM6DSL_ACC_GYRO_W_HP_SLOPE_XL(void *handle, LSM6DSL_ACC_GYRO_HP_SLOPE_XL_t newValue);
status_t LSM6DSL_ACC_GYRO_R_HP_SLOPE_XL(void *handle, LSM6DSL_ACC_GYRO_HP_SLOPE_XL_t *value);
/*******************************************************************************
* Register : CTRL8_XL
* Address : 0X17
* Bit Group Name: INPUT_COMPOSITE
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_IN_ODR_DIV_2 = 0x00,
LSM6DSL_ACC_GYRO_IN_ODR_DIV_4 = 0x80,
} LSM6DSL_ACC_GYRO_IN_COMP_t;
#define LSM6DSL_ACC_GYRO_IN_COMP_MASK 0x80
status_t LSM6DSL_ACC_GYRO_W_InComposit(void *handle, LSM6DSL_ACC_GYRO_IN_COMP_t newValue);
status_t LSM6DSL_ACC_GYRO_R_InComposit(void *handle, LSM6DSL_ACC_GYRO_IN_COMP_t *value);
/*******************************************************************************
* Register : CTRL8_XL
* Address : 0X17
* Bit Group Name: HP_REF_MODE
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_HP_REF_DISABLE = 0x00,
LSM6DSL_ACC_GYRO_HP_REF_ENABLE = 0x10,
} LSM6DSL_ACC_GYRO_HP_REF_MODE_t;
#define LSM6DSL_ACC_GYRO_HP_REF_MODE_MASK 0x10
status_t LSM6DSL_ACC_GYRO_W_HPfilterReference(void *handle, LSM6DSL_ACC_GYRO_HP_REF_MODE_t newValue);
status_t LSM6DSL_ACC_GYRO_R_HPfilterReference(void *handle, LSM6DSL_ACC_GYRO_HP_REF_MODE_t *value);
/*******************************************************************************
* Register : CTRL8_XL
* Address : 0X17
* Bit Group Name: HPCF_XL
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_HPCF_XL_DIV4 = 0x00,
LSM6DSL_ACC_GYRO_HPCF_XL_DIV100 = 0x20,
LSM6DSL_ACC_GYRO_HPCF_XL_DIV9 = 0x40,
LSM6DSL_ACC_GYRO_HPCF_XL_DIV400 = 0x60,
} LSM6DSL_ACC_GYRO_HPCF_XL_t;
#define LSM6DSL_ACC_GYRO_HPCF_XL_MASK 0x60
status_t LSM6DSL_ACC_GYRO_W_HPCF_XL(void *handle, LSM6DSL_ACC_GYRO_HPCF_XL_t newValue);
status_t LSM6DSL_ACC_GYRO_R_HPCF_XL(void *handle, LSM6DSL_ACC_GYRO_HPCF_XL_t *value);
/*******************************************************************************
* Register : CTRL8_XL
* Address : 0X17
* Bit Group Name: LPF2_XL_EN
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_LPF2_XL_DISABLE = 0x00,
LSM6DSL_ACC_GYRO_LPF2_XL_ENABLE = 0x80,
} LSM6DSL_ACC_GYRO_LPF2_XL_t;
#define LSM6DSL_ACC_GYRO_LPF2_XL_MASK 0x80
status_t LSM6DSL_ACC_GYRO_W_LowPassFiltSel_XL(void *handle, LSM6DSL_ACC_GYRO_LPF2_XL_t newValue);
status_t LSM6DSL_ACC_GYRO_R_LowPassFiltSel_XL(void *handle, LSM6DSL_ACC_GYRO_LPF2_XL_t *value);
/*******************************************************************************
* Register : CTRL9_XL
* Address : 0X18
* Bit Group Name: SOFT_EN
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_SOFT_DISABLED = 0x00,
LSM6DSL_ACC_GYRO_SOFT_ENABLE = 0x04,
} LSM6DSL_ACC_GYRO_SOFT_t;
#define LSM6DSL_ACC_GYRO_SOFT_MASK 0x04
status_t LSM6DSL_ACC_GYRO_W_SOFT(void *handle, LSM6DSL_ACC_GYRO_SOFT_t newValue);
status_t LSM6DSL_ACC_GYRO_R_SOFT(void *handle, LSM6DSL_ACC_GYRO_SOFT_t *value);
/*******************************************************************************
* Register : CTRL10_C
* Address : 0X19
* Bit Group Name: SIGN_MOTION_EN
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_SIGN_MOTION_EN_DISABLED = 0x00,
LSM6DSL_ACC_GYRO_SIGN_MOTION_EN_ENABLED = 0x01,
} LSM6DSL_ACC_GYRO_SIGN_MOTION_EN_t;
#define LSM6DSL_ACC_GYRO_SIGN_MOTION_EN_MASK 0x01
status_t LSM6DSL_ACC_GYRO_W_SignifcantMotion(void *handle, LSM6DSL_ACC_GYRO_SIGN_MOTION_EN_t newValue);
status_t LSM6DSL_ACC_GYRO_R_SignifcantMotion(void *handle, LSM6DSL_ACC_GYRO_SIGN_MOTION_EN_t *value);
/*******************************************************************************
* Register : CTRL10_C
* Address : 0X19
* Bit Group Name: PEDO_RST_STEP
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_PEDO_RST_STEP_DISABLED = 0x00,
LSM6DSL_ACC_GYRO_PEDO_RST_STEP_ENABLED = 0x02,
} LSM6DSL_ACC_GYRO_PEDO_RST_STEP_t;
#define LSM6DSL_ACC_GYRO_PEDO_RST_STEP_MASK 0x02
status_t LSM6DSL_ACC_GYRO_W_PedoStepReset(void *handle, LSM6DSL_ACC_GYRO_PEDO_RST_STEP_t newValue);
status_t LSM6DSL_ACC_GYRO_R_PedoStepReset(void *handle, LSM6DSL_ACC_GYRO_PEDO_RST_STEP_t *value);
/*******************************************************************************
* Register : CTRL10_C
* Address : 0X19
* Bit Group Name: FUNC_EN
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_FUNC_EN_DISABLED = 0x00,
LSM6DSL_ACC_GYRO_FUNC_EN_ENABLED = 0x04,
} LSM6DSL_ACC_GYRO_FUNC_EN_t;
#define LSM6DSL_ACC_GYRO_FUNC_EN_MASK 0x04
status_t LSM6DSL_ACC_GYRO_W_FUNC_EN(void *handle, LSM6DSL_ACC_GYRO_FUNC_EN_t newValue);
status_t LSM6DSL_ACC_GYRO_R_FUNC_EN(void *handle, LSM6DSL_ACC_GYRO_FUNC_EN_t *value);
/*******************************************************************************
* Register : CTRL10_C
* Address : 0X19
* Bit Group Name: TILT_EN
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_TILT_DISABLED = 0x00,
LSM6DSL_ACC_GYRO_TILT_ENABLED = 0x08,
} LSM6DSL_ACC_GYRO_TILT_G_t;
#define LSM6DSL_ACC_GYRO_TILT_MASK 0x08
status_t LSM6DSL_ACC_GYRO_W_TILT(void *handle, LSM6DSL_ACC_GYRO_TILT_G_t newValue);
status_t LSM6DSL_ACC_GYRO_R_TILT(void *handle, LSM6DSL_ACC_GYRO_TILT_G_t *value);
/*******************************************************************************
* Register : CTRL10_C
* Address : 0X19
* Bit Group Name: PEDO_EN
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_PEDO_DISABLED = 0x00,
LSM6DSL_ACC_GYRO_PEDO_ENABLED = 0x10,
} LSM6DSL_ACC_GYRO_PEDO_t;
#define LSM6DSL_ACC_GYRO_PEDO_MASK 0x10
status_t LSM6DSL_ACC_GYRO_W_PEDO(void *handle, LSM6DSL_ACC_GYRO_PEDO_t newValue);
status_t LSM6DSL_ACC_GYRO_R_PEDO(void *handle, LSM6DSL_ACC_GYRO_PEDO_t *value);
/*******************************************************************************
* Register : CTRL10_C
* Address : 0X19
* Bit Group Name: TIMER_EN
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_TIMER_DISABLED = 0x00,
LSM6DSL_ACC_GYRO_TIMER_ENABLED = 0x20,
} LSM6DSL_ACC_GYRO_TIMER_t;
#define LSM6DSL_ACC_GYRO_TIMER_MASK 0x20
status_t LSM6DSL_ACC_GYRO_W_TIMER(void *handle, LSM6DSL_ACC_GYRO_TIMER_t newValue);
status_t LSM6DSL_ACC_GYRO_R_TIMER(void *handle, LSM6DSL_ACC_GYRO_TIMER_t *value);
/*******************************************************************************
* Register : MASTER_CONFIG
* Address : 0X1A
* Bit Group Name: MASTER_ON
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_MASTER_ON_DISABLED = 0x00,
LSM6DSL_ACC_GYRO_MASTER_ON_ENABLED = 0x01,
} LSM6DSL_ACC_GYRO_MASTER_ON_t;
#define LSM6DSL_ACC_GYRO_MASTER_ON_MASK 0x01
status_t LSM6DSL_ACC_GYRO_W_I2C_MASTER_Enable(void *handle, LSM6DSL_ACC_GYRO_MASTER_ON_t newValue);
status_t LSM6DSL_ACC_GYRO_R_I2C_MASTER_Enable(void *handle, LSM6DSL_ACC_GYRO_MASTER_ON_t *value);
/*******************************************************************************
* Register : MASTER_CONFIG
* Address : 0X1A
* Bit Group Name: IRON_EN
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_IRON_EN_DISABLED = 0x00,
LSM6DSL_ACC_GYRO_IRON_EN_ENABLED = 0x02,
} LSM6DSL_ACC_GYRO_IRON_EN_t;
#define LSM6DSL_ACC_GYRO_IRON_EN_MASK 0x02
status_t LSM6DSL_ACC_GYRO_W_IronCorrection_EN(void *handle, LSM6DSL_ACC_GYRO_IRON_EN_t newValue);
status_t LSM6DSL_ACC_GYRO_R_IronCorrection_EN(void *handle, LSM6DSL_ACC_GYRO_IRON_EN_t *value);
/*******************************************************************************
* Register : MASTER_CONFIG
* Address : 0X1A
* Bit Group Name: PASS_THRU_MODE
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_PASS_THRU_MODE_DISABLED = 0x00,
LSM6DSL_ACC_GYRO_PASS_THRU_MODE_ENABLED = 0x04,
} LSM6DSL_ACC_GYRO_PASS_THRU_MODE_t;
#define LSM6DSL_ACC_GYRO_PASS_THRU_MODE_MASK 0x04
status_t LSM6DSL_ACC_GYRO_W_PASS_THRU_MODE(void *handle, LSM6DSL_ACC_GYRO_PASS_THRU_MODE_t newValue);
status_t LSM6DSL_ACC_GYRO_R_PASS_THRU_MODE(void *handle, LSM6DSL_ACC_GYRO_PASS_THRU_MODE_t *value);
/*******************************************************************************
* Register : MASTER_CONFIG
* Address : 0X1A
* Bit Group Name: PULL_UP_EN
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_PULL_UP_EN_DISABLED = 0x00,
LSM6DSL_ACC_GYRO_PULL_UP_EN_ENABLED = 0x08,
} LSM6DSL_ACC_GYRO_PULL_UP_EN_t;
#define LSM6DSL_ACC_GYRO_PULL_UP_EN_MASK 0x08
status_t LSM6DSL_ACC_GYRO_W_PULL_UP_EN(void *handle, LSM6DSL_ACC_GYRO_PULL_UP_EN_t newValue);
status_t LSM6DSL_ACC_GYRO_R_PULL_UP_EN(void *handle, LSM6DSL_ACC_GYRO_PULL_UP_EN_t *value);
/*******************************************************************************
* Register : MASTER_CONFIG
* Address : 0X1A
* Bit Group Name: START_CONFIG
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_START_CONFIG_XL_G_DRDY = 0x00,
LSM6DSL_ACC_GYRO_START_CONFIG_EXT_INT2 = 0x10,
} LSM6DSL_ACC_GYRO_START_CONFIG_t;
#define LSM6DSL_ACC_GYRO_START_CONFIG_MASK 0x10
status_t LSM6DSL_ACC_GYRO_W_SensorHUB_Trigger_Sel(void *handle, LSM6DSL_ACC_GYRO_START_CONFIG_t newValue);
status_t LSM6DSL_ACC_GYRO_R_SensorHUB_Trigger_Sel(void *handle, LSM6DSL_ACC_GYRO_START_CONFIG_t *value);
/*******************************************************************************
* Register : MASTER_CONFIG
* Address : 0X1A
* Bit Group Name: DATA_VAL_SEL_FIFO
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_DATA_VAL_SEL_FIFO_XL_G_DRDY = 0x00,
LSM6DSL_ACC_GYRO_DATA_VAL_SEL_FIFO_SHUB_DRDY = 0x40,
} LSM6DSL_ACC_GYRO_DATA_VAL_SEL_FIFO_t;
#define LSM6DSL_ACC_GYRO_DATA_VAL_SEL_FIFO_MASK 0x40
status_t LSM6DSL_ACC_GYRO_W_DATA_VAL_SEL_FIFO(void *handle, LSM6DSL_ACC_GYRO_DATA_VAL_SEL_FIFO_t newValue);
status_t LSM6DSL_ACC_GYRO_R_DATA_VAL_SEL_FIFO(void *handle, LSM6DSL_ACC_GYRO_DATA_VAL_SEL_FIFO_t *value);
/*******************************************************************************
* Register : MASTER_CONFIG
* Address : 0X1A
* Bit Group Name: DRDY_ON_INT1
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_DRDY_ON_INT1_DISABLED = 0x00,
LSM6DSL_ACC_GYRO_DRDY_ON_INT1_ENABLED = 0x80,
} LSM6DSL_ACC_GYRO_DRDY_ON_INT1_t;
#define LSM6DSL_ACC_GYRO_DRDY_ON_INT1_MASK 0x80
status_t LSM6DSL_ACC_GYRO_W_DRDY_ON_INT1(void *handle, LSM6DSL_ACC_GYRO_DRDY_ON_INT1_t newValue);
status_t LSM6DSL_ACC_GYRO_R_DRDY_ON_INT1(void *handle, LSM6DSL_ACC_GYRO_DRDY_ON_INT1_t *value);
/*******************************************************************************
* Register : WAKE_UP_SRC
* Address : 0X1B
* Bit Group Name: Z_WU
* Permission : RO
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_Z_WU_NOT_DETECTED = 0x00,
LSM6DSL_ACC_GYRO_Z_WU_DETECTED = 0x01,
} LSM6DSL_ACC_GYRO_Z_WU_t;
#define LSM6DSL_ACC_GYRO_Z_WU_MASK 0x01
status_t LSM6DSL_ACC_GYRO_R_Z_WU(void *handle, LSM6DSL_ACC_GYRO_Z_WU_t *value);
/*******************************************************************************
* Register : WAKE_UP_SRC
* Address : 0X1B
* Bit Group Name: Y_WU
* Permission : RO
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_Y_WU_NOT_DETECTED = 0x00,
LSM6DSL_ACC_GYRO_Y_WU_DETECTED = 0x02,
} LSM6DSL_ACC_GYRO_Y_WU_t;
#define LSM6DSL_ACC_GYRO_Y_WU_MASK 0x02
status_t LSM6DSL_ACC_GYRO_R_Y_WU(void *handle, LSM6DSL_ACC_GYRO_Y_WU_t *value);
/*******************************************************************************
* Register : WAKE_UP_SRC
* Address : 0X1B
* Bit Group Name: X_WU
* Permission : RO
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_X_WU_NOT_DETECTED = 0x00,
LSM6DSL_ACC_GYRO_X_WU_DETECTED = 0x04,
} LSM6DSL_ACC_GYRO_X_WU_t;
#define LSM6DSL_ACC_GYRO_X_WU_MASK 0x04
status_t LSM6DSL_ACC_GYRO_R_X_WU(void *handle, LSM6DSL_ACC_GYRO_X_WU_t *value);
/*******************************************************************************
* Register : WAKE_UP_SRC
* Address : 0X1B
* Bit Group Name: WU_EV_STATUS
* Permission : RO
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_WU_EV_STATUS_NOT_DETECTED = 0x00,
LSM6DSL_ACC_GYRO_WU_EV_STATUS_DETECTED = 0x08,
} LSM6DSL_ACC_GYRO_WU_EV_STATUS_t;
#define LSM6DSL_ACC_GYRO_WU_EV_STATUS_MASK 0x08
status_t LSM6DSL_ACC_GYRO_R_WU_EV_STATUS(void *handle, LSM6DSL_ACC_GYRO_WU_EV_STATUS_t *value);
/*******************************************************************************
* Register : WAKE_UP_SRC
* Address : 0X1B
* Bit Group Name: SLEEP_EV_STATUS
* Permission : RO
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_SLEEP_EV_STATUS_NOT_DETECTED = 0x00,
LSM6DSL_ACC_GYRO_SLEEP_EV_STATUS_DETECTED = 0x10,
} LSM6DSL_ACC_GYRO_SLEEP_EV_STATUS_t;
#define LSM6DSL_ACC_GYRO_SLEEP_EV_STATUS_MASK 0x10
status_t LSM6DSL_ACC_GYRO_R_SLEEP_EV_STATUS(void *handle, LSM6DSL_ACC_GYRO_SLEEP_EV_STATUS_t *value);
/*******************************************************************************
* Register : WAKE_UP_SRC
* Address : 0X1B
* Bit Group Name: FF_EV_STATUS
* Permission : RO
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_FF_EV_STATUS_NOT_DETECTED = 0x00,
LSM6DSL_ACC_GYRO_FF_EV_STATUS_DETECTED = 0x20,
} LSM6DSL_ACC_GYRO_FF_EV_STATUS_t;
#define LSM6DSL_ACC_GYRO_FF_EV_STATUS_MASK 0x20
status_t LSM6DSL_ACC_GYRO_R_FF_EV_STATUS(void *handle, LSM6DSL_ACC_GYRO_FF_EV_STATUS_t *value);
/*******************************************************************************
* Register : TAP_SRC
* Address : 0X1C
* Bit Group Name: Z_TAP
* Permission : RO
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_Z_TAP_NOT_DETECTED = 0x00,
LSM6DSL_ACC_GYRO_Z_TAP_DETECTED = 0x01,
} LSM6DSL_ACC_GYRO_Z_TAP_t;
#define LSM6DSL_ACC_GYRO_Z_TAP_MASK 0x01
status_t LSM6DSL_ACC_GYRO_R_Z_TAP(void *handle, LSM6DSL_ACC_GYRO_Z_TAP_t *value);
/*******************************************************************************
* Register : TAP_SRC
* Address : 0X1C
* Bit Group Name: Y_TAP
* Permission : RO
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_Y_TAP_NOT_DETECTED = 0x00,
LSM6DSL_ACC_GYRO_Y_TAP_DETECTED = 0x02,
} LSM6DSL_ACC_GYRO_Y_TAP_t;
#define LSM6DSL_ACC_GYRO_Y_TAP_MASK 0x02
status_t LSM6DSL_ACC_GYRO_R_Y_TAP(void *handle, LSM6DSL_ACC_GYRO_Y_TAP_t *value);
/*******************************************************************************
* Register : TAP_SRC
* Address : 0X1C
* Bit Group Name: X_TAP
* Permission : RO
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_X_TAP_NOT_DETECTED = 0x00,
LSM6DSL_ACC_GYRO_X_TAP_DETECTED = 0x04,
} LSM6DSL_ACC_GYRO_X_TAP_t;
#define LSM6DSL_ACC_GYRO_X_TAP_MASK 0x04
status_t LSM6DSL_ACC_GYRO_R_X_TAP(void *handle, LSM6DSL_ACC_GYRO_X_TAP_t *value);
/*******************************************************************************
* Register : TAP_SRC
* Address : 0X1C
* Bit Group Name: TAP_SIGN
* Permission : RO
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_TAP_SIGN_POS_SIGN = 0x00,
LSM6DSL_ACC_GYRO_TAP_SIGN_NEG_SIGN = 0x08,
} LSM6DSL_ACC_GYRO_TAP_SIGN_t;
#define LSM6DSL_ACC_GYRO_TAP_SIGN_MASK 0x08
status_t LSM6DSL_ACC_GYRO_R_TAP_SIGN(void *handle, LSM6DSL_ACC_GYRO_TAP_SIGN_t *value);
/*******************************************************************************
* Register : TAP_SRC
* Address : 0X1C
* Bit Group Name: DOUBLE_TAP_EV_STATUS
* Permission : RO
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_DOUBLE_TAP_EV_STATUS_NOT_DETECTED = 0x00,
LSM6DSL_ACC_GYRO_DOUBLE_TAP_EV_STATUS_DETECTED = 0x10,
} LSM6DSL_ACC_GYRO_DOUBLE_TAP_EV_STATUS_t;
#define LSM6DSL_ACC_GYRO_DOUBLE_TAP_EV_STATUS_MASK 0x10
status_t LSM6DSL_ACC_GYRO_R_DOUBLE_TAP_EV_STATUS(void *handle, LSM6DSL_ACC_GYRO_DOUBLE_TAP_EV_STATUS_t *value);
/*******************************************************************************
* Register : TAP_SRC
* Address : 0X1C
* Bit Group Name: SINGLE_TAP_EV_STATUS
* Permission : RO
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_SINGLE_TAP_EV_STATUS_NOT_DETECTED = 0x00,
LSM6DSL_ACC_GYRO_SINGLE_TAP_EV_STATUS_DETECTED = 0x20,
} LSM6DSL_ACC_GYRO_SINGLE_TAP_EV_STATUS_t;
#define LSM6DSL_ACC_GYRO_SINGLE_TAP_EV_STATUS_MASK 0x20
status_t LSM6DSL_ACC_GYRO_R_SINGLE_TAP_EV_STATUS(void *handle, LSM6DSL_ACC_GYRO_SINGLE_TAP_EV_STATUS_t *value);
/*******************************************************************************
* Register : TAP_SRC
* Address : 0X1C
* Bit Group Name: TAP_EV_STATUS
* Permission : RO
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_TAP_EV_STATUS_NOT_DETECTED = 0x00,
LSM6DSL_ACC_GYRO_TAP_EV_STATUS_DETECTED = 0x40,
} LSM6DSL_ACC_GYRO_TAP_EV_STATUS_t;
#define LSM6DSL_ACC_GYRO_TAP_EV_STATUS_MASK 0x40
status_t LSM6DSL_ACC_GYRO_R_TAP_EV_STATUS(void *handle, LSM6DSL_ACC_GYRO_TAP_EV_STATUS_t *value);
/*******************************************************************************
* Register : D6D_SRC
* Address : 0X1D
* Bit Group Name: DSD_XL
* Permission : RO
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_DSD_XL_NOT_DETECTED = 0x00,
LSM6DSL_ACC_GYRO_DSD_XL_DETECTED = 0x01,
} LSM6DSL_ACC_GYRO_DSD_XL_t;
#define LSM6DSL_ACC_GYRO_DSD_XL_MASK 0x01
status_t LSM6DSL_ACC_GYRO_R_DSD_XL(void *handle, LSM6DSL_ACC_GYRO_DSD_XL_t *value);
/*******************************************************************************
* Register : D6D_SRC
* Address : 0X1D
* Bit Group Name: DSD_XH
* Permission : RO
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_DSD_XH_NOT_DETECTED = 0x00,
LSM6DSL_ACC_GYRO_DSD_XH_DETECTED = 0x02,
} LSM6DSL_ACC_GYRO_DSD_XH_t;
#define LSM6DSL_ACC_GYRO_DSD_XH_MASK 0x02
status_t LSM6DSL_ACC_GYRO_R_DSD_XH(void *handle, LSM6DSL_ACC_GYRO_DSD_XH_t *value);
/*******************************************************************************
* Register : D6D_SRC
* Address : 0X1D
* Bit Group Name: DSD_YL
* Permission : RO
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_DSD_YL_NOT_DETECTED = 0x00,
LSM6DSL_ACC_GYRO_DSD_YL_DETECTED = 0x04,
} LSM6DSL_ACC_GYRO_DSD_YL_t;
#define LSM6DSL_ACC_GYRO_DSD_YL_MASK 0x04
status_t LSM6DSL_ACC_GYRO_R_DSD_YL(void *handle, LSM6DSL_ACC_GYRO_DSD_YL_t *value);
/*******************************************************************************
* Register : D6D_SRC
* Address : 0X1D
* Bit Group Name: DSD_YH
* Permission : RO
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_DSD_YH_NOT_DETECTED = 0x00,
LSM6DSL_ACC_GYRO_DSD_YH_DETECTED = 0x08,
} LSM6DSL_ACC_GYRO_DSD_YH_t;
#define LSM6DSL_ACC_GYRO_DSD_YH_MASK 0x08
status_t LSM6DSL_ACC_GYRO_R_DSD_YH(void *handle, LSM6DSL_ACC_GYRO_DSD_YH_t *value);
/*******************************************************************************
* Register : D6D_SRC
* Address : 0X1D
* Bit Group Name: DSD_ZL
* Permission : RO
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_DSD_ZL_NOT_DETECTED = 0x00,
LSM6DSL_ACC_GYRO_DSD_ZL_DETECTED = 0x10,
} LSM6DSL_ACC_GYRO_DSD_ZL_t;
#define LSM6DSL_ACC_GYRO_DSD_ZL_MASK 0x10
status_t LSM6DSL_ACC_GYRO_R_DSD_ZL(void *handle, LSM6DSL_ACC_GYRO_DSD_ZL_t *value);
/*******************************************************************************
* Register : D6D_SRC
* Address : 0X1D
* Bit Group Name: DSD_ZH
* Permission : RO
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_DSD_ZH_NOT_DETECTED = 0x00,
LSM6DSL_ACC_GYRO_DSD_ZH_DETECTED = 0x20,
} LSM6DSL_ACC_GYRO_DSD_ZH_t;
#define LSM6DSL_ACC_GYRO_DSD_ZH_MASK 0x20
status_t LSM6DSL_ACC_GYRO_R_DSD_ZH(void *handle, LSM6DSL_ACC_GYRO_DSD_ZH_t *value);
/*******************************************************************************
* Register : D6D_SRC
* Address : 0X1D
* Bit Group Name: D6D_EV_STATUS
* Permission : RO
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_D6D_EV_STATUS_NOT_DETECTED = 0x00,
LSM6DSL_ACC_GYRO_D6D_EV_STATUS_DETECTED = 0x40,
} LSM6DSL_ACC_GYRO_D6D_EV_STATUS_t;
#define LSM6DSL_ACC_GYRO_D6D_EV_STATUS_MASK 0x40
status_t LSM6DSL_ACC_GYRO_R_D6D_EV_STATUS(void *handle, LSM6DSL_ACC_GYRO_D6D_EV_STATUS_t *value);
/*******************************************************************************
* Register : STATUS_REG
* Address : 0X1E
* Bit Group Name: XLDA
* Permission : RO
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_XLDA_NO_DATA_AVAIL = 0x00,
LSM6DSL_ACC_GYRO_XLDA_DATA_AVAIL = 0x01,
} LSM6DSL_ACC_GYRO_XLDA_t;
#define LSM6DSL_ACC_GYRO_XLDA_MASK 0x01
status_t LSM6DSL_ACC_GYRO_R_XLDA(void *handle, LSM6DSL_ACC_GYRO_XLDA_t *value);
/*******************************************************************************
* Register : STATUS_REG
* Address : 0X1E
* Bit Group Name: GDA
* Permission : RO
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_GDA_NO_DATA_AVAIL = 0x00,
LSM6DSL_ACC_GYRO_GDA_DATA_AVAIL = 0x02,
} LSM6DSL_ACC_GYRO_GDA_t;
#define LSM6DSL_ACC_GYRO_GDA_MASK 0x02
status_t LSM6DSL_ACC_GYRO_R_GDA(void *handle, LSM6DSL_ACC_GYRO_GDA_t *value);
/*******************************************************************************
* Register : STATUS_REG
* Address : 0X1E
* Bit Group Name: TDA
* Permission : RO
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_TDA_NO_DATA_AVAIL = 0x00,
LSM6DSL_ACC_GYRO_TDA_DATA_AVAIL = 0x04,
} LSM6DSL_ACC_GYRO_TDA_t;
#define LSM6DSL_ACC_GYRO_TDA_MASK 0x04
status_t LSM6DSL_ACC_GYRO_R_TDA(void *handle, LSM6DSL_ACC_GYRO_TDA_t *value);
/*******************************************************************************
* Register : FIFO_STATUS1
* Address : 0X3A
* Bit Group Name: DIFF_FIFO
* Permission : RO
*******************************************************************************/
#define LSM6DSL_ACC_GYRO_DIFF_FIFO_STATUS1_MASK 0xFF
#define LSM6DSL_ACC_GYRO_DIFF_FIFO_STATUS1_POSITION 0
#define LSM6DSL_ACC_GYRO_DIFF_FIFO_STATUS2_MASK 0xF
#define LSM6DSL_ACC_GYRO_DIFF_FIFO_STATUS2_POSITION 0
status_t LSM6DSL_ACC_GYRO_R_FIFONumOfEntries(void *handle, u16_t *value);
/*******************************************************************************
* Register : FIFO_STATUS2
* Address : 0X3B
* Bit Group Name: FIFO_EMPTY
* Permission : RO
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_FIFO_EMPTY_FIFO_NOT_EMPTY = 0x00,
LSM6DSL_ACC_GYRO_FIFO_EMPTY_FIFO_EMPTY = 0x10,
} LSM6DSL_ACC_GYRO_FIFO_EMPTY_t;
#define LSM6DSL_ACC_GYRO_FIFO_EMPTY_MASK 0x10
status_t LSM6DSL_ACC_GYRO_R_FIFOEmpty(void *handle, LSM6DSL_ACC_GYRO_FIFO_EMPTY_t *value);
/*******************************************************************************
* Register : FIFO_STATUS2
* Address : 0X3B
* Bit Group Name: FIFO_FULL
* Permission : RO
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_FIFO_FULL_FIFO_NOT_FULL = 0x00,
LSM6DSL_ACC_GYRO_FIFO_FULL_FIFO_FULL = 0x20,
} LSM6DSL_ACC_GYRO_FIFO_FULL_t;
#define LSM6DSL_ACC_GYRO_FIFO_FULL_MASK 0x20
status_t LSM6DSL_ACC_GYRO_R_FIFOFull(void *handle, LSM6DSL_ACC_GYRO_FIFO_FULL_t *value);
/*******************************************************************************
* Register : FIFO_STATUS2
* Address : 0X3B
* Bit Group Name: OVERRUN
* Permission : RO
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_OVERRUN_NO_OVERRUN = 0x00,
LSM6DSL_ACC_GYRO_OVERRUN_OVERRUN = 0x40,
} LSM6DSL_ACC_GYRO_OVERRUN_t;
#define LSM6DSL_ACC_GYRO_OVERRUN_MASK 0x40
status_t LSM6DSL_ACC_GYRO_R_OVERRUN(void *handle, LSM6DSL_ACC_GYRO_OVERRUN_t *value);
/*******************************************************************************
* Register : FIFO_STATUS2
* Address : 0X3B
* Bit Group Name: WTM
* Permission : RO
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_WTM_BELOW_WTM = 0x00,
LSM6DSL_ACC_GYRO_WTM_ABOVE_OR_EQUAL_WTM = 0x80,
} LSM6DSL_ACC_GYRO_WTM_t;
#define LSM6DSL_ACC_GYRO_WTM_MASK 0x80
status_t LSM6DSL_ACC_GYRO_R_WaterMark(void *handle, LSM6DSL_ACC_GYRO_WTM_t *value);
/*******************************************************************************
* Register : FIFO_STATUS3
* Address : 0X3C
* Bit Group Name: FIFO_PATTERN
* Permission : RO
*******************************************************************************/
#define LSM6DSL_ACC_GYRO_FIFO_STATUS3_PATTERN_MASK 0xFF
#define LSM6DSL_ACC_GYRO_FIFO_STATUS3_PATTERN_POSITION 0
#define LSM6DSL_ACC_GYRO_FIFO_STATUS4_PATTERN_MASK 0x03
#define LSM6DSL_ACC_GYRO_FIFO_STATUS4_PATTERN_POSITION 0
status_t LSM6DSL_ACC_GYRO_R_FIFOPattern(void *handle, u16_t *value);
/*******************************************************************************
* Register : FUNC_SRC
* Address : 0X53
* Bit Group Name: SENS_HUB_END
* Permission : RO
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_SENS_HUB_END_STILL_ONGOING = 0x00,
LSM6DSL_ACC_GYRO_SENS_HUB_END_OP_COMPLETED = 0x01,
} LSM6DSL_ACC_GYRO_SENS_HUB_END_t;
#define LSM6DSL_ACC_GYRO_SENS_HUB_END_MASK 0x01
status_t LSM6DSL_ACC_GYRO_R_SENS_HUB_END(void *handle, LSM6DSL_ACC_GYRO_SENS_HUB_END_t *value);
/*******************************************************************************
* Register : FUNC_SRC
* Address : 0X53
* Bit Group Name: SOFT_IRON_END
* Permission : RO
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_SOFT_IRON_END_NOT_COMPLETED = 0x00,
LSM6DSL_ACC_GYRO_SOFT_IRON_END_COMPLETED = 0x02,
} LSM6DSL_ACC_GYRO_SOFT_IRON_END_t;
#define LSM6DSL_ACC_GYRO_SOFT_IRON_END_MASK 0x02
status_t LSM6DSL_ACC_GYRO_R_SOFT_IRON_END(void *handle, LSM6DSL_ACC_GYRO_SOFT_IRON_END_t *value);
/*******************************************************************************
* Register : FUNC_SRC
* Address : 0X53
* Bit Group Name: HI_FAIL
* Permission : RO
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_HARD_IRON_NORMAL = 0x00,
LSM6DSL_ACC_GYRO_HARD_IRON_FAIL = 0x04,
} LSM6DSL_ACC_GYRO_SOFT_HARD_IRON_STAT_t;
#define LSM6DSL_ACC_GYRO_HARD_IRON_STAT_MASK 0x04
status_t LSM6DSL_ACC_GYRO_R_HardIron(void *handle, LSM6DSL_ACC_GYRO_SOFT_HARD_IRON_STAT_t *value);
/*******************************************************************************
* Register : FUNC_SRC
* Address : 0X53
* Bit Group Name: STEP_OVERFLOW
* Permission : RO
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_PEDO_STEP_IN_RANGE = 0x00,
LSM6DSL_ACC_GYRO_PEDO_ESTEP_OVERFLOW = 0x08,
} LSM6DSL_ACC_GYRO_STEP_OVERFLOW_t;
#define LSM6DSL_ACC_GYRO_STEP_OVERFLOW_MASK 0x08
status_t LSM6DSL_ACC_GYRO_R_STEP_OVERFLOW(void *handle, LSM6DSL_ACC_GYRO_STEP_OVERFLOW_t *value);
/*******************************************************************************
* Register : FUNC_SRC
* Address : 0X53
* Bit Group Name: PEDO_EV_STATUS
* Permission : RO
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_PEDO_EV_STATUS_NOT_DETECTED = 0x00,
LSM6DSL_ACC_GYRO_PEDO_EV_STATUS_DETECTED = 0x10,
} LSM6DSL_ACC_GYRO_PEDO_EV_STATUS_t;
#define LSM6DSL_ACC_GYRO_PEDO_EV_STATUS_MASK 0x10
status_t LSM6DSL_ACC_GYRO_R_PEDO_EV_STATUS(void *handle, LSM6DSL_ACC_GYRO_PEDO_EV_STATUS_t *value);
/*******************************************************************************
* Register : FUNC_SRC
* Address : 0X53
* Bit Group Name: TILT_EV_STATUS
* Permission : RO
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_TILT_EV_STATUS_NOT_DETECTED = 0x00,
LSM6DSL_ACC_GYRO_TILT_EV_STATUS_DETECTED = 0x20,
} LSM6DSL_ACC_GYRO_TILT_EV_STATUS_t;
#define LSM6DSL_ACC_GYRO_TILT_EV_STATUS_MASK 0x20
status_t LSM6DSL_ACC_GYRO_R_TILT_EV_STATUS(void *handle, LSM6DSL_ACC_GYRO_TILT_EV_STATUS_t *value);
/*******************************************************************************
* Register : FUNC_SRC
* Address : 0X53
* Bit Group Name: SIGN_MOT_EV_STATUS
* Permission : RO
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_SIGN_MOT_EV_STATUS_NOT_DETECTED = 0x00,
LSM6DSL_ACC_GYRO_SIGN_MOT_EV_STATUS_DETECTED = 0x40,
} LSM6DSL_ACC_GYRO_SIGN_MOT_EV_STATUS_t;
#define LSM6DSL_ACC_GYRO_SIGN_MOT_EV_STATUS_MASK 0x40
status_t LSM6DSL_ACC_GYRO_R_SIGN_MOT_EV_STATUS(void *handle, LSM6DSL_ACC_GYRO_SIGN_MOT_EV_STATUS_t *value);
/*******************************************************************************
* Register : FUNC_SRC
* Address : 0X53
* Bit Group Name: STEP_COUNT_DELTA_IA
* Permission : RO
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_NO_STEP_COUNT_IN_DELTA = 0x00,
LSM6DSL_ACC_GYRO_STEP_COUNT_IN_DELTA = 0x80,
} LSM6DSL_ACC_GYRO_STEP_COUNT_DELTA_t;
#define LSM6DSL_ACC_GYRO_STEP_COUNT_DELTA_MASK 0x80
status_t LSM6DSL_ACC_GYRO_R_STEP_COUNT_DELTA(void *handle, LSM6DSL_ACC_GYRO_STEP_COUNT_DELTA_t *value);
/*******************************************************************************
* Register : TAP_CFG1
* Address : 0X58
* Bit Group Name: LIR
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_LIR_DISABLED = 0x00,
LSM6DSL_ACC_GYRO_LIR_ENABLED = 0x01,
} LSM6DSL_ACC_GYRO_LIR_t;
#define LSM6DSL_ACC_GYRO_LIR_MASK 0x01
status_t LSM6DSL_ACC_GYRO_W_LIR(void *handle, LSM6DSL_ACC_GYRO_LIR_t newValue);
status_t LSM6DSL_ACC_GYRO_R_LIR(void *handle, LSM6DSL_ACC_GYRO_LIR_t *value);
/*******************************************************************************
* Register : TAP_CFG1
* Address : 0X58
* Bit Group Name: TAP_Z_EN
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_TAP_Z_EN_DISABLED = 0x00,
LSM6DSL_ACC_GYRO_TAP_Z_EN_ENABLED = 0x02,
} LSM6DSL_ACC_GYRO_TAP_Z_EN_t;
#define LSM6DSL_ACC_GYRO_TAP_Z_EN_MASK 0x02
status_t LSM6DSL_ACC_GYRO_W_TAP_Z_EN(void *handle, LSM6DSL_ACC_GYRO_TAP_Z_EN_t newValue);
status_t LSM6DSL_ACC_GYRO_R_TAP_Z_EN(void *handle, LSM6DSL_ACC_GYRO_TAP_Z_EN_t *value);
/*******************************************************************************
* Register : TAP_CFG1
* Address : 0X58
* Bit Group Name: TAP_Y_EN
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_TAP_Y_EN_DISABLED = 0x00,
LSM6DSL_ACC_GYRO_TAP_Y_EN_ENABLED = 0x04,
} LSM6DSL_ACC_GYRO_TAP_Y_EN_t;
#define LSM6DSL_ACC_GYRO_TAP_Y_EN_MASK 0x04
status_t LSM6DSL_ACC_GYRO_W_TAP_Y_EN(void *handle, LSM6DSL_ACC_GYRO_TAP_Y_EN_t newValue);
status_t LSM6DSL_ACC_GYRO_R_TAP_Y_EN(void *handle, LSM6DSL_ACC_GYRO_TAP_Y_EN_t *value);
/*******************************************************************************
* Register : TAP_CFG1
* Address : 0X58
* Bit Group Name: TAP_X_EN
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_TAP_X_EN_DISABLED = 0x00,
LSM6DSL_ACC_GYRO_TAP_X_EN_ENABLED = 0x08,
} LSM6DSL_ACC_GYRO_TAP_X_EN_t;
#define LSM6DSL_ACC_GYRO_TAP_X_EN_MASK 0x08
status_t LSM6DSL_ACC_GYRO_W_TAP_X_EN(void *handle, LSM6DSL_ACC_GYRO_TAP_X_EN_t newValue);
status_t LSM6DSL_ACC_GYRO_R_TAP_X_EN(void *handle, LSM6DSL_ACC_GYRO_TAP_X_EN_t *value);
/*******************************************************************************
* Register : TAP_CFG1
* Address : 0X58
* Bit Group Name: SLOPE_FDS
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_SLOPE_FDS_DISABLED = 0x00,
LSM6DSL_ACC_GYRO_SLOPE_FDS_ENABLED = 0x10,
} LSM6DSL_ACC_GYRO_SLOPE_FDS_t;
#define LSM6DSL_ACC_GYRO_SLOPE_FDS_MASK 0x10
status_t LSM6DSL_ACC_GYRO_W_SLOPE_FDS(void *handle, LSM6DSL_ACC_GYRO_SLOPE_FDS_t newValue);
status_t LSM6DSL_ACC_GYRO_R_SLOPE_FDS(void *handle, LSM6DSL_ACC_GYRO_SLOPE_FDS_t *value);
/*******************************************************************************
* Register : TAP_CFG1
* Address : 0X58
* Bit Group Name: INTERRUPTS_ENABLE
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_BASIC_INT_DISABLED = 0x00,
LSM6DSL_ACC_GYRO_BASIC_INT_ENABLED = 0x80,
} LSM6DSL_ACC_GYRO_INT_EN_t;
#define LSM6DSL_ACC_GYRO_INT_EN_MASK 0x80
status_t LSM6DSL_ACC_GYRO_W_BASIC_INT(void *handle, LSM6DSL_ACC_GYRO_INT_EN_t newValue);
status_t LSM6DSL_ACC_GYRO_R_BASIC_INT(void *handle, LSM6DSL_ACC_GYRO_INT_EN_t *value);
/*******************************************************************************
* Register : TAP_THS_6D
* Address : 0X59
* Bit Group Name: TAP_THS
* Permission : RW
*******************************************************************************/
#define LSM6DSL_ACC_GYRO_TAP_THS_MASK 0x1F
#define LSM6DSL_ACC_GYRO_TAP_THS_POSITION 0
status_t LSM6DSL_ACC_GYRO_W_TAP_THS(void *handle, u8_t newValue);
status_t LSM6DSL_ACC_GYRO_R_TAP_THS(void *handle, u8_t *value);
/*******************************************************************************
* Register : TAP_THS_6D
* Address : 0X59
* Bit Group Name: SIXD_THS
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_SIXD_THS_80_degree = 0x00,
LSM6DSL_ACC_GYRO_SIXD_THS_70_degree = 0x20,
LSM6DSL_ACC_GYRO_SIXD_THS_60_degree = 0x40,
LSM6DSL_ACC_GYRO_SIXD_THS_50_degree = 0x60,
} LSM6DSL_ACC_GYRO_SIXD_THS_t;
#define LSM6DSL_ACC_GYRO_SIXD_THS_MASK 0x60
status_t LSM6DSL_ACC_GYRO_W_SIXD_THS(void *handle, LSM6DSL_ACC_GYRO_SIXD_THS_t newValue);
status_t LSM6DSL_ACC_GYRO_R_SIXD_THS(void *handle, LSM6DSL_ACC_GYRO_SIXD_THS_t *value);
/*******************************************************************************
* Register : TAP_THS_6D
* Address : 0X59
* Bit Group Name: D4D_EN
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_D4D_DIS = 0x00,
LSM6DSL_ACC_GYRO_D4D_EN = 0x80,
} LSM6DSL_ACC_GYRO_D4D_t;
#define LSM6DSL_ACC_GYRO_D4D_MASK 0x80
status_t LSM6DSL_ACC_GYRO_W_D4D(void *handle, LSM6DSL_ACC_GYRO_D4D_t newValue);
status_t LSM6DSL_ACC_GYRO_R_D4D(void *handle, LSM6DSL_ACC_GYRO_D4D_t *value);
/*******************************************************************************
* Register : INT_DUR2
* Address : 0X5A
* Bit Group Name: SHOCK
* Permission : RW
*******************************************************************************/
#define LSM6DSL_ACC_GYRO_SHOCK_MASK 0x03
#define LSM6DSL_ACC_GYRO_SHOCK_POSITION 0
status_t LSM6DSL_ACC_GYRO_W_SHOCK_Duration(void *handle, u8_t newValue);
status_t LSM6DSL_ACC_GYRO_R_SHOCK_Duration(void *handle, u8_t *value);
/*******************************************************************************
* Register : INT_DUR2
* Address : 0X5A
* Bit Group Name: QUIET
* Permission : RW
*******************************************************************************/
#define LSM6DSL_ACC_GYRO_QUIET_MASK 0x0C
#define LSM6DSL_ACC_GYRO_QUIET_POSITION 2
status_t LSM6DSL_ACC_GYRO_W_QUIET_Duration(void *handle, u8_t newValue);
status_t LSM6DSL_ACC_GYRO_R_QUIET_Duration(void *handle, u8_t *value);
/*******************************************************************************
* Register : INT_DUR2
* Address : 0X5A
* Bit Group Name: DUR
* Permission : RW
*******************************************************************************/
#define LSM6DSL_ACC_GYRO_DUR_MASK 0xF0
#define LSM6DSL_ACC_GYRO_DUR_POSITION 4
status_t LSM6DSL_ACC_GYRO_W_DUR(void *handle, u8_t newValue);
status_t LSM6DSL_ACC_GYRO_R_DUR(void *handle, u8_t *value);
/*******************************************************************************
* Register : WAKE_UP_THS
* Address : 0X5B
* Bit Group Name: WK_THS
* Permission : RW
*******************************************************************************/
#define LSM6DSL_ACC_GYRO_WK_THS_MASK 0x3F
#define LSM6DSL_ACC_GYRO_WK_THS_POSITION 0
status_t LSM6DSL_ACC_GYRO_W_WK_THS(void *handle, u8_t newValue);
status_t LSM6DSL_ACC_GYRO_R_WK_THS(void *handle, u8_t *value);
/*******************************************************************************
* Register : WAKE_UP_THS
* Address : 0X5B
* Bit Group Name: SINGLE_DOUBLE_TAP
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_SINGLE_DOUBLE_TAP_SINGLE_TAP = 0x00,
LSM6DSL_ACC_GYRO_SINGLE_DOUBLE_TAP_DOUBLE_TAP = 0x80,
} LSM6DSL_ACC_GYRO_SINGLE_DOUBLE_TAP_t;
#define LSM6DSL_ACC_GYRO_SINGLE_DOUBLE_TAP_MASK 0x80
status_t LSM6DSL_ACC_GYRO_W_SINGLE_DOUBLE_TAP_EV(void *handle, LSM6DSL_ACC_GYRO_SINGLE_DOUBLE_TAP_t newValue);
status_t LSM6DSL_ACC_GYRO_R_SINGLE_DOUBLE_TAP_EV(void *handle, LSM6DSL_ACC_GYRO_SINGLE_DOUBLE_TAP_t *value);
/*******************************************************************************
* Register : WAKE_UP_DUR
* Address : 0X5C
* Bit Group Name: SLEEP_DUR
* Permission : RW
*******************************************************************************/
#define LSM6DSL_ACC_GYRO_SLEEP_DUR_MASK 0x0F
#define LSM6DSL_ACC_GYRO_SLEEP_DUR_POSITION 0
status_t LSM6DSL_ACC_GYRO_W_SLEEP_DUR(void *handle, u8_t newValue);
status_t LSM6DSL_ACC_GYRO_R_SLEEP_DUR(void *handle, u8_t *value);
/*******************************************************************************
* Register : WAKE_UP_DUR
* Address : 0X5C
* Bit Group Name: TIMER_HR
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_TIMER_HR_6_4ms = 0x00,
LSM6DSL_ACC_GYRO_TIMER_HR_25us = 0x10,
} LSM6DSL_ACC_GYRO_TIMER_HR_t;
#define LSM6DSL_ACC_GYRO_TIMER_HR_MASK 0x10
status_t LSM6DSL_ACC_GYRO_W_TIMER_HR(void *handle, LSM6DSL_ACC_GYRO_TIMER_HR_t newValue);
status_t LSM6DSL_ACC_GYRO_R_TIMER_HR(void *handle, LSM6DSL_ACC_GYRO_TIMER_HR_t *value);
/*******************************************************************************
* Register : WAKE_UP_DUR
* Address : 0X5C
* Bit Group Name: WAKE_DUR
* Permission : RW
*******************************************************************************/
#define LSM6DSL_ACC_GYRO_WAKE_DUR_MASK 0x60
#define LSM6DSL_ACC_GYRO_WAKE_DUR_POSITION 5
status_t LSM6DSL_ACC_GYRO_W_WAKE_DUR(void *handle, u8_t newValue);
status_t LSM6DSL_ACC_GYRO_R_WAKE_DUR(void *handle, u8_t *value);
/*******************************************************************************
* Register : FREE_FALL
* Address : 0X5D
* Bit Group Name: FF_DUR
* Permission : RW
*******************************************************************************/
#define LSM6DSL_ACC_GYRO_FF_FREE_FALL_DUR_MASK 0xF8
#define LSM6DSL_ACC_GYRO_FF_FREE_FALL_DUR_POSITION 3
#define LSM6DSL_ACC_GYRO_FF_WAKE_UP_DUR_MASK 0x80
#define LSM6DSL_ACC_GYRO_FF_WAKE_UP_DUR_POSITION 7
status_t LSM6DSL_ACC_GYRO_W_FF_Duration(void *handle, u8_t newValue);
status_t LSM6DSL_ACC_GYRO_R_FF_Duration(void *handle, u8_t *value);
/*******************************************************************************
* Register : FREE_FALL
* Address : 0X5D
* Bit Group Name: FF_THS
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_FF_THS_156mg = 0x00,
LSM6DSL_ACC_GYRO_FF_THS_219mg = 0x01,
LSM6DSL_ACC_GYRO_FF_THS_250mg = 0x02,
LSM6DSL_ACC_GYRO_FF_THS_312mg = 0x03,
LSM6DSL_ACC_GYRO_FF_THS_344mg = 0x04,
LSM6DSL_ACC_GYRO_FF_THS_406mg = 0x05,
LSM6DSL_ACC_GYRO_FF_THS_469mg = 0x06,
LSM6DSL_ACC_GYRO_FF_THS_500mg = 0x07,
} LSM6DSL_ACC_GYRO_FF_THS_t;
#define LSM6DSL_ACC_GYRO_FF_THS_MASK 0x07
status_t LSM6DSL_ACC_GYRO_W_FF_THS(void *handle, LSM6DSL_ACC_GYRO_FF_THS_t newValue);
status_t LSM6DSL_ACC_GYRO_R_FF_THS(void *handle, LSM6DSL_ACC_GYRO_FF_THS_t *value);
/*******************************************************************************
* Register : MD1_CFG
* Address : 0X5E
* Bit Group Name: INT1_TIMER
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_INT1_TIMER_DISABLED = 0x00,
LSM6DSL_ACC_GYRO_INT1_TIMER_ENABLED = 0x01,
} LSM6DSL_ACC_GYRO_INT1_TIMER_t;
#define LSM6DSL_ACC_GYRO_INT1_TIMER_MASK 0x01
status_t LSM6DSL_ACC_GYRO_W_TimerEvRouteInt1(void *handle, LSM6DSL_ACC_GYRO_INT1_TIMER_t newValue);
status_t LSM6DSL_ACC_GYRO_R_TimerEvRouteInt1(void *handle, LSM6DSL_ACC_GYRO_INT1_TIMER_t *value);
/*******************************************************************************
* Register : MD1_CFG
* Address : 0X5E
* Bit Group Name: INT1_TILT
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_INT1_TILT_DISABLED = 0x00,
LSM6DSL_ACC_GYRO_INT1_TILT_ENABLED = 0x02,
} LSM6DSL_ACC_GYRO_INT1_TILT_t;
#define LSM6DSL_ACC_GYRO_INT1_TILT_MASK 0x02
status_t LSM6DSL_ACC_GYRO_W_TiltEvOnInt1(void *handle, LSM6DSL_ACC_GYRO_INT1_TILT_t newValue);
status_t LSM6DSL_ACC_GYRO_R_TiltEvOnInt1(void *handle, LSM6DSL_ACC_GYRO_INT1_TILT_t *value);
/*******************************************************************************
* Register : MD1_CFG
* Address : 0X5E
* Bit Group Name: INT1_6D
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_INT1_6D_DISABLED = 0x00,
LSM6DSL_ACC_GYRO_INT1_6D_ENABLED = 0x04,
} LSM6DSL_ACC_GYRO_INT1_6D_t;
#define LSM6DSL_ACC_GYRO_INT1_6D_MASK 0x04
status_t LSM6DSL_ACC_GYRO_W_6DEvOnInt1(void *handle, LSM6DSL_ACC_GYRO_INT1_6D_t newValue);
status_t LSM6DSL_ACC_GYRO_R_6DEvOnInt1(void *handle, LSM6DSL_ACC_GYRO_INT1_6D_t *value);
/*******************************************************************************
* Register : MD1_CFG
* Address : 0X5E
* Bit Group Name: INT1_TAP
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_INT1_TAP_DISABLED = 0x00,
LSM6DSL_ACC_GYRO_INT1_TAP_ENABLED = 0x08,
} LSM6DSL_ACC_GYRO_INT1_TAP_t;
#define LSM6DSL_ACC_GYRO_INT1_TAP_MASK 0x08
status_t LSM6DSL_ACC_GYRO_W_TapEvOnInt1(void *handle, LSM6DSL_ACC_GYRO_INT1_TAP_t newValue);
status_t LSM6DSL_ACC_GYRO_R_TapEvOnInt1(void *handle, LSM6DSL_ACC_GYRO_INT1_TAP_t *value);
/*******************************************************************************
* Register : MD1_CFG
* Address : 0X5E
* Bit Group Name: INT1_FF
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_INT1_FF_DISABLED = 0x00,
LSM6DSL_ACC_GYRO_INT1_FF_ENABLED = 0x10,
} LSM6DSL_ACC_GYRO_INT1_FF_t;
#define LSM6DSL_ACC_GYRO_INT1_FF_MASK 0x10
status_t LSM6DSL_ACC_GYRO_W_FFEvOnInt1(void *handle, LSM6DSL_ACC_GYRO_INT1_FF_t newValue);
status_t LSM6DSL_ACC_GYRO_R_FFEvOnInt1(void *handle, LSM6DSL_ACC_GYRO_INT1_FF_t *value);
/*******************************************************************************
* Register : MD1_CFG
* Address : 0X5E
* Bit Group Name: INT1_WU
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_INT1_WU_DISABLED = 0x00,
LSM6DSL_ACC_GYRO_INT1_WU_ENABLED = 0x20,
} LSM6DSL_ACC_GYRO_INT1_WU_t;
#define LSM6DSL_ACC_GYRO_INT1_WU_MASK 0x20
status_t LSM6DSL_ACC_GYRO_W_WUEvOnInt1(void *handle, LSM6DSL_ACC_GYRO_INT1_WU_t newValue);
status_t LSM6DSL_ACC_GYRO_R_WUEvOnInt1(void *handle, LSM6DSL_ACC_GYRO_INT1_WU_t *value);
/*******************************************************************************
* Register : MD1_CFG
* Address : 0X5E
* Bit Group Name: INT1_SINGLE_TAP
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_INT1_SINGLE_TAP_DISABLED = 0x00,
LSM6DSL_ACC_GYRO_INT1_SINGLE_TAP_ENABLED = 0x40,
} LSM6DSL_ACC_GYRO_INT1_SINGLE_TAP_t;
#define LSM6DSL_ACC_GYRO_INT1_SINGLE_TAP_MASK 0x40
status_t LSM6DSL_ACC_GYRO_W_SingleTapOnInt1(void *handle, LSM6DSL_ACC_GYRO_INT1_SINGLE_TAP_t newValue);
status_t LSM6DSL_ACC_GYRO_R_SingleTapOnInt1(void *handle, LSM6DSL_ACC_GYRO_INT1_SINGLE_TAP_t *value);
/*******************************************************************************
* Register : MD1_CFG
* Address : 0X5E
* Bit Group Name: INT1_INACT_STATE
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_INT1_SLEEP_DISABLED = 0x00,
LSM6DSL_ACC_GYRO_INT1_SLEEP_ENABLED = 0x80,
} LSM6DSL_ACC_GYRO_INT1_SLEEP_t;
#define LSM6DSL_ACC_GYRO_INT1_SLEEP_MASK 0x80
status_t LSM6DSL_ACC_GYRO_W_SleepEvOnInt1(void *handle, LSM6DSL_ACC_GYRO_INT1_SLEEP_t newValue);
status_t LSM6DSL_ACC_GYRO_R_SleepEvOnInt1(void *handle, LSM6DSL_ACC_GYRO_INT1_SLEEP_t *value);
/*******************************************************************************
* Register : MD2_CFG
* Address : 0X5F
* Bit Group Name: INT2_IRON
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_INT2_IRON_DISABLED = 0x00,
LSM6DSL_ACC_GYRO_INT2_IRON_ENABLED = 0x01,
} LSM6DSL_ACC_GYRO_INT2_IRON_t;
#define LSM6DSL_ACC_GYRO_INT2_IRON_MASK 0x01
status_t LSM6DSL_ACC_GYRO_W_MagCorrection_Int2(void *handle, LSM6DSL_ACC_GYRO_INT2_IRON_t newValue);
status_t LSM6DSL_ACC_GYRO_R_MagCorrection_Int2(void *handle, LSM6DSL_ACC_GYRO_INT2_IRON_t *value);
/*******************************************************************************
* Register : MD2_CFG
* Address : 0X5F
* Bit Group Name: INT2_TILT
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_INT2_TILT_DISABLED = 0x00,
LSM6DSL_ACC_GYRO_INT2_TILT_ENABLED = 0x02,
} LSM6DSL_ACC_GYRO_INT2_TILT_t;
#define LSM6DSL_ACC_GYRO_INT2_TILT_MASK 0x02
status_t LSM6DSL_ACC_GYRO_W_TiltEvOnInt2(void *handle, LSM6DSL_ACC_GYRO_INT2_TILT_t newValue);
status_t LSM6DSL_ACC_GYRO_R_TiltEvOnInt2(void *handle, LSM6DSL_ACC_GYRO_INT2_TILT_t *value);
/*******************************************************************************
* Register : MD2_CFG
* Address : 0X5F
* Bit Group Name: INT2_6D
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_INT2_6D_DISABLED = 0x00,
LSM6DSL_ACC_GYRO_INT2_6D_ENABLED = 0x04,
} LSM6DSL_ACC_GYRO_INT2_6D_t;
#define LSM6DSL_ACC_GYRO_INT2_6D_MASK 0x04
status_t LSM6DSL_ACC_GYRO_W_6DEvOnInt2(void *handle, LSM6DSL_ACC_GYRO_INT2_6D_t newValue);
status_t LSM6DSL_ACC_GYRO_R_6DEvOnInt2(void *handle, LSM6DSL_ACC_GYRO_INT2_6D_t *value);
/*******************************************************************************
* Register : MD2_CFG
* Address : 0X5F
* Bit Group Name: INT2_TAP
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_INT2_TAP_DISABLED = 0x00,
LSM6DSL_ACC_GYRO_INT2_TAP_ENABLED = 0x08,
} LSM6DSL_ACC_GYRO_INT2_TAP_t;
#define LSM6DSL_ACC_GYRO_INT2_TAP_MASK 0x08
status_t LSM6DSL_ACC_GYRO_W_TapEvOnInt2(void *handle, LSM6DSL_ACC_GYRO_INT2_TAP_t newValue);
status_t LSM6DSL_ACC_GYRO_R_TapEvOnInt2(void *handle, LSM6DSL_ACC_GYRO_INT2_TAP_t *value);
/*******************************************************************************
* Register : MD2_CFG
* Address : 0X5F
* Bit Group Name: INT2_FF
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_INT2_FF_DISABLED = 0x00,
LSM6DSL_ACC_GYRO_INT2_FF_ENABLED = 0x10,
} LSM6DSL_ACC_GYRO_INT2_FF_t;
#define LSM6DSL_ACC_GYRO_INT2_FF_MASK 0x10
status_t LSM6DSL_ACC_GYRO_W_FFEvOnInt2(void *handle, LSM6DSL_ACC_GYRO_INT2_FF_t newValue);
status_t LSM6DSL_ACC_GYRO_R_FFEvOnInt2(void *handle, LSM6DSL_ACC_GYRO_INT2_FF_t *value);
/*******************************************************************************
* Register : MD2_CFG
* Address : 0X5F
* Bit Group Name: INT2_WU
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_INT2_WU_DISABLED = 0x00,
LSM6DSL_ACC_GYRO_INT2_WU_ENABLED = 0x20,
} LSM6DSL_ACC_GYRO_INT2_WU_t;
#define LSM6DSL_ACC_GYRO_INT2_WU_MASK 0x20
status_t LSM6DSL_ACC_GYRO_W_WUEvOnInt2(void *handle, LSM6DSL_ACC_GYRO_INT2_WU_t newValue);
status_t LSM6DSL_ACC_GYRO_R_WUEvOnInt2(void *handle, LSM6DSL_ACC_GYRO_INT2_WU_t *value);
/*******************************************************************************
* Register : MD2_CFG
* Address : 0X5F
* Bit Group Name: INT2_SINGLE_TAP
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_INT2_SINGLE_TAP_DISABLED = 0x00,
LSM6DSL_ACC_GYRO_INT2_SINGLE_TAP_ENABLED = 0x40,
} LSM6DSL_ACC_GYRO_INT2_SINGLE_TAP_t;
#define LSM6DSL_ACC_GYRO_INT2_SINGLE_TAP_MASK 0x40
status_t LSM6DSL_ACC_GYRO_W_SingleTapOnInt2(void *handle, LSM6DSL_ACC_GYRO_INT2_SINGLE_TAP_t newValue);
status_t LSM6DSL_ACC_GYRO_R_SingleTapOnInt2(void *handle, LSM6DSL_ACC_GYRO_INT2_SINGLE_TAP_t *value);
/*******************************************************************************
* Register : MD2_CFG
* Address : 0X5F
* Bit Group Name: INT2_INACT_STATE
* Permission : RW
*******************************************************************************/
typedef enum
{
LSM6DSL_ACC_GYRO_INT2_SLEEP_DISABLED = 0x00,
LSM6DSL_ACC_GYRO_INT2_SLEEP_ENABLED = 0x80,
} LSM6DSL_ACC_GYRO_INT2_SLEEP_t;
#define LSM6DSL_ACC_GYRO_INT2_SLEEP_MASK 0x80
status_t LSM6DSL_ACC_GYRO_W_SleepEvOnInt2(void *handle, LSM6DSL_ACC_GYRO_INT2_SLEEP_t newValue);
status_t LSM6DSL_ACC_GYRO_R_SleepEvOnInt2(void *handle, LSM6DSL_ACC_GYRO_INT2_SLEEP_t *value);
/*******************************************************************************
* Register : <REGISTER_L> - <REGISTER_H>
* Output Type : GetAccData
* Permission : RO
*******************************************************************************/
status_t LSM6DSL_ACC_GYRO_GetRawAccData(void *handle, u8_t *buff);
status_t LSM6DSL_ACC_Get_Acceleration(void *handle, int *buff, u8_t from_fifo);
/*******************************************************************************
* Register : <REGISTER_L> - <REGISTER_H>
* Output Type : GetFIFOData
* Permission : RO
*******************************************************************************/
status_t LSM6DSL_ACC_GYRO_Get_GetFIFOData(void *handle, u8_t *buff);
/*******************************************************************************
* Register : <REGISTER_L> - <REGISTER_H>
* Output Type : GetTimestamp
* Permission : RO
*******************************************************************************/
status_t LSM6DSL_ACC_GYRO_Get_GetTimestamp(void *handle, u8_t *buff);
/*******************************************************************************
* Register : <REGISTER_L> - <REGISTER_H>
* Output Type : GetStepCounter
* Permission : RO
*******************************************************************************/
status_t LSM6DSL_ACC_GYRO_Get_GetStepCounter(void *handle, u8_t *buff);
/*******************************************************************************
* Register : <REGISTER_L> - <REGISTER_H>
* Output Type : Pedometer Threshold
* Permission : RO
*******************************************************************************/
status_t LSM6DSL_ACC_GYRO_W_PedoThreshold(void *handle, u8_t newValue);
/************** Use Sensor Hub *******************/
/* program to .... */
status_t LSM6DSL_ACC_GYRO_SH0_Program(void *handle, u8_t SlvAddr, u8_t Reg, u8_t len);
/* Program the six Soft Iron Matrix coefficients. */
status_t LSM6DSL_ACC_GYRO_SH_init_SI_Matrix(void *handle, u8_t *SI_matrix);
/* Read a remote device through I2C Sensor Hub Slave 0 */
status_t LSM6DSL_ACC_GYRO_SH0_ReadMem(void *handle, u8_t SlvAddr, u8_t Reg, u8_t *Bufp, u8_t len, u8_t stop);
/* Write a remote device through I2C Sensor Hub Slave 0 */
status_t LSM6DSL_ACC_GYRO_SH0_WriteByte(void *handle, u8_t SlvAddr, u8_t Reg, u8_t Bufp);
#ifdef __cplusplus
}
#endif
#endif
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/lbig/NRF52832_LSM6DSL.git
[email protected]:lbig/NRF52832_LSM6DSL.git
lbig
NRF52832_LSM6DSL
NRF52832_LSM6DSL
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385