EVAL-ADXL362-ARDZ accelerometer shield

Dependencies:   ADXL362

Dependents:   EVAL_ADXL362_ARDZ-helloworld

For additional information check out the mbed page of the Analog Devices wiki: https://wiki.analog.com/resources/tools-software/mbed-drivers-all

Committer:
adisuciu
Date:
Thu Aug 18 12:37:03 2016 +0000
Revision:
2:e56adca82fee
Parent:
0:689a0bf410c3
Implemented missing doxygen tags

Who changed what in which revision?

UserRevisionLine numberNew contents of line
adisuciu 0:689a0bf410c3 1 /**
adisuciu 0:689a0bf410c3 2 * @file EVAL_ADXL362_ARDZ.cpp
adisuciu 0:689a0bf410c3 3 * @brief Header file for the EVAL-ADXL362-ARDZ board
adisuciu 0:689a0bf410c3 4 * @author Analog Devices Inc.
adisuciu 0:689a0bf410c3 5 *
adisuciu 0:689a0bf410c3 6 * For support please go to:
adisuciu 0:689a0bf410c3 7 * Github: https://github.com/analogdevicesinc/mbed-adi
adisuciu 0:689a0bf410c3 8 * Support: https://ez.analog.com/community/linux-device-drivers/microcontroller-no-os-drivers
adisuciu 0:689a0bf410c3 9 * Product: www.analog.com/EVAL-ADXL362-ARDZ
adisuciu 0:689a0bf410c3 10 * More: https://wiki.analog.com/resources/tools-software/mbed-drivers-all
adisuciu 0:689a0bf410c3 11
adisuciu 0:689a0bf410c3 12 ********************************************************************************
adisuciu 0:689a0bf410c3 13 * Copyright 2016(c) Analog Devices, Inc.
adisuciu 0:689a0bf410c3 14 *
adisuciu 0:689a0bf410c3 15 * All rights reserved.
adisuciu 0:689a0bf410c3 16 *
adisuciu 0:689a0bf410c3 17 * Redistribution and use in source and binary forms, with or without
adisuciu 0:689a0bf410c3 18 * modification, are permitted provided that the following conditions are met:
adisuciu 0:689a0bf410c3 19 * - Redistributions of source code must retain the above copyright
adisuciu 0:689a0bf410c3 20 * notice, this list of conditions and the following disclaimer.
adisuciu 0:689a0bf410c3 21 * - Redistributions in binary form must reproduce the above copyright
adisuciu 0:689a0bf410c3 22 * notice, this list of conditions and the following disclaimer in
adisuciu 0:689a0bf410c3 23 * the documentation and/or other materials provided with the
adisuciu 0:689a0bf410c3 24 * distribution.
adisuciu 0:689a0bf410c3 25 * - Neither the name of Analog Devices, Inc. nor the names of its
adisuciu 0:689a0bf410c3 26 * contributors may be used to endorse or promote products derived
adisuciu 0:689a0bf410c3 27 * from this software without specific prior written permission.
adisuciu 0:689a0bf410c3 28 * - The use of this software may or may not infringe the patent rights
adisuciu 0:689a0bf410c3 29 * of one or more patent holders. This license does not release you
adisuciu 0:689a0bf410c3 30 * from the requirement that you obtain separate licenses from these
adisuciu 0:689a0bf410c3 31 * patent holders to use this software.
adisuciu 0:689a0bf410c3 32 * - Use of the software either in source or binary form, must be run
adisuciu 0:689a0bf410c3 33 * on or directly connected to an Analog Devices Inc. component.
adisuciu 0:689a0bf410c3 34 *
adisuciu 0:689a0bf410c3 35 * THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR
adisuciu 0:689a0bf410c3 36 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT,
adisuciu 0:689a0bf410c3 37 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
adisuciu 0:689a0bf410c3 38 * IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT,
adisuciu 0:689a0bf410c3 39 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
adisuciu 0:689a0bf410c3 40 * LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR
adisuciu 0:689a0bf410c3 41 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
adisuciu 0:689a0bf410c3 42 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
adisuciu 0:689a0bf410c3 43 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
adisuciu 0:689a0bf410c3 44 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
adisuciu 0:689a0bf410c3 45 *
adisuciu 0:689a0bf410c3 46 ********************************************************************************/
adisuciu 0:689a0bf410c3 47
adisuciu 0:689a0bf410c3 48 #ifndef EVAL_ADXL362_ARDZ_H
adisuciu 0:689a0bf410c3 49 #define EVAL_ADXL362_ARDZ_H
adisuciu 0:689a0bf410c3 50
adisuciu 0:689a0bf410c3 51 #include "Lcd.h"
adisuciu 0:689a0bf410c3 52 #include "ADXL362.h"
adisuciu 0:689a0bf410c3 53
adisuciu 2:e56adca82fee 54 /**
adisuciu 2:e56adca82fee 55 * @brief EVAL-ADXL362_ARDZ accelerometer shield
adisuciu 2:e56adca82fee 56 */
adisuciu 0:689a0bf410c3 57 class EVAL_ADXL362_ARDZ
adisuciu 0:689a0bf410c3 58 {
adisuciu 0:689a0bf410c3 59 public:
adisuciu 0:689a0bf410c3 60 EVAL_ADXL362_ARDZ(Lcd& _lcd, ADXL362& _adxl362) ;
adisuciu 0:689a0bf410c3 61 void ADXL_setup();
adisuciu 0:689a0bf410c3 62 void ADXL_scan_xyzt();
adisuciu 0:689a0bf410c3 63 bool ADXL_get_int();
adisuciu 0:689a0bf410c3 64
adisuciu 0:689a0bf410c3 65 void LCD_setup();
adisuciu 0:689a0bf410c3 66 void LCD_init_display();
adisuciu 0:689a0bf410c3 67 void LCD_deinit_display();
adisuciu 0:689a0bf410c3 68 void LCD_display_level();
adisuciu 0:689a0bf410c3 69 void LCD_display_values();
adisuciu 0:689a0bf410c3 70
adisuciu 0:689a0bf410c3 71 Lcd lcd;
adisuciu 0:689a0bf410c3 72 ADXL362 adxl362;
adisuciu 0:689a0bf410c3 73
adisuciu 0:689a0bf410c3 74 private:
adisuciu 0:689a0bf410c3 75
adisuciu 0:689a0bf410c3 76 uint8_t _lcd_on;
adisuciu 0:689a0bf410c3 77 int16_t _x_axis_data;
adisuciu 0:689a0bf410c3 78 int16_t _y_axis_data;
adisuciu 0:689a0bf410c3 79 int16_t _z_axis_data;
adisuciu 0:689a0bf410c3 80 int16_t _t_data;
adisuciu 0:689a0bf410c3 81
adisuciu 0:689a0bf410c3 82 static const uint16_t INACT_VAL = 50;
adisuciu 0:689a0bf410c3 83 static const uint16_t INACT_TIMER = 100 * 10;
adisuciu 0:689a0bf410c3 84 static const uint16_t ACT_VAL = 50;
adisuciu 0:689a0bf410c3 85 static const uint8_t ACT_TIMER = 100;
adisuciu 0:689a0bf410c3 86 static const uint16_t SCAN_SENSOR_TIME = 500;
adisuciu 0:689a0bf410c3 87 };
adisuciu 0:689a0bf410c3 88
adisuciu 0:689a0bf410c3 89 #endif