2014-05-03 22:27:38 +00:00
|
|
|
/*
|
2017-06-30 07:22:17 +00:00
|
|
|
* This file is part of the MicroPython project, http://micropython.org/
|
2014-05-03 22:27:38 +00:00
|
|
|
*
|
|
|
|
* The MIT License (MIT)
|
|
|
|
*
|
|
|
|
* Copyright (c) 2013, 2014 Damien P. George
|
|
|
|
*
|
|
|
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
|
|
* of this software and associated documentation files (the "Software"), to deal
|
|
|
|
* in the Software without restriction, including without limitation the rights
|
|
|
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
|
|
* copies of the Software, and to permit persons to whom the Software is
|
|
|
|
* furnished to do so, subject to the following conditions:
|
|
|
|
*
|
|
|
|
* The above copyright notice and this permission notice shall be included in
|
|
|
|
* all copies or substantial portions of the Software.
|
|
|
|
*
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
|
|
* THE SOFTWARE.
|
|
|
|
*/
|
|
|
|
|
2014-03-20 23:33:30 +00:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <string.h>
|
|
|
|
|
2016-09-06 15:56:41 +00:00
|
|
|
#include "py/mphal.h"
|
2015-01-01 21:06:20 +00:00
|
|
|
#include "py/runtime.h"
|
2015-10-29 22:40:42 +00:00
|
|
|
#include "pin.h"
|
2014-03-25 23:26:14 +00:00
|
|
|
#include "i2c.h"
|
2014-03-20 23:33:30 +00:00
|
|
|
#include "accel.h"
|
|
|
|
|
2019-10-12 10:38:23 +00:00
|
|
|
#if MICROPY_HW_HAS_MMA7660 || MICROPY_HW_HAS_KXTJ3
|
2014-04-20 18:06:15 +00:00
|
|
|
|
2014-04-29 21:55:34 +00:00
|
|
|
/// \moduleref pyb
|
|
|
|
/// \class Accel - accelerometer control
|
|
|
|
///
|
2019-10-12 10:38:23 +00:00
|
|
|
/// Accel is an object that controls the MMA7660 or the KXTJ3 accelerometer
|
|
|
|
/// depending on one/two constant in mpconfigboard.h file of board project :
|
|
|
|
/// #define MICROPY_HW_HAS_MMA7660 (1)
|
|
|
|
/// #define MICROPY_HW_HAS_KXTJ3 (0) // not mandatory if equal to 0
|
|
|
|
///
|
|
|
|
/// Example usage:
|
2014-04-29 21:55:34 +00:00
|
|
|
///
|
2014-06-01 16:57:06 +00:00
|
|
|
/// accel = pyb.Accel()
|
|
|
|
/// for i in range(10):
|
|
|
|
/// print(accel.x(), accel.y(), accel.z())
|
|
|
|
///
|
2019-10-12 10:38:23 +00:00
|
|
|
/// Raw values are between -32 and 31 for -/+ 1.5G acceleration for MMA7660.
|
|
|
|
/// Raw values are between -128 and 127 for -/+ 8G acceleration for KXTJ3.
|
|
|
|
|
2014-04-29 21:55:34 +00:00
|
|
|
|
2019-04-18 00:31:44 +00:00
|
|
|
#define I2C_TIMEOUT_MS (50)
|
|
|
|
|
2019-10-12 10:38:23 +00:00
|
|
|
#if MICROPY_HW_HAS_MMA7660
|
|
|
|
|
2019-10-15 11:42:18 +00:00
|
|
|
#define ACCEL_ADDR (76)
|
|
|
|
#define ACCEL_REG_X (0)
|
|
|
|
#define ACCEL_REG_Y (1)
|
|
|
|
#define ACCEL_REG_Z (2)
|
|
|
|
#define ACCEL_REG_TILT (3)
|
|
|
|
#define ACCEL_REG_MODE (7)
|
|
|
|
#define ACCEL_AXIS_SIGNED_VALUE(i) (((i) & 0x3f) | ((i) & 0x20 ? (~0x1f) : 0))
|
2014-03-20 23:33:30 +00:00
|
|
|
|
2019-10-12 10:38:23 +00:00
|
|
|
#elif MICROPY_HW_HAS_KXTJ3
|
|
|
|
|
|
|
|
#define ACCEL_ADDR (0x0f)
|
|
|
|
#define ACCEL_REG_DCST_RESP (0x0c)
|
|
|
|
#define ACCEL_REG_WHO_AM_I (0x0f)
|
|
|
|
#define ACCEL_REG_X (0x07) // XOUT_H
|
|
|
|
#define ACCEL_REG_Y (0x09) // YOUT_H
|
|
|
|
#define ACCEL_REG_Z (0x0B) // ZOUT_H
|
|
|
|
#define ACCEL_REG_CTRL_REG1 (0x1B)
|
|
|
|
#define ACCEL_REG_CTRL_REG2 (0x1d)
|
|
|
|
#define ACCEL_REG_CTRL_REG2 (0x1d)
|
|
|
|
#define ACCEL_REG_DATA_CTRL_REG (0x21)
|
|
|
|
#define ACCEL_AXIS_SIGNED_VALUE(i) (((i) & 0x7f) | ((i) & 0x80 ? (~0x7f) : 0))
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2014-03-20 23:33:30 +00:00
|
|
|
void accel_init(void) {
|
2019-10-12 10:38:23 +00:00
|
|
|
#if MICROPY_HW_HAS_MMA7660
|
2014-03-20 23:33:30 +00:00
|
|
|
// PB5 is connected to AVDD; pull high to enable MMA accel device
|
2018-03-28 05:13:21 +00:00
|
|
|
mp_hal_pin_low(MICROPY_HW_MMA_AVDD_PIN); // turn off AVDD
|
|
|
|
mp_hal_pin_output(MICROPY_HW_MMA_AVDD_PIN);
|
2019-10-12 10:38:23 +00:00
|
|
|
#endif
|
2014-03-23 15:34:54 +00:00
|
|
|
}
|
|
|
|
|
2014-03-25 23:26:14 +00:00
|
|
|
STATIC void accel_start(void) {
|
2014-04-20 23:10:04 +00:00
|
|
|
// start the I2C bus in master mode
|
2019-04-18 00:31:44 +00:00
|
|
|
i2c_init(I2C1, MICROPY_HW_I2C1_SCL, MICROPY_HW_I2C1_SDA, 400000, I2C_TIMEOUT_MS);
|
2014-03-25 23:26:14 +00:00
|
|
|
|
2019-10-12 10:38:23 +00:00
|
|
|
#if MICROPY_HW_HAS_MMA7660
|
|
|
|
|
2014-07-31 09:39:52 +00:00
|
|
|
// turn off AVDD, wait 30ms, turn on AVDD, wait 30ms again
|
2018-03-28 05:13:21 +00:00
|
|
|
mp_hal_pin_low(MICROPY_HW_MMA_AVDD_PIN); // turn off
|
2017-03-02 04:02:57 +00:00
|
|
|
mp_hal_delay_ms(30);
|
2018-03-28 05:13:21 +00:00
|
|
|
mp_hal_pin_high(MICROPY_HW_MMA_AVDD_PIN); // turn on
|
2017-03-02 04:02:57 +00:00
|
|
|
mp_hal_delay_ms(30);
|
2014-03-20 23:33:30 +00:00
|
|
|
|
2018-05-14 03:23:18 +00:00
|
|
|
int ret;
|
|
|
|
for (int i = 0; i < 4; i++) {
|
2019-10-15 11:42:18 +00:00
|
|
|
ret = i2c_writeto(I2C1, ACCEL_ADDR, NULL, 0, true);
|
2018-05-14 03:23:18 +00:00
|
|
|
if (ret == 0) {
|
2014-03-20 23:33:30 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-05-14 03:23:18 +00:00
|
|
|
if (ret != 0) {
|
2020-03-02 11:35:22 +00:00
|
|
|
mp_raise_msg(&mp_type_OSError, MP_ERROR_TEXT("accelerometer not found"));
|
2016-04-29 14:43:15 +00:00
|
|
|
}
|
|
|
|
|
2014-07-31 09:39:52 +00:00
|
|
|
// set MMA to active mode
|
2019-10-15 11:42:18 +00:00
|
|
|
uint8_t data[2] = {ACCEL_REG_MODE, 1}; // active mode
|
|
|
|
i2c_writeto(I2C1, ACCEL_ADDR, data, 2, true);
|
2014-07-31 09:39:52 +00:00
|
|
|
|
|
|
|
// wait for MMA to become active
|
2017-03-02 04:02:57 +00:00
|
|
|
mp_hal_delay_ms(30);
|
2019-10-12 10:38:23 +00:00
|
|
|
|
|
|
|
#elif MICROPY_HW_HAS_KXTJ3
|
|
|
|
|
|
|
|
// readout WHO_AM_I register to check KXTJ3 device presence
|
|
|
|
uint8_t data[2] = { ACCEL_REG_WHO_AM_I };
|
|
|
|
i2c_writeto(I2C1, ACCEL_ADDR, data, 1, false);
|
|
|
|
i2c_readfrom(I2C1, ACCEL_ADDR, data, 1, true);
|
|
|
|
if (data[0] != 0x35) {
|
2020-03-02 11:35:22 +00:00
|
|
|
mp_raise_msg(&mp_type_OSError, MP_ERROR_TEXT("accelerometer not found"));
|
2019-10-12 10:38:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// set operating mode (default: 8 bits, range +/-8G)
|
|
|
|
data[0] = ACCEL_REG_CTRL_REG1;
|
|
|
|
data[1] = 0x90;
|
|
|
|
i2c_writeto(I2C1, ACCEL_ADDR, data, 2, true);
|
|
|
|
// set dat output rates to 200Hz (LPF roll-over 10ms), idd=35uA
|
|
|
|
data[0] = ACCEL_REG_DATA_CTRL_REG;
|
|
|
|
data[1] = 0x04;
|
|
|
|
i2c_writeto(I2C1, ACCEL_ADDR, data, 2, true);
|
|
|
|
|
|
|
|
#endif
|
2014-03-20 23:33:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************/
|
2017-06-30 07:22:17 +00:00
|
|
|
/* MicroPython bindings */
|
2014-03-20 23:33:30 +00:00
|
|
|
|
2014-03-23 15:34:54 +00:00
|
|
|
#define NUM_AXIS (3)
|
|
|
|
#define FILT_DEPTH (4)
|
2014-03-20 23:33:30 +00:00
|
|
|
|
2014-03-23 15:34:54 +00:00
|
|
|
typedef struct _pyb_accel_obj_t {
|
|
|
|
mp_obj_base_t base;
|
|
|
|
int16_t buf[NUM_AXIS * FILT_DEPTH];
|
|
|
|
} pyb_accel_obj_t;
|
2014-03-20 23:33:30 +00:00
|
|
|
|
2014-03-23 15:34:54 +00:00
|
|
|
STATIC pyb_accel_obj_t pyb_accel_obj;
|
|
|
|
|
2014-04-29 21:55:34 +00:00
|
|
|
/// \classmethod \constructor()
|
|
|
|
/// Create and return an accelerometer object.
|
2014-06-01 16:57:06 +00:00
|
|
|
///
|
|
|
|
/// Note: if you read accelerometer values immediately after creating this object
|
|
|
|
/// you will get 0. It takes around 20ms for the first sample to be ready, so,
|
|
|
|
/// unless you have some other code between creating this object and reading its
|
|
|
|
/// values, you should put a `pyb.delay(20)` after creating it. For example:
|
|
|
|
///
|
|
|
|
/// accel = pyb.Accel()
|
|
|
|
/// pyb.delay(20)
|
|
|
|
/// print(accel.x())
|
2017-01-04 13:10:42 +00:00
|
|
|
STATIC mp_obj_t pyb_accel_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) {
|
2014-03-24 11:48:39 +00:00
|
|
|
// check arguments
|
2014-04-19 23:16:30 +00:00
|
|
|
mp_arg_check_num(n_args, n_kw, 0, 0, false);
|
2014-03-24 11:48:39 +00:00
|
|
|
|
|
|
|
// init accel object
|
|
|
|
pyb_accel_obj.base.type = &pyb_accel_type;
|
2014-03-25 23:26:14 +00:00
|
|
|
accel_start();
|
2014-03-24 11:48:39 +00:00
|
|
|
|
2018-07-08 13:25:11 +00:00
|
|
|
return MP_OBJ_FROM_PTR(&pyb_accel_obj);
|
2014-03-24 11:48:39 +00:00
|
|
|
}
|
|
|
|
|
2014-03-23 15:34:54 +00:00
|
|
|
STATIC mp_obj_t read_axis(int axis) {
|
2018-05-14 03:23:18 +00:00
|
|
|
uint8_t data[1] = { axis };
|
2019-10-15 11:42:18 +00:00
|
|
|
i2c_writeto(I2C1, ACCEL_ADDR, data, 1, false);
|
|
|
|
i2c_readfrom(I2C1, ACCEL_ADDR, data, 1, true);
|
|
|
|
return mp_obj_new_int(ACCEL_AXIS_SIGNED_VALUE(data[0]));
|
2014-03-23 15:34:54 +00:00
|
|
|
}
|
|
|
|
|
2014-04-29 21:55:34 +00:00
|
|
|
/// \method x()
|
|
|
|
/// Get the x-axis value.
|
2014-03-23 15:34:54 +00:00
|
|
|
STATIC mp_obj_t pyb_accel_x(mp_obj_t self_in) {
|
2019-10-15 11:42:18 +00:00
|
|
|
return read_axis(ACCEL_REG_X);
|
2014-03-23 15:34:54 +00:00
|
|
|
}
|
|
|
|
STATIC MP_DEFINE_CONST_FUN_OBJ_1(pyb_accel_x_obj, pyb_accel_x);
|
|
|
|
|
2014-04-29 21:55:34 +00:00
|
|
|
/// \method y()
|
|
|
|
/// Get the y-axis value.
|
2014-03-23 15:34:54 +00:00
|
|
|
STATIC mp_obj_t pyb_accel_y(mp_obj_t self_in) {
|
2019-10-15 11:42:18 +00:00
|
|
|
return read_axis(ACCEL_REG_Y);
|
2014-03-23 15:34:54 +00:00
|
|
|
}
|
|
|
|
STATIC MP_DEFINE_CONST_FUN_OBJ_1(pyb_accel_y_obj, pyb_accel_y);
|
2014-03-20 23:33:30 +00:00
|
|
|
|
2014-04-29 21:55:34 +00:00
|
|
|
/// \method z()
|
|
|
|
/// Get the z-axis value.
|
2014-03-23 15:34:54 +00:00
|
|
|
STATIC mp_obj_t pyb_accel_z(mp_obj_t self_in) {
|
2019-10-15 11:42:18 +00:00
|
|
|
return read_axis(ACCEL_REG_Z);
|
2014-03-20 23:33:30 +00:00
|
|
|
}
|
2014-03-23 15:34:54 +00:00
|
|
|
STATIC MP_DEFINE_CONST_FUN_OBJ_1(pyb_accel_z_obj, pyb_accel_z);
|
2014-03-20 23:33:30 +00:00
|
|
|
|
2014-04-29 21:55:34 +00:00
|
|
|
/// \method tilt()
|
|
|
|
/// Get the tilt register.
|
2014-03-23 15:34:54 +00:00
|
|
|
STATIC mp_obj_t pyb_accel_tilt(mp_obj_t self_in) {
|
2019-10-12 10:38:23 +00:00
|
|
|
#if MICROPY_HW_HAS_MMA7660
|
2019-10-15 11:42:18 +00:00
|
|
|
uint8_t data[1] = { ACCEL_REG_TILT };
|
|
|
|
i2c_writeto(I2C1, ACCEL_ADDR, data, 1, false);
|
|
|
|
i2c_readfrom(I2C1, ACCEL_ADDR, data, 1, true);
|
2014-03-23 15:34:54 +00:00
|
|
|
return mp_obj_new_int(data[0]);
|
2019-10-12 10:38:23 +00:00
|
|
|
#elif MICROPY_HW_HAS_KXTJ3
|
|
|
|
/// No tilt like register with KXTJ3 accelerometer
|
|
|
|
return 0;
|
|
|
|
#endif
|
2014-03-23 15:34:54 +00:00
|
|
|
}
|
|
|
|
STATIC MP_DEFINE_CONST_FUN_OBJ_1(pyb_accel_tilt_obj, pyb_accel_tilt);
|
|
|
|
|
2014-04-29 21:55:34 +00:00
|
|
|
/// \method filtered_xyz()
|
|
|
|
/// Get a 3-tuple of filtered x, y and z values.
|
2014-03-23 15:34:54 +00:00
|
|
|
STATIC mp_obj_t pyb_accel_filtered_xyz(mp_obj_t self_in) {
|
2018-07-08 13:25:11 +00:00
|
|
|
pyb_accel_obj_t *self = MP_OBJ_TO_PTR(self_in);
|
2014-03-23 15:34:54 +00:00
|
|
|
|
|
|
|
memmove(self->buf, self->buf + NUM_AXIS, NUM_AXIS * (FILT_DEPTH - 1) * sizeof(int16_t));
|
|
|
|
|
2019-10-12 10:38:23 +00:00
|
|
|
#if MICROPY_HW_HAS_MMA7660
|
|
|
|
const size_t DATA_SIZE = NUM_AXIS;
|
|
|
|
const size_t DATA_STRIDE = 1;
|
|
|
|
#elif MICROPY_HW_HAS_KXTJ3
|
|
|
|
const size_t DATA_SIZE = 5;
|
|
|
|
const size_t DATA_STRIDE = 2;
|
|
|
|
#endif
|
2020-02-27 04:36:53 +00:00
|
|
|
uint8_t data[DATA_SIZE];
|
|
|
|
data[0] = ACCEL_REG_X;
|
2019-10-15 11:42:18 +00:00
|
|
|
i2c_writeto(I2C1, ACCEL_ADDR, data, 1, false);
|
2019-10-12 10:38:23 +00:00
|
|
|
i2c_readfrom(I2C1, ACCEL_ADDR, data, DATA_SIZE, true);
|
2014-03-23 15:34:54 +00:00
|
|
|
|
|
|
|
mp_obj_t tuple[NUM_AXIS];
|
|
|
|
for (int i = 0; i < NUM_AXIS; i++) {
|
2019-10-12 10:38:23 +00:00
|
|
|
self->buf[NUM_AXIS * (FILT_DEPTH - 1) + i] = ACCEL_AXIS_SIGNED_VALUE(data[i * DATA_STRIDE]);
|
2014-03-23 15:34:54 +00:00
|
|
|
int32_t val = 0;
|
|
|
|
for (int j = 0; j < FILT_DEPTH; j++) {
|
|
|
|
val += self->buf[i + NUM_AXIS * j];
|
|
|
|
}
|
|
|
|
tuple[i] = mp_obj_new_int(val);
|
2014-03-20 23:33:30 +00:00
|
|
|
}
|
|
|
|
|
2014-03-31 15:28:13 +00:00
|
|
|
return mp_obj_new_tuple(3, tuple);
|
2014-03-20 23:33:30 +00:00
|
|
|
}
|
2014-03-23 15:34:54 +00:00
|
|
|
STATIC MP_DEFINE_CONST_FUN_OBJ_1(pyb_accel_filtered_xyz_obj, pyb_accel_filtered_xyz);
|
2014-03-20 23:33:30 +00:00
|
|
|
|
2014-03-26 20:15:40 +00:00
|
|
|
STATIC mp_obj_t pyb_accel_read(mp_obj_t self_in, mp_obj_t reg) {
|
2018-05-14 03:23:18 +00:00
|
|
|
uint8_t data[1] = { mp_obj_get_int(reg) };
|
2019-10-15 11:42:18 +00:00
|
|
|
i2c_writeto(I2C1, ACCEL_ADDR, data, 1, false);
|
2019-10-18 00:53:34 +00:00
|
|
|
i2c_readfrom(I2C1, ACCEL_ADDR, data, 1, true);
|
2014-03-23 15:34:54 +00:00
|
|
|
return mp_obj_new_int(data[0]);
|
|
|
|
}
|
2014-03-26 20:15:40 +00:00
|
|
|
MP_DEFINE_CONST_FUN_OBJ_2(pyb_accel_read_obj, pyb_accel_read);
|
2014-03-23 15:34:54 +00:00
|
|
|
|
2014-03-26 20:15:40 +00:00
|
|
|
STATIC mp_obj_t pyb_accel_write(mp_obj_t self_in, mp_obj_t reg, mp_obj_t val) {
|
2018-05-14 03:23:18 +00:00
|
|
|
uint8_t data[2] = { mp_obj_get_int(reg), mp_obj_get_int(val) };
|
2019-10-15 11:42:18 +00:00
|
|
|
i2c_writeto(I2C1, ACCEL_ADDR, data, 2, true);
|
2014-03-20 23:33:30 +00:00
|
|
|
return mp_const_none;
|
|
|
|
}
|
2014-03-26 20:15:40 +00:00
|
|
|
MP_DEFINE_CONST_FUN_OBJ_3(pyb_accel_write_obj, pyb_accel_write);
|
2014-03-23 15:34:54 +00:00
|
|
|
|
2017-05-06 07:03:40 +00:00
|
|
|
STATIC const mp_rom_map_elem_t pyb_accel_locals_dict_table[] = {
|
2014-04-21 17:30:38 +00:00
|
|
|
// TODO add init, deinit, and perhaps reset methods
|
2017-05-06 07:03:40 +00:00
|
|
|
{ MP_ROM_QSTR(MP_QSTR_x), MP_ROM_PTR(&pyb_accel_x_obj) },
|
|
|
|
{ MP_ROM_QSTR(MP_QSTR_y), MP_ROM_PTR(&pyb_accel_y_obj) },
|
|
|
|
{ MP_ROM_QSTR(MP_QSTR_z), MP_ROM_PTR(&pyb_accel_z_obj) },
|
|
|
|
{ MP_ROM_QSTR(MP_QSTR_tilt), MP_ROM_PTR(&pyb_accel_tilt_obj) },
|
|
|
|
{ MP_ROM_QSTR(MP_QSTR_filtered_xyz), MP_ROM_PTR(&pyb_accel_filtered_xyz_obj) },
|
|
|
|
{ MP_ROM_QSTR(MP_QSTR_read), MP_ROM_PTR(&pyb_accel_read_obj) },
|
|
|
|
{ MP_ROM_QSTR(MP_QSTR_write), MP_ROM_PTR(&pyb_accel_write_obj) },
|
2014-03-23 15:34:54 +00:00
|
|
|
};
|
|
|
|
|
2014-03-26 21:47:19 +00:00
|
|
|
STATIC MP_DEFINE_CONST_DICT(pyb_accel_locals_dict, pyb_accel_locals_dict_table);
|
|
|
|
|
2021-07-14 04:38:38 +00:00
|
|
|
MP_DEFINE_CONST_OBJ_TYPE(
|
|
|
|
pyb_accel_type,
|
|
|
|
MP_QSTR_Accel,
|
|
|
|
MP_TYPE_FLAG_NONE,
|
2022-09-16 14:31:23 +00:00
|
|
|
make_new, pyb_accel_make_new,
|
2022-06-24 06:27:46 +00:00
|
|
|
locals_dict, &pyb_accel_locals_dict
|
2021-07-14 04:38:38 +00:00
|
|
|
);
|
2014-04-20 18:06:15 +00:00
|
|
|
|
2019-10-12 10:38:23 +00:00
|
|
|
#endif // MICROPY_HW_HAS_MMA7660 || MICROPY_HW_HAS_KXTJ3
|