PropWare
C++ objects and CMake build system for Parallax Propeller
Home
Download
Getting Started
Documentation
Reference
About
Related Links
Namespace List
Class List
File List
Examples
Build System
File List
File Members
simple
getMode.c
1
/*
2
* @file getMode.c
3
*
4
* @author Andy Lindsay
5
*
6
* @version 0.50
7
*
8
* @copyright
9
* Copyright (C) Parallax, Inc. 2014. All Rights MIT Licensed.
10
*
11
* @brief Gets mode of operation from the Parallax MMA7455 3-Axis Accelerometer Module.
12
*/
13
14
15
#include "simpletools.h"
16
#include "mma7455.h"
17
18
19
int
MMA7455_pinDat, MMA7455_pinClk, MMA7455_pinEn;
20
21
22
unsigned
char
MMA7455_getMode()
23
{
24
unsigned
char
mode = MMA7455_readByte(MMA7455_MCTL);
25
mode &= 0b11;
26
return
mode;
27
}
28
29
Generated on Sat Aug 27 2016 00:58:09 for PropWare by
1.8.12