initial commit, reads dev id

Committer:
phonemacro
Date:
Fri Sep 02 22:34:45 2022 +0000
Revision:
7:ffa35f46725e
Parent:
5:1f7b8cb07e26
remove clock enable/disable in MAX8614X::read_fifo_data (that was only needed for Rev A)

Who changed what in which revision?

UserRevisionLine numberNew contents of line
phonemacro 5:1f7b8cb07e26 1 /*******************************************************************************
phonemacro 5:1f7b8cb07e26 2 * Copyright (C) 2017 Maxim Integrated Products, Inc., All Rights Reserved.
phonemacro 5:1f7b8cb07e26 3 *
phonemacro 5:1f7b8cb07e26 4 * Permission is hereby granted, free of charge, to any person obtaining a
phonemacro 5:1f7b8cb07e26 5 * copy of this software and associated documentation files (the "Software"),
phonemacro 5:1f7b8cb07e26 6 * to deal in the Software without restriction, including without limitation
phonemacro 5:1f7b8cb07e26 7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
phonemacro 5:1f7b8cb07e26 8 * and/or sell copies of the Software, and to permit persons to whom the
phonemacro 5:1f7b8cb07e26 9 * Software is furnished to do so, subject to the following conditions:
phonemacro 5:1f7b8cb07e26 10 *
phonemacro 5:1f7b8cb07e26 11 * The above copyright notice and this permission notice shall be included
phonemacro 5:1f7b8cb07e26 12 * in all copies or substantial portions of the Software.
phonemacro 5:1f7b8cb07e26 13 *
phonemacro 5:1f7b8cb07e26 14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
phonemacro 5:1f7b8cb07e26 15 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
phonemacro 5:1f7b8cb07e26 16 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
phonemacro 5:1f7b8cb07e26 17 * IN NO EVENT SHALL MAXIM INTEGRATED BE LIABLE FOR ANY CLAIM, DAMAGES
phonemacro 5:1f7b8cb07e26 18 * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
phonemacro 5:1f7b8cb07e26 19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
phonemacro 5:1f7b8cb07e26 20 * OTHER DEALINGS IN THE SOFTWARE.
phonemacro 5:1f7b8cb07e26 21 *
phonemacro 5:1f7b8cb07e26 22 * Except as contained in this notice, the name of Maxim Integrated
phonemacro 5:1f7b8cb07e26 23 * Products, Inc. shall not be used except as stated in the Maxim Integrated
phonemacro 5:1f7b8cb07e26 24 * Products, Inc. Branding Policy.
phonemacro 5:1f7b8cb07e26 25 *
phonemacro 5:1f7b8cb07e26 26 * The mere transfer of this software does not imply any licenses
phonemacro 5:1f7b8cb07e26 27 * of trade secrets, proprietary technology, copyrights, patents,
phonemacro 5:1f7b8cb07e26 28 * trademarks, maskwork rights, or any other form of intellectual
phonemacro 5:1f7b8cb07e26 29 * property whatsoever. Maxim Integrated Products, Inc. retains all
phonemacro 5:1f7b8cb07e26 30 * ownership rights.
phonemacro 5:1f7b8cb07e26 31 *******************************************************************************
phonemacro 5:1f7b8cb07e26 32 */
phonemacro 5:1f7b8cb07e26 33 #ifndef _MAXIMSENSOR_H_
phonemacro 5:1f7b8cb07e26 34 #define _MAXIMSENSOR_H_
phonemacro 5:1f7b8cb07e26 35
phonemacro 5:1f7b8cb07e26 36 class MaximSensor
phonemacro 5:1f7b8cb07e26 37 {
phonemacro 5:1f7b8cb07e26 38 public:
phonemacro 5:1f7b8cb07e26 39 virtual int readRegister(uint8_t reg, uint8_t *data, int len) = 0;
phonemacro 5:1f7b8cb07e26 40 virtual int writeRegister(uint8_t reg, const uint8_t data) = 0;
phonemacro 5:1f7b8cb07e26 41 virtual int get_part_info(uint8_t *part_id, uint8_t *rev_id)= 0;
phonemacro 5:1f7b8cb07e26 42
phonemacro 5:1f7b8cb07e26 43 virtual int sensor_enable(int enable) = 0;
phonemacro 5:1f7b8cb07e26 44 virtual int agc_enable(int agc_enable);
phonemacro 5:1f7b8cb07e26 45
phonemacro 5:1f7b8cb07e26 46 virtual const char *get_sensor_part_name() = 0;
phonemacro 5:1f7b8cb07e26 47 virtual const char *get_sensor_name()= 0;
phonemacro 5:1f7b8cb07e26 48
phonemacro 5:1f7b8cb07e26 49 virtual int dump_registers();
phonemacro 5:1f7b8cb07e26 50
phonemacro 5:1f7b8cb07e26 51 private:
phonemacro 5:1f7b8cb07e26 52
phonemacro 5:1f7b8cb07e26 53 };
phonemacro 5:1f7b8cb07e26 54
phonemacro 5:1f7b8cb07e26 55 #endif /* _MAXIMSENSOR_H_ */
phonemacro 5:1f7b8cb07e26 56