Mbed FW update

Committer:
Vkadaba
Date:
Fri Jul 26 08:42:53 2019 +0000
Revision:
15:b5d57daeb7c0
Parent:
10:14954555be2a
Child:
25:b278a215cf3b
Modified the copyright notice

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Vkadaba 15:b5d57daeb7c0 1 /*
Vkadaba 15:b5d57daeb7c0 2 Copyright 2019 (c) Analog Devices, Inc.
Vkadaba 15:b5d57daeb7c0 3
Vkadaba 15:b5d57daeb7c0 4 All rights reserved.
Vkadaba 15:b5d57daeb7c0 5
Vkadaba 15:b5d57daeb7c0 6 Redistribution and use in source and binary forms, with or without
Vkadaba 15:b5d57daeb7c0 7 modification, are permitted provided that the following conditions are met:
Vkadaba 15:b5d57daeb7c0 8 - Redistributions of source code must retain the above copyright
Vkadaba 15:b5d57daeb7c0 9 notice, this list of conditions and the following disclaimer.
Vkadaba 15:b5d57daeb7c0 10 - Redistributions in binary form must reproduce the above copyright
Vkadaba 15:b5d57daeb7c0 11 notice, this list of conditions and the following disclaimer in
Vkadaba 15:b5d57daeb7c0 12 the documentation and/or other materials provided with the
Vkadaba 15:b5d57daeb7c0 13 distribution.
Vkadaba 15:b5d57daeb7c0 14 - Neither the name of Analog Devices, Inc. nor the names of its
Vkadaba 15:b5d57daeb7c0 15 contributors may be used to endorse or promote products derived
Vkadaba 15:b5d57daeb7c0 16 from this software without specific prior written permission.
Vkadaba 15:b5d57daeb7c0 17 - The use of this software may or may not infringe the patent rights
Vkadaba 15:b5d57daeb7c0 18 of one or more patent holders. This license does not release you
Vkadaba 15:b5d57daeb7c0 19 from the requirement that you obtain separate licenses from these
Vkadaba 15:b5d57daeb7c0 20 patent holders to use this software.
Vkadaba 15:b5d57daeb7c0 21 - Use of the software either in source or binary form, must be run
Vkadaba 15:b5d57daeb7c0 22 on or directly connected to an Analog Devices Inc. component.
Vkadaba 15:b5d57daeb7c0 23
Vkadaba 15:b5d57daeb7c0 24 THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR
Vkadaba 15:b5d57daeb7c0 25 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT,
Vkadaba 15:b5d57daeb7c0 26 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
Vkadaba 15:b5d57daeb7c0 27 IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT,
Vkadaba 15:b5d57daeb7c0 28 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
Vkadaba 15:b5d57daeb7c0 29 LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR
Vkadaba 15:b5d57daeb7c0 30 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
Vkadaba 15:b5d57daeb7c0 31 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
Vkadaba 15:b5d57daeb7c0 32 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
Vkadaba 15:b5d57daeb7c0 33 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Vkadaba 15:b5d57daeb7c0 34 */
Vkadaba 15:b5d57daeb7c0 35
Vkadaba 15:b5d57daeb7c0 36 /*!
Vkadaba 15:b5d57daeb7c0 37 ******************************************************************************
Vkadaba 15:b5d57daeb7c0 38 * @file: platform.h
Vkadaba 15:b5d57daeb7c0 39 * @brief: platform-specific type definitions for ADMW1001
Vkadaba 15:b5d57daeb7c0 40 *-----------------------------------------------------------------------------
Vkadaba 15:b5d57daeb7c0 41 */
ADIJake 0:85855ecd3257 42 #ifndef __PLATFORM_H__
ADIJake 0:85855ecd3257 43 #define __PLATFORM_H__
ADIJake 0:85855ecd3257 44
Vkadaba 5:0728bde67bdb 45 #include "admw_api.h"
Vkadaba 5:0728bde67bdb 46 #include "admw1001/admw1001_api.h"
ADIJake 0:85855ecd3257 47
ADIJake 0:85855ecd3257 48 #if defined (__MBED__)
ADIJake 0:85855ecd3257 49
ADIJake 0:85855ecd3257 50 # include <mbed.h>
ADIJake 0:85855ecd3257 51
ADIJake 0:85855ecd3257 52 # if defined(TARGET_NUCLEO_F411RE)
ADIJake 0:85855ecd3257 53 # define PLATFORM_SPI_MOSI SPI_MOSI
ADIJake 0:85855ecd3257 54 # define PLATFORM_SPI_MISO SPI_MISO
ADIJake 0:85855ecd3257 55 # define PLATFORM_SPI_SCK SPI_SCK
Vkadaba 9:dc77fcfa7eba 56 # define PLATFORM_SPI_CS D10
ADIJake 0:85855ecd3257 57 # define PLATFORM_GPIO_RESET D6
Vkadaba 10:14954555be2a 58 # define PLATFORM_GPIO_ALERT_ERROR D3
ADIJake 1:63dd03580de4 59 # define PLATFORM_GPIO_DATAREADY D4
ADIJake 0:85855ecd3257 60 # define PLATFORM_LOG_TX D1
ADIJake 0:85855ecd3257 61 # define PLATFORM_LOG_RX D0
ADIJake 0:85855ecd3257 62 # elif defined(TARGET_ADUCM4050)
ADIJake 0:85855ecd3257 63 # define PLATFORM_SPI_MOSI SPI0_MOSI
ADIJake 0:85855ecd3257 64 # define PLATFORM_SPI_MISO SPI0_MISO
ADIJake 0:85855ecd3257 65 # define PLATFORM_SPI_SCK SPI0_SCLK
ADIJake 0:85855ecd3257 66 # define PLATFORM_SPI_CS D10
ADIJake 0:85855ecd3257 67 # define PLATFORM_GPIO_RESET D6
Vkadaba 5:0728bde67bdb 68 # define PLATFORM_GPIO_ALERT_ERROR D3
ADIJake 0:85855ecd3257 69 # define PLATFORM_GPIO_DATAREADY D5
ADIJake 0:85855ecd3257 70 # define PLATFORM_LOG_TX D0
ADIJake 0:85855ecd3257 71 # define PLATFORM_LOG_RX D1
ADIJake 0:85855ecd3257 72 # else
ADIJake 0:85855ecd3257 73 # error "Unknown target device"
ADIJake 0:85855ecd3257 74 # endif
ADIJake 0:85855ecd3257 75
ADIJake 0:85855ecd3257 76 # define PLATFORM_CONNECTION_INFO \
ADIJake 0:85855ecd3257 77 { \
Vkadaba 5:0728bde67bdb 78 .type = ADMW_CONNECTION_TYPE_SPI, \
ADIJake 0:85855ecd3257 79 .spi = { \
ADIJake 0:85855ecd3257 80 .mosiPin = PLATFORM_SPI_MOSI, \
ADIJake 0:85855ecd3257 81 .misoPin = PLATFORM_SPI_MISO, \
ADIJake 0:85855ecd3257 82 .sckPin = PLATFORM_SPI_SCK, \
ADIJake 0:85855ecd3257 83 .csPin = PLATFORM_SPI_CS, \
ADIJake 0:85855ecd3257 84 .maxSpeedHz = 1600000, \
ADIJake 0:85855ecd3257 85 }, \
ADIJake 0:85855ecd3257 86 .gpio = { \
ADIJake 0:85855ecd3257 87 .resetPin = PLATFORM_GPIO_RESET, \
Vkadaba 5:0728bde67bdb 88 .alertErrorPin = PLATFORM_GPIO_ALERT_ERROR, \
ADIJake 0:85855ecd3257 89 .datareadyPin = PLATFORM_GPIO_DATAREADY,\
ADIJake 0:85855ecd3257 90 }, \
ADIJake 0:85855ecd3257 91 .log = { \
ADIJake 0:85855ecd3257 92 .txPin = PLATFORM_LOG_TX, \
ADIJake 0:85855ecd3257 93 .rxPin = PLATFORM_LOG_RX, \
ADIJake 0:85855ecd3257 94 .baudRate = 115200, \
ADIJake 0:85855ecd3257 95 .disableLogs = false, \
ADIJake 0:85855ecd3257 96 } \
ADIJake 0:85855ecd3257 97 }
ADIJake 0:85855ecd3257 98
ADIJake 0:85855ecd3257 99 #else
ADIJake 0:85855ecd3257 100 # error "Unknown host platform"
ADIJake 0:85855ecd3257 101 #endif
ADIJake 0:85855ecd3257 102
ADIJake 0:85855ecd3257 103 #endif /* __PLATFORM_H__ */
ADIJake 0:85855ecd3257 104