diff options
author | Damien George <damien.p.george@gmail.com> | 2014-04-20 19:06:15 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-04-20 19:06:15 +0100 |
commit | ff91156d3495c3583dd4ced85ceea6243a1377a2 (patch) | |
tree | 0267a87911faa1b0d618e845ac0419f673874185 /stmhal/accel.c | |
parent | 2b925d76962cb325cf5cc49a1becff3cd707b4aa (diff) | |
download | micropython-ff91156d3495c3583dd4ced85ceea6243a1377a2.tar.gz micropython-ff91156d3495c3583dd4ced85ceea6243a1377a2.zip |
stmhal: Improved configurability for I2C and SPI busses.
The HAL handles for the I2C/SPI objects are rather large, so we don't
want to unnecessarily include them.
Diffstat (limited to 'stmhal/accel.c')
-rw-r--r-- | stmhal/accel.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/stmhal/accel.c b/stmhal/accel.c index 339a93ea40..47c7a1a494 100644 --- a/stmhal/accel.c +++ b/stmhal/accel.c @@ -12,6 +12,8 @@ #include "i2c.h" #include "accel.h" +#if MICROPY_HW_HAS_MMA7660 + #define MMA_ADDR (0x98) #define MMA_REG_X (0) #define MMA_REG_Y (1) @@ -174,3 +176,5 @@ const mp_obj_type_t pyb_accel_type = { .make_new = pyb_accel_make_new, .locals_dict = (mp_obj_t)&pyb_accel_locals_dict, }; + +#endif // MICROPY_HW_HAS_MMA7660 |