Example program for EVAL-TempSense-ARDZ boards.

Dependencies:   platform_drivers

Committer:
Kjansen
Date:
Fri Sep 24 15:22:13 2021 +0100
Revision:
7:3e5f6cca357e
1.) Updated the project repository structure
2.) Made modifications in the code to align with the latest no-OS drivers and the platform drivers

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Kjansen 7:3e5f6cca357e 1 /*****************************************************************************
Kjansen 7:3e5f6cca357e 2 * @file app_config.h
Kjansen 7:3e5f6cca357e 3 * @brief Application configuration file
Kjansen 7:3e5f6cca357e 4 * @author ssmith (sean.smith@analog.com)
Kjansen 7:3e5f6cca357e 5 ******************************************************************************
Kjansen 7:3e5f6cca357e 6 * Copyright (c) 2019, 2021 Analog Devices, Inc.
Kjansen 7:3e5f6cca357e 7 *
Kjansen 7:3e5f6cca357e 8 * All rights reserved.
Kjansen 7:3e5f6cca357e 9 *
Kjansen 7:3e5f6cca357e 10 * Redistribution and use in source and binary forms, with or without
Kjansen 7:3e5f6cca357e 11 * modification, are permitted provided that the following conditions are met:
Kjansen 7:3e5f6cca357e 12 * - Redistributions of source code must retain the above copyright notice,
Kjansen 7:3e5f6cca357e 13 * this list of conditions and the following disclaimer.
Kjansen 7:3e5f6cca357e 14 * - Redistributions in binary form must reproduce the above copyright notice,
Kjansen 7:3e5f6cca357e 15 * this list of conditions and the following disclaimer in the documentation
Kjansen 7:3e5f6cca357e 16 * and/or other materials provided with the distribution.
Kjansen 7:3e5f6cca357e 17 * - Modified versions of the software must be conspicuously marked as such.
Kjansen 7:3e5f6cca357e 18 * - This software is licensed solely and exclusively for use with
Kjansen 7:3e5f6cca357e 19 * processors/products manufactured by or for Analog Devices, Inc.
Kjansen 7:3e5f6cca357e 20 * - This software may not be combined or merged with other code in any manner
Kjansen 7:3e5f6cca357e 21 * that would cause the software to become subject to terms and
Kjansen 7:3e5f6cca357e 22 * conditions which differ from those listed here.
Kjansen 7:3e5f6cca357e 23 * - Neither the name of Analog Devices, Inc. nor the names of its
Kjansen 7:3e5f6cca357e 24 * contributors may be used to endorse or promote products derived
Kjansen 7:3e5f6cca357e 25 * from this software without specific prior written permission.
Kjansen 7:3e5f6cca357e 26 * - The use of this software may or may not infringe the patent rights
Kjansen 7:3e5f6cca357e 27 * of one or more patent holders. This license does not release you from
Kjansen 7:3e5f6cca357e 28 * the requirement that you obtain separate licenses from these patent
Kjansen 7:3e5f6cca357e 29 * holders to use this software.
Kjansen 7:3e5f6cca357e 30 *
Kjansen 7:3e5f6cca357e 31 * THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES, INC. AND CONTRIBUTORS "AS IS"
Kjansen 7:3e5f6cca357e 32 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
Kjansen 7:3e5f6cca357e 33 * NON-INFRINGEMENT, TITLE, MERCHANTABILITY AND FITNESS FOR A
Kjansen 7:3e5f6cca357e 34 * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANALOG DEVICES,
Kjansen 7:3e5f6cca357e 35 * INC. OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
Kjansen 7:3e5f6cca357e 36 * SPECIAL, EXEMPLARY, PUNITIVE OR CONSEQUENTIAL DAMAGES
Kjansen 7:3e5f6cca357e 37 * (INCLUDING, BUT NOT LIMITED TO, DAMAGES ARISING OUT OF CLAIMS OF
Kjansen 7:3e5f6cca357e 38 * INTELLECTUAL PROPERTY RIGHTS INFRINGEMENT; PROCUREMENT OF SUBSTITUTE
Kjansen 7:3e5f6cca357e 39 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
Kjansen 7:3e5f6cca357e 40 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
Kjansen 7:3e5f6cca357e 41 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
Kjansen 7:3e5f6cca357e 42 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
Kjansen 7:3e5f6cca357e 43 * POSSIBILITY OF SUCH DAMAGE.
Kjansen 7:3e5f6cca357e 44 *
Kjansen 7:3e5f6cca357e 45 * 20180927-7CBSD SLA
Kjansen 7:3e5f6cca357e 46 *****************************************************************************/
Kjansen 7:3e5f6cca357e 47
Kjansen 7:3e5f6cca357e 48 #ifndef _APP_CONFIG_H_
Kjansen 7:3e5f6cca357e 49 #define _APP_CONFIG_H_
Kjansen 7:3e5f6cca357e 50
Kjansen 7:3e5f6cca357e 51 #include <stdint.h>
Kjansen 7:3e5f6cca357e 52 #include "PinNames.h"
Kjansen 7:3e5f6cca357e 53
Kjansen 7:3e5f6cca357e 54 #ifndef ACTIVE_DEVICE
Kjansen 7:3e5f6cca357e 55 /**
Kjansen 7:3e5f6cca357e 56 #define your chosen device here from the
Kjansen 7:3e5f6cca357e 57 adt7420_type (adt7420.h) enum
Kjansen 7:3e5f6cca357e 58 */
Kjansen 7:3e5f6cca357e 59 #define ACTIVE_DEVICE ID_ADT7320
Kjansen 7:3e5f6cca357e 60 #endif // !
Kjansen 7:3e5f6cca357e 61
Kjansen 7:3e5f6cca357e 62 /**
Kjansen 7:3e5f6cca357e 63 ADT7420 is a 7-bit I2C address
Kjansen 7:3e5f6cca357e 64 */
Kjansen 7:3e5f6cca357e 65 #define EXT_I2C_ADDRESS 0x49
Kjansen 7:3e5f6cca357e 66 #define INT_I2C_ADDRESS 0x48
Kjansen 7:3e5f6cca357e 67
Kjansen 7:3e5f6cca357e 68 /**
Kjansen 7:3e5f6cca357e 69 Add a line-ending constant as different emulators
Kjansen 7:3e5f6cca357e 70 implement it in various ways - simple to change it here
Kjansen 7:3e5f6cca357e 71 */
Kjansen 7:3e5f6cca357e 72 #define EOL "\r\n"
Kjansen 7:3e5f6cca357e 73
Kjansen 7:3e5f6cca357e 74 /**
Kjansen 7:3e5f6cca357e 75 The ADI SDP_K1 can be used with either arduino headers
Kjansen 7:3e5f6cca357e 76 or the 120-pin SDP connector found on ADI evaluation
Kjansen 7:3e5f6cca357e 77 boards. The default is the SDP connector
Kjansen 7:3e5f6cca357e 78
Kjansen 7:3e5f6cca357e 79 Uncomment the ARDUINO #define above to enable the ARDUINO connector
Kjansen 7:3e5f6cca357e 80 */
Kjansen 7:3e5f6cca357e 81
Kjansen 7:3e5f6cca357e 82 //#define ARDUINO
Kjansen 7:3e5f6cca357e 83
Kjansen 7:3e5f6cca357e 84 #ifdef ARDUINO
Kjansen 7:3e5f6cca357e 85 #define I2C_SCL D15
Kjansen 7:3e5f6cca357e 86 #define I2C_SDA D14
Kjansen 7:3e5f6cca357e 87
Kjansen 7:3e5f6cca357e 88 #define SPI_CS D10
Kjansen 7:3e5f6cca357e 89 #define SPI_MISO D12
Kjansen 7:3e5f6cca357e 90 #define SPI_MOSI D11
Kjansen 7:3e5f6cca357e 91 #define SPI_SCK D13
Kjansen 7:3e5f6cca357e 92
Kjansen 7:3e5f6cca357e 93 #define SPI_CSE D9
Kjansen 7:3e5f6cca357e 94
Kjansen 7:3e5f6cca357e 95 #else
Kjansen 7:3e5f6cca357e 96 #define I2C_SCL SDP_I2C_SCL
Kjansen 7:3e5f6cca357e 97 #define I2C_SDA SDP_I2C_SDA
Kjansen 7:3e5f6cca357e 98
Kjansen 7:3e5f6cca357e 99 #define SPI_CS SDP_SPI_CS_A
Kjansen 7:3e5f6cca357e 100 #define SPI_MISO SDP_SPI_MISO
Kjansen 7:3e5f6cca357e 101 #define SPI_MOSI SDP_SPI_MOSI
Kjansen 7:3e5f6cca357e 102 #define SPI_SCK SDP_SPI_SCK
Kjansen 7:3e5f6cca357e 103
Kjansen 7:3e5f6cca357e 104 #define SPI_CSE SDP_SPI_CS_B
Kjansen 7:3e5f6cca357e 105
Kjansen 7:3e5f6cca357e 106 #endif
Kjansen 7:3e5f6cca357e 107
Kjansen 7:3e5f6cca357e 108 #endif //_APP_CONFIG_H_