1
0
forked from me/IronOS

Reduce code size for accelerometer support (#288)

* Reduce the LIS2DH12 driver's code size.
* Reduce the MMA8652FC driver's code size.
* Make orientation detection smaller.


* Inlined C++ class constructor.
* De-unroll I2C register writes.
* Removed unused setSensitivity method.
This commit is contained in:
Alessandro Gatti
2018-05-10 02:02:29 +02:00
committed by Ben V. Brown
parent 4718efe79b
commit 215fe8e9e8
6 changed files with 76 additions and 75 deletions

View File

@@ -13,6 +13,12 @@
extern "C" {
#endif
enum Orientation {
ORIENTATION_LEFT_HAND = 0,
ORIENTATION_RIGHT_HAND = 1,
ORIENTATION_FLAT = 3
};
#define KEY_B_Pin GPIO_PIN_6
#define KEY_B_GPIO_Port GPIOA
#define TMP36_INPUT_Pin GPIO_PIN_7