AdiSense1000_V21 MBED API

Fork of AdiSense1000 by PoC_Team

Committer:
kevin1990
Date:
Thu May 17 10:34:45 2018 +0100
Revision:
28:4eb837cd71df
Adding host library and example code for v1.3 release

Who changed what in which revision?

UserRevisionLine numberNew contents of line
kevin1990 28:4eb837cd71df 1 /*
kevin1990 28:4eb837cd71df 2 CONFIDENTIAL AND PROPRIETARY INFORMATION
kevin1990 28:4eb837cd71df 3
kevin1990 28:4eb837cd71df 4 Copyright (c) 2018 Emutex Ltd. All rights reserved.
kevin1990 28:4eb837cd71df 5 This software and documentation contain confidential and
kevin1990 28:4eb837cd71df 6 proprietary information that is the property of
kevin1990 28:4eb837cd71df 7 Emutex Ltd. The software and documentation are
kevin1990 28:4eb837cd71df 8 furnished under a license agreement and may be used
kevin1990 28:4eb837cd71df 9 or copied only in accordance with the terms of the license
kevin1990 28:4eb837cd71df 10 agreement. No part of the software and documentation
kevin1990 28:4eb837cd71df 11 may be reproduced, transmitted, or translated, in any
kevin1990 28:4eb837cd71df 12 form or by any means, electronic, mechanical, manual,
kevin1990 28:4eb837cd71df 13 optical, or otherwise, without prior written permission
kevin1990 28:4eb837cd71df 14 of Emutex Ltd., or as expressly provided by the license agreement.
kevin1990 28:4eb837cd71df 15 Reverse engineering is prohibited, and reproduction,
kevin1990 28:4eb837cd71df 16 disclosure or use without specific written authorization
kevin1990 28:4eb837cd71df 17 of Emutex Ltd. is strictly forbidden.
kevin1990 28:4eb837cd71df 18 *
kevin1990 28:4eb837cd71df 19 Copyright 2017 (c) Analog Devices, Inc.
kevin1990 28:4eb837cd71df 20
kevin1990 28:4eb837cd71df 21 All rights reserved.
kevin1990 28:4eb837cd71df 22
kevin1990 28:4eb837cd71df 23 Redistribution and use in source and binary forms, with or without
kevin1990 28:4eb837cd71df 24 modification, are permitted provided that the following conditions are met:
kevin1990 28:4eb837cd71df 25 - Redistributions of source code must retain the above copyright
kevin1990 28:4eb837cd71df 26 notice, this list of conditions and the following disclaimer.
kevin1990 28:4eb837cd71df 27 - Redistributions in binary form must reproduce the above copyright
kevin1990 28:4eb837cd71df 28 notice, this list of conditions and the following disclaimer in
kevin1990 28:4eb837cd71df 29 the documentation and/or other materials provided with the
kevin1990 28:4eb837cd71df 30 distribution.
kevin1990 28:4eb837cd71df 31 - Neither the name of Analog Devices, Inc. nor the names of its
kevin1990 28:4eb837cd71df 32 contributors may be used to endorse or promote products derived
kevin1990 28:4eb837cd71df 33 from this software without specific prior written permission.
kevin1990 28:4eb837cd71df 34 - The use of this software may or may not infringe the patent rights
kevin1990 28:4eb837cd71df 35 of one or more patent holders. This license does not release you
kevin1990 28:4eb837cd71df 36 from the requirement that you obtain separate licenses from these
kevin1990 28:4eb837cd71df 37 patent holders to use this software.
kevin1990 28:4eb837cd71df 38 - Use of the software either in source or binary form, must be run
kevin1990 28:4eb837cd71df 39 on or directly connected to an Analog Devices Inc. component.
kevin1990 28:4eb837cd71df 40
kevin1990 28:4eb837cd71df 41 THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR
kevin1990 28:4eb837cd71df 42 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT,
kevin1990 28:4eb837cd71df 43 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
kevin1990 28:4eb837cd71df 44 IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT,
kevin1990 28:4eb837cd71df 45 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
kevin1990 28:4eb837cd71df 46 LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR
kevin1990 28:4eb837cd71df 47 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
kevin1990 28:4eb837cd71df 48 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
kevin1990 28:4eb837cd71df 49 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
kevin1990 28:4eb837cd71df 50 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
kevin1990 28:4eb837cd71df 51 *
kevin1990 28:4eb837cd71df 52 *****************************************************************************/
kevin1990 28:4eb837cd71df 53
kevin1990 28:4eb837cd71df 54 /*!
kevin1990 28:4eb837cd71df 55 ******************************************************************************
kevin1990 28:4eb837cd71df 56 * @file:
kevin1990 28:4eb837cd71df 57 * @brief:
kevin1990 28:4eb837cd71df 58 *-----------------------------------------------------------------------------
kevin1990 28:4eb837cd71df 59 */
kevin1990 28:4eb837cd71df 60 #include "inc/adi_sense_config_types.h"
kevin1990 28:4eb837cd71df 61
kevin1990 28:4eb837cd71df 62 ADI_SENSE_CONFIG spi0_adiAdxl355_config = {
kevin1990 28:4eb837cd71df 63 .versionId = { .major = 1, .minor = 4 },
kevin1990 28:4eb837cd71df 64 .productId = ADI_SENSE_PRODUCT_ID_ADSNS1000,
kevin1990 28:4eb837cd71df 65 .adisense1000 = {
kevin1990 28:4eb837cd71df 66 .power = {
kevin1990 28:4eb837cd71df 67 .powerMode = ADI_SENSE_1000_POWER_MODE_FULL,
kevin1990 28:4eb837cd71df 68 },
kevin1990 28:4eb837cd71df 69 .measurement = {
kevin1990 28:4eb837cd71df 70 .operatingMode = ADI_SENSE_1000_OPERATING_MODE_CONTINUOUS,
kevin1990 28:4eb837cd71df 71 .dataReadyMode = ADI_SENSE_1000_DATAREADY_PER_CYCLE,
kevin1990 28:4eb837cd71df 72 .cycleInterval = 1000000,
kevin1990 28:4eb837cd71df 73 },
kevin1990 28:4eb837cd71df 74 .channels = {
kevin1990 28:4eb837cd71df 75 [ADI_SENSE_1000_CHANNEL_ID_SPI_0] = {
kevin1990 28:4eb837cd71df 76 /* Accelerometer X-Axis (and common settings for physical channel) */
kevin1990 28:4eb837cd71df 77 .enableChannel = true,
kevin1990 28:4eb837cd71df 78 .disablePublishing = false,
kevin1990 28:4eb837cd71df 79 .compensationChannel = ADI_SENSE_1000_CHANNEL_ID_NONE,
kevin1990 28:4eb837cd71df 80 .measurementsPerCycle = 10,
kevin1990 28:4eb837cd71df 81 .extraSettlingTime = 1000,
kevin1990 28:4eb837cd71df 82 .spiChannelConfig = {
kevin1990 28:4eb837cd71df 83 .sensor = ADI_SENSE_1000_SPI_SENSOR_ACCELEROMETER_B_DEF_L1,
kevin1990 28:4eb837cd71df 84 },
kevin1990 28:4eb837cd71df 85 },
kevin1990 28:4eb837cd71df 86 [ADI_SENSE_1000_CHANNEL_ID_SPI_1] = {
kevin1990 28:4eb837cd71df 87 /* Accelerometer Y-Axis (virtual channel) */
kevin1990 28:4eb837cd71df 88 .enableChannel = true,
kevin1990 28:4eb837cd71df 89 },
kevin1990 28:4eb837cd71df 90 [ADI_SENSE_1000_CHANNEL_ID_SPI_2] = {
kevin1990 28:4eb837cd71df 91 /* Accelerometer Z-Axis (virtual channel) */
kevin1990 28:4eb837cd71df 92 .enableChannel = true,
kevin1990 28:4eb837cd71df 93 },
kevin1990 28:4eb837cd71df 94 },
kevin1990 28:4eb837cd71df 95 },
kevin1990 28:4eb837cd71df 96 };