discoverpixy
Macros | Functions | Variables
stm32f4_discovery_lis302dl.c File Reference

This file provides a set of functions needed to manage the LIS302DL MEMS accelerometer available on STM32F4-Discovery Kit. More...

#include "stm32f4_discovery_lis302dl.h"
Include dependency graph for stm32f4_discovery_lis302dl.c:

Macros

#define READWRITE_CMD   ((uint8_t)0x80)
 
#define MULTIPLEBYTE_CMD   ((uint8_t)0x40)
 
#define DUMMY_BYTE   ((uint8_t)0x00)
 

Functions

void LIS302DL_Init (LIS302DL_InitTypeDef *LIS302DL_InitStruct)
 Set LIS302DL Initialization. More...
 
void LIS302DL_FilterConfig (LIS302DL_FilterConfigTypeDef *LIS302DL_FilterConfigStruct)
 Set LIS302DL Internal High Pass Filter configuration. More...
 
void LIS302DL_InterruptConfig (LIS302DL_InterruptConfigTypeDef *LIS302DL_IntConfigStruct)
 Set LIS302DL Interrupt configuration. More...
 
void LIS302DL_LowpowerCmd (uint8_t LowPowerMode)
 Change the lowpower mode for LIS302DL. More...
 
void LIS302DL_DataRateCmd (uint8_t DataRateValue)
 Data Rate command. More...
 
void LIS302DL_FullScaleCmd (uint8_t FS_value)
 Change the Full Scale of LIS302DL. More...
 
void LIS302DL_RebootCmd (void)
 Reboot memory content of LIS302DL. More...
 
void LIS302DL_Write (uint8_t *pBuffer, uint8_t WriteAddr, uint16_t NumByteToWrite)
 Writes one byte to the LIS302DL. More...
 
void LIS302DL_Read (uint8_t *pBuffer, uint8_t ReadAddr, uint16_t NumByteToRead)
 Reads a block of data from the LIS302DL. More...
 
void LIS302DL_ReadACC (int32_t *out)
 Read LIS302DL output register, and calculate the acceleration ACC[mg]=SENSITIVITY* (out_h*256+out_l)/16 (12 bit rappresentation) More...
 

Variables

__IO uint32_t LIS302DLTimeout = LIS302DL_FLAG_TIMEOUT
 

Detailed Description

This file provides a set of functions needed to manage the LIS302DL MEMS accelerometer available on STM32F4-Discovery Kit.

Author
MCD Application Team
Version
V1.1.0
Date
28-October-2011
Attention

THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.

© COPYRIGHT 2011 STMicroelectronics