diff options
author | Damien George <damien.p.george@gmail.com> | 2014-03-20 23:33:30 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-03-20 23:33:30 +0000 |
commit | f78d9b1a721bbe56b9049f33a8ec610f811011e5 (patch) | |
tree | c972326556a8443412ca70da0a17df63bad62ecf /stmhal/accel.h | |
parent | d02f6eaa10a325291ad9d347487b0806fe0d691e (diff) | |
download | micropython-f78d9b1a721bbe56b9049f33a8ec610f811011e5.tar.gz micropython-f78d9b1a721bbe56b9049f33a8ec610f811011e5.zip |
stmhal: Add accelerometer driver; fix bug with LFN.
Diffstat (limited to 'stmhal/accel.h')
-rw-r--r-- | stmhal/accel.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/stmhal/accel.h b/stmhal/accel.h new file mode 100644 index 0000000000..c2320f1a4e --- /dev/null +++ b/stmhal/accel.h @@ -0,0 +1,11 @@ +void accel_init(void); +void accel_restart(uint8_t addr, int write); +void accel_start(uint8_t addr, int write); +void accel_send_byte(uint8_t data); +uint8_t accel_read_ack(void); +uint8_t accel_read_nack(void); +void accel_stop(void); + +MP_DECLARE_CONST_FUN_OBJ(pyb_accel_read_obj); +MP_DECLARE_CONST_FUN_OBJ(pyb_accel_read_all_obj); +MP_DECLARE_CONST_FUN_OBJ(pyb_accel_write_mode_obj); |