A collection of Analog Devices drivers for the mbed platform
Embed:
(wiki syntax)
Show/hide line numbers
EVAL_ADXL362_ARDZ.h
00001 /** 00002 * @file EVAL_ADXL362_ARDZ.cpp 00003 * @brief Header file for the EVAL-ADXL362-ARDZ board 00004 * @author Analog Devices Inc. 00005 * 00006 * For support please go to: 00007 * Github: https://github.com/analogdevicesinc/mbed-adi 00008 * Support: https://ez.analog.com/community/linux-device-drivers/microcontroller-no-os-drivers 00009 * Product: www.analog.com/EVAL-ADXL362-ARDZ 00010 * More: https://wiki.analog.com/resources/tools-software/mbed-drivers-all 00011 00012 ******************************************************************************** 00013 * Copyright 2016(c) Analog Devices, Inc. 00014 * 00015 * All rights reserved. 00016 * 00017 * Redistribution and use in source and binary forms, with or without 00018 * modification, are permitted provided that the following conditions are met: 00019 * - Redistributions of source code must retain the above copyright 00020 * notice, this list of conditions and the following disclaimer. 00021 * - Redistributions in binary form must reproduce the above copyright 00022 * notice, this list of conditions and the following disclaimer in 00023 * the documentation and/or other materials provided with the 00024 * distribution. 00025 * - Neither the name of Analog Devices, Inc. nor the names of its 00026 * contributors may be used to endorse or promote products derived 00027 * from this software without specific prior written permission. 00028 * - The use of this software may or may not infringe the patent rights 00029 * of one or more patent holders. This license does not release you 00030 * from the requirement that you obtain separate licenses from these 00031 * patent holders to use this software. 00032 * - Use of the software either in source or binary form, must be run 00033 * on or directly connected to an Analog Devices Inc. component. 00034 * 00035 * THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR 00036 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, 00037 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 00038 * IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, 00039 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 00040 * LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR 00041 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 00042 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 00043 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 00044 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00045 * 00046 ********************************************************************************/ 00047 00048 #ifndef EVAL_ADXL362_ARDZ_H 00049 #define EVAL_ADXL362_ARDZ_H 00050 00051 #include "Lcd.h" 00052 #include "ADXL362.h" 00053 00054 /** 00055 * @brief EVAL-ADXL362_ARDZ accelerometer shield 00056 */ 00057 class EVAL_ADXL362_ARDZ 00058 { 00059 public: 00060 EVAL_ADXL362_ARDZ(Lcd& _lcd, ADXL362& _adxl362) ; 00061 void ADXL_setup(); 00062 void ADXL_scan_xyzt(); 00063 bool ADXL_get_int(); 00064 00065 void LCD_setup(); 00066 void LCD_init_display(); 00067 void LCD_deinit_display(); 00068 void LCD_display_level(); 00069 void LCD_display_values(); 00070 00071 Lcd lcd; 00072 ADXL362 adxl362; 00073 00074 private: 00075 00076 uint8_t _lcd_on; 00077 int16_t _x_axis_data; 00078 int16_t _y_axis_data; 00079 int16_t _z_axis_data; 00080 int16_t _t_data; 00081 00082 static const uint16_t INACT_VAL = 50; 00083 static const uint16_t INACT_TIMER = 100 * 10; 00084 static const uint16_t ACT_VAL = 50; 00085 static const uint8_t ACT_TIMER = 100; 00086 static const uint16_t SCAN_SENSOR_TIME = 500; 00087 }; 00088 00089 #endif
Generated on Tue Jul 12 2022 17:59:52 by 1.7.2