mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
Migrate all Miniware devices to use Bit-Bang I2C (#1838)
* MHP30 move to I2C Bit Banging * Fixup Accelerometer drivers so all can use I2CBB * No STM32 I2C driver anymore * TS100 on I2CBB * Miniware on BB * Fixup S60 build * format format
This commit is contained in:
@@ -10,6 +10,8 @@
|
||||
#include "BMA223_defines.h"
|
||||
#include "BSP.h"
|
||||
#include "I2C_Wrapper.hpp"
|
||||
#include "accelerometers_common.h"
|
||||
|
||||
|
||||
class BMA223 {
|
||||
public:
|
||||
@@ -17,7 +19,7 @@ public:
|
||||
static bool initalize();
|
||||
// 1 = rh, 2,=lh, 8=flat
|
||||
static Orientation getOrientation() {
|
||||
uint8_t val = FRToSI2C::I2C_RegisterRead(BMA223_ADDRESS, BMA223_INT_STATUS_3);
|
||||
uint8_t val = ACCEL_I2C_CLASS::I2C_RegisterRead(BMA223_ADDRESS, BMA223_INT_STATUS_3);
|
||||
val >>= 4; // we dont need high values
|
||||
val &= 0b11;
|
||||
if (val & 0b10) {
|
||||
|
||||
Reference in New Issue
Block a user