PropWare
3.0.0.229
C++ objects and CMake build system for Parallax Propeller
Simple-Libraries
Learn
Simple Libraries
Sensor
liblis3dh
getWhoAmI.c
1
/*
2
* @file getWhoAmI.c
3
*
4
* @author Michael Mulholland
5
*
6
* @version 1.0.0
7
*
8
* @copyright
9
* Copyright (C) Parallax, Inc. 2020. All Rights MIT Licensed.
10
*
11
* @brief Gets g acceleration range of the Parallax LIS3DH 3-Axis Accelerometer Module with ADC.
12
*
13
*/
14
15
16
#include "
simpletools.h
"
17
#include "
lis3dh.h
"
18
19
20
21
int
lis3dh_getWhoAmI
(
lis3dh_t
*device) {
22
23
return
lis3dh_readByte
(device, LIS3DH_WHO_AM_I);
24
25
}
26
27
28
simpletools.h
This library provides convenient functions for a variety of microcontroller I/O, timing,...
lis3dh.h
Simplifies reading Parallax LIS3DH 3-Axis Accelerometer Module with ADC.
lis3dh_getWhoAmI
int lis3dh_getWhoAmI(lis3dh_t *device)
Reads the sensor identification register (WhoAmI).
Definition:
getWhoAmI.c:21
lis3dh_st
Definition:
lis3dh.h:122
lis3dh_readByte
unsigned char lis3dh_readByte(lis3dh_t *device, unsigned char address)
Read a value from an LIS3DH register.
Definition:
readByte.c:21
Generated on Fri May 20 2022 16:48:05 for PropWare by
1.8.17