valeria toffoli
/
COG4050_adxrs290_adxrs453
driver for gyro
Fork of COG4050_adxl355_adxl357-ver2 by
Diff: ADXRS290/ADXRS290.cpp
- Revision:
- 6:45d2393ef468
- Parent:
- 4:23b53636b576
- Child:
- 7:5aaa09c40283
--- a/ADXRS290/ADXRS290.cpp Wed Aug 08 12:13:05 2018 +0000 +++ b/ADXRS290/ADXRS290.cpp Tue Aug 14 06:49:07 2018 +0000 @@ -0,0 +1,35 @@ +#include <stdint.h> +#include "mbed.h" +#include "ADXRS290.h" + + +ADXRS290::ADXRS290(PinName cs_pin, PinName MOSI, PinName MISO, PinName SCK): adxrs290(MOSI, MISO, SCK), cs(cs_pin) +{ + cs = 1; + adxrs290.format(8,_SPI_MODE); + adxrs290.lock(); + gyro_sens = 5e-3; + t_sens = 0.1; +} + +/** SPI bus frequency */ +void ADXRS290::frequency(int hz) +{ + adxrs290.frequency(hz); +} + +/** ----------------------------------- */ +/** Writes the reg register with data */ +/** ----------------------------------- */ +void ADXRS290::write_reg(ADXRS290_register_t reg, uint8_t data){} +uint8_t ADXRS290::read_reg(ADXRS290_register_t reg){} +uint16_t ADXRS290::read_reg_u16(ADXRS290_register_t reg){} + +void ADXRS290::set_power_ctl_reg(uint8_t data){} +void ADXRS290::set_filter_ctl_reg(ADXRS290_filter_ctl_t hpf, ADXRS290_filter_ctl_t odr){} +void ADXRS290::set_sync(ADXRS290_dataready_ctl_t data){} + +uint16_t ADXRS290::scanx(){} +uint16_t ADXRS290::scany(){} +uint16_t ADXRS290::scant(){} + \ No newline at end of file