BMI160 Initial

Dependents:   MAX32630HSP3_IMU_HelloWorld MAX32630HSP3_IMU_HelloWorld MAX32630HSP3_Pitch_Charles Maxim_Squeeks

Committer:
CharlesMaxim
Date:
Tue Dec 04 09:50:52 2018 +0000
Revision:
21:0b28b9d13164
Parent:
9:ca6b5fecdd63
Initial Release for BMI160

Who changed what in which revision?

UserRevisionLine numberNew contents of line
j3 2:598e601e5846 1 /**********************************************************************
j3 2:598e601e5846 2 * Copyright (C) 2016 Maxim Integrated Products, Inc., All Rights Reserved.
j3 2:598e601e5846 3 *
j3 2:598e601e5846 4 * Permission is hereby granted, free of charge, to any person obtaining a
j3 2:598e601e5846 5 * copy of this software and associated documentation files (the "Software"),
j3 2:598e601e5846 6 * to deal in the Software without restriction, including without limitation
j3 2:598e601e5846 7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
j3 2:598e601e5846 8 * and/or sell copies of the Software, and to permit persons to whom the
j3 2:598e601e5846 9 * Software is furnished to do so, subject to the following conditions:
j3 2:598e601e5846 10 *
j3 2:598e601e5846 11 * The above copyright notice and this permission notice shall be included
j3 2:598e601e5846 12 * in all copies or substantial portions of the Software.
j3 2:598e601e5846 13 *
j3 2:598e601e5846 14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
j3 2:598e601e5846 15 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
j3 2:598e601e5846 16 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
j3 2:598e601e5846 17 * IN NO EVENT SHALL MAXIM INTEGRATED BE LIABLE FOR ANY CLAIM, DAMAGES
j3 2:598e601e5846 18 * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
j3 2:598e601e5846 19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
j3 2:598e601e5846 20 * OTHER DEALINGS IN THE SOFTWARE.
j3 2:598e601e5846 21 *
j3 2:598e601e5846 22 * Except as contained in this notice, the name of Maxim Integrated
j3 2:598e601e5846 23 * Products, Inc. shall not be used except as stated in the Maxim Integrated
j3 2:598e601e5846 24 * Products, Inc. Branding Policy.
j3 2:598e601e5846 25 *
j3 2:598e601e5846 26 * The mere transfer of this software does not imply any licenses
j3 2:598e601e5846 27 * of trade secrets, proprietary technology, copyrights, patents,
j3 2:598e601e5846 28 * trademarks, maskwork rights, or any other form of intellectual
j3 2:598e601e5846 29 * property whatsoever. Maxim Integrated Products, Inc. retains all
j3 2:598e601e5846 30 * ownership rights.
j3 2:598e601e5846 31 **********************************************************************/
j3 2:598e601e5846 32
j3 2:598e601e5846 33
j3 2:598e601e5846 34 #include "bmi160.h"
j3 2:598e601e5846 35
j3 2:598e601e5846 36
j3 2:598e601e5846 37 //*****************************************************************************
j3 2:598e601e5846 38 BMI160_SPI::BMI160_SPI(SPI &spiBus, DigitalOut &cs)
j3 2:598e601e5846 39 :m_spiBus(spiBus), m_cs(cs)
j3 2:598e601e5846 40 {
j3 9:ca6b5fecdd63 41
j3 2:598e601e5846 42 }
j3 2:598e601e5846 43
j3 2:598e601e5846 44
j3 2:598e601e5846 45 //*****************************************************************************
j3 2:598e601e5846 46 int32_t BMI160_SPI::readRegister(Registers reg, uint8_t *data)
j3 2:598e601e5846 47 {
j3 2:598e601e5846 48 int32_t rtnVal = -1;
j3 2:598e601e5846 49
j3 2:598e601e5846 50 return rtnVal;
j3 2:598e601e5846 51 }
j3 2:598e601e5846 52
j3 2:598e601e5846 53
j3 2:598e601e5846 54 //*****************************************************************************
j3 2:598e601e5846 55 int32_t BMI160_SPI::writeRegister(Registers reg, const uint8_t data)
j3 2:598e601e5846 56 {
j3 2:598e601e5846 57 int32_t rtnVal = -1;
j3 2:598e601e5846 58
j3 2:598e601e5846 59 return rtnVal;
j3 2:598e601e5846 60 }
j3 2:598e601e5846 61
j3 2:598e601e5846 62
j3 2:598e601e5846 63 //*****************************************************************************
j3 3:e1770675eca4 64 int32_t BMI160_SPI::readBlock(Registers startReg, Registers stopReg,
j3 3:e1770675eca4 65 uint8_t *data)
j3 2:598e601e5846 66 {
j3 2:598e601e5846 67 int32_t rtnVal = -1;
j3 2:598e601e5846 68
j3 2:598e601e5846 69 return rtnVal;
j3 2:598e601e5846 70 }
j3 2:598e601e5846 71
j3 2:598e601e5846 72
j3 2:598e601e5846 73 //*****************************************************************************
j3 3:e1770675eca4 74 int32_t BMI160_SPI::writeBlock(Registers startReg, Registers stopReg,
j3 3:e1770675eca4 75 const uint8_t *data)
j3 2:598e601e5846 76 {
j3 2:598e601e5846 77 int32_t rtnVal = -1;
j3 2:598e601e5846 78
j3 2:598e601e5846 79 return rtnVal;
j3 2:598e601e5846 80 }