Mbed FW update

Committer:
Vkadaba
Date:
Wed Jun 05 05:39:15 2019 +0000
Revision:
5:0728bde67bdb
Parent:
1:63dd03580de4
Child:
9:dc77fcfa7eba
Replaced all references to ADISense/ADISENSE1000/adi_sense with ADMW/ADMW1001/admw and the prject builds.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ADIJake 0:85855ecd3257 1 #ifndef __PLATFORM_H__
ADIJake 0:85855ecd3257 2 #define __PLATFORM_H__
ADIJake 0:85855ecd3257 3
Vkadaba 5:0728bde67bdb 4 #include "admw_api.h"
Vkadaba 5:0728bde67bdb 5 #include "admw1001/admw1001_api.h"
ADIJake 0:85855ecd3257 6
ADIJake 0:85855ecd3257 7 #if defined (__MBED__)
ADIJake 0:85855ecd3257 8
ADIJake 0:85855ecd3257 9 # include <mbed.h>
ADIJake 0:85855ecd3257 10
ADIJake 0:85855ecd3257 11 # if defined(TARGET_NUCLEO_F411RE)
ADIJake 0:85855ecd3257 12 # define PLATFORM_SPI_MOSI SPI_MOSI
ADIJake 0:85855ecd3257 13 # define PLATFORM_SPI_MISO SPI_MISO
ADIJake 0:85855ecd3257 14 # define PLATFORM_SPI_SCK SPI_SCK
ADIJake 1:63dd03580de4 15 # define PLATFORM_SPI_CS D9
ADIJake 0:85855ecd3257 16 # define PLATFORM_GPIO_RESET D6
Vkadaba 5:0728bde67bdb 17 # define PLATFORM_GPIO_ALERT_ERROR D3
ADIJake 1:63dd03580de4 18 # define PLATFORM_GPIO_DATAREADY D4
ADIJake 0:85855ecd3257 19 # define PLATFORM_LOG_TX D1
ADIJake 0:85855ecd3257 20 # define PLATFORM_LOG_RX D0
ADIJake 0:85855ecd3257 21 # elif defined(TARGET_ADUCM4050)
ADIJake 0:85855ecd3257 22 # define PLATFORM_SPI_MOSI SPI0_MOSI
ADIJake 0:85855ecd3257 23 # define PLATFORM_SPI_MISO SPI0_MISO
ADIJake 0:85855ecd3257 24 # define PLATFORM_SPI_SCK SPI0_SCLK
ADIJake 0:85855ecd3257 25 # define PLATFORM_SPI_CS D10
ADIJake 0:85855ecd3257 26 # define PLATFORM_GPIO_RESET D6
Vkadaba 5:0728bde67bdb 27 # define PLATFORM_GPIO_ALERT_ERROR D3
ADIJake 0:85855ecd3257 28 # define PLATFORM_GPIO_DATAREADY D5
ADIJake 0:85855ecd3257 29 # define PLATFORM_LOG_TX D0
ADIJake 0:85855ecd3257 30 # define PLATFORM_LOG_RX D1
ADIJake 0:85855ecd3257 31 # else
ADIJake 0:85855ecd3257 32 # error "Unknown target device"
ADIJake 0:85855ecd3257 33 # endif
ADIJake 0:85855ecd3257 34
ADIJake 0:85855ecd3257 35 # define PLATFORM_CONNECTION_INFO \
ADIJake 0:85855ecd3257 36 { \
Vkadaba 5:0728bde67bdb 37 .type = ADMW_CONNECTION_TYPE_SPI, \
ADIJake 0:85855ecd3257 38 .spi = { \
ADIJake 0:85855ecd3257 39 .mosiPin = PLATFORM_SPI_MOSI, \
ADIJake 0:85855ecd3257 40 .misoPin = PLATFORM_SPI_MISO, \
ADIJake 0:85855ecd3257 41 .sckPin = PLATFORM_SPI_SCK, \
ADIJake 0:85855ecd3257 42 .csPin = PLATFORM_SPI_CS, \
ADIJake 0:85855ecd3257 43 .maxSpeedHz = 1600000, \
ADIJake 0:85855ecd3257 44 }, \
ADIJake 0:85855ecd3257 45 .gpio = { \
ADIJake 0:85855ecd3257 46 .resetPin = PLATFORM_GPIO_RESET, \
Vkadaba 5:0728bde67bdb 47 .alertErrorPin = PLATFORM_GPIO_ALERT_ERROR, \
ADIJake 0:85855ecd3257 48 .datareadyPin = PLATFORM_GPIO_DATAREADY,\
ADIJake 0:85855ecd3257 49 }, \
ADIJake 0:85855ecd3257 50 .log = { \
ADIJake 0:85855ecd3257 51 .txPin = PLATFORM_LOG_TX, \
ADIJake 0:85855ecd3257 52 .rxPin = PLATFORM_LOG_RX, \
ADIJake 0:85855ecd3257 53 .baudRate = 115200, \
ADIJake 0:85855ecd3257 54 .disableLogs = false, \
ADIJake 0:85855ecd3257 55 } \
ADIJake 0:85855ecd3257 56 }
ADIJake 0:85855ecd3257 57
ADIJake 0:85855ecd3257 58 #else
ADIJake 0:85855ecd3257 59 # error "Unknown host platform"
ADIJake 0:85855ecd3257 60 #endif
ADIJake 0:85855ecd3257 61
ADIJake 0:85855ecd3257 62 #endif /* __PLATFORM_H__ */
ADIJake 0:85855ecd3257 63