precision-converters-firmware
All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
app_config.h
Go to the documentation of this file.
1/***************************************************************************//*
2 * @file app_config.h
3 * @brief Application configuration file
4******************************************************************************
5 * Copyright (c) 2019, 2021-2022 Analog Devices, Inc.
6 * All rights reserved.
7 *
8 * This software is proprietary to Analog Devices, Inc. and its licensors.
9 * By using this software you agree to the terms of the associated
10 * Analog Devices Software License Agreement.
11******************************************************************************/
12
13#ifndef _APP_CONFIG_H_
14#define _APP_CONFIG_H_
15
16/******************************************************************************/
17/***************************** Include Files **********************************/
18/******************************************************************************/
19
20#include <stdint.h>
21#include "PinNames.h"
22#include "mbed_spi.h"
23#include "mbed_i2c.h"
24
25/******************************************************************************/
26/********************** Macros and Constants Definition ***********************/
27/******************************************************************************/
28
29#ifndef ACTIVE_DEVICE
34#define ACTIVE_DEVICE ID_ADT7320
35#endif // !
36
40#define EXT_I2C_ADDRESS 0x49
41#define INT_I2C_ADDRESS 0x48
42
47#define EOL "\r\n"
48
55/* NOTE: Uncomment the SDP_120 #define below to enable the SDP-120 connector */
56
57
58// #define SDP_120
59
60#ifdef SDP_120
61#define I2C_SCL SDP_I2C_SCL
62#define I2C_SDA SDP_I2C_SDA
63
64#define SPI_CSB SDP_SPI_CS_A
65#define SPI_HOST_SDI SDP_SPI_MISO
66#define SPI_HOST_SDO SDP_SPI_MOSI
67#define SPI_SCK SDP_SPI_SCK
68
69#define SPI_CSE SDP_SPI_CS_B
70#else
71#define I2C_SCL ARDUINO_UNO_D15
72#define I2C_SDA ARDUINO_UNO_D14
73
74#define SPI_CSB ARDUINO_UNO_D10
75#define SPI_HOST_SDI ARDUINO_UNO_D12
76#define SPI_HOST_SDO ARDUINO_UNO_D11
77#define SPI_SCK ARDUINO_UNO_D13
78
79#define SPI_CSE ARDUINO_UNO_D9
80#endif
81
82#define spi_platform_ops mbed_spi_ops
83#define i2c_platform_ops mbed_i2c_ops
84
85#endif //_APP_CONFIG_H_