CAC_smartcushion / Mbed OS AdiSense1000_V21_Smartcushion

Fork of Sean_AdiSense1000_V21 by Rohan Gurav

Committer:
nfathurr
Date:
Mon Sep 24 11:39:35 2018 +0000
Revision:
34:029fc3b83f78
Child:
35:853be4d80ff3
v21

Who changed what in which revision?

UserRevisionLine numberNew contents of line
nfathurr 34:029fc3b83f78 1 #ifndef __MYSWIFT_PERIPH_H_
nfathurr 34:029fc3b83f78 2 #define __MYSWIFT_PERIPH_H_
nfathurr 34:029fc3b83f78 3
nfathurr 34:029fc3b83f78 4
nfathurr 34:029fc3b83f78 5 #include "mbed.h"
nfathurr 34:029fc3b83f78 6 #include "adi_sense_api.h"
nfathurr 34:029fc3b83f78 7 #include "JENKINS_AUTOGEN_PLATFORM.h"
nfathurr 34:029fc3b83f78 8
nfathurr 34:029fc3b83f78 9
nfathurr 34:029fc3b83f78 10 #ifdef MYSWIFT
nfathurr 34:029fc3b83f78 11 #define DEVICE_NAME "ADI MySwift"
nfathurr 34:029fc3b83f78 12 #define FIRMWARE_VERSION "Version 2.1"
nfathurr 34:029fc3b83f78 13 #endif
nfathurr 34:029fc3b83f78 14
nfathurr 34:029fc3b83f78 15
nfathurr 34:029fc3b83f78 16 #ifdef PROSWIFT
nfathurr 34:029fc3b83f78 17 #define DEVICE_NAME "ADI ProSwift"
nfathurr 34:029fc3b83f78 18 #define FIRMWARE_VERSION "Version 2.1"
nfathurr 34:029fc3b83f78 19 #endif
nfathurr 34:029fc3b83f78 20
nfathurr 34:029fc3b83f78 21
nfathurr 34:029fc3b83f78 22 #if defined(MYSWIFT) && defined(PROSWIFT)
nfathurr 34:029fc3b83f78 23 #error "Only one platform must be defined"
nfathurr 34:029fc3b83f78 24 #endif
nfathurr 34:029fc3b83f78 25
nfathurr 34:029fc3b83f78 26
nfathurr 34:029fc3b83f78 27 #if !(defined(MYSWIFT) || defined(PROSWIFT))
nfathurr 34:029fc3b83f78 28 #error "At least one platform must be defined"
nfathurr 34:029fc3b83f78 29 #endif
nfathurr 34:029fc3b83f78 30
nfathurr 34:029fc3b83f78 31 #define BL652
nfathurr 34:029fc3b83f78 32
nfathurr 34:029fc3b83f78 33 /*
nfathurr 34:029fc3b83f78 34 ******************************************************************************
nfathurr 34:029fc3b83f78 35 * ADISense1000
nfathurr 34:029fc3b83f78 36 *-----------------------------------------------------------------------------
nfathurr 34:029fc3b83f78 37 */
nfathurr 34:029fc3b83f78 38
nfathurr 34:029fc3b83f78 39 #ifdef MYSWIFT
nfathurr 34:029fc3b83f78 40 #define SENSE_SPI_FREQUENCY 2000000
nfathurr 34:029fc3b83f78 41 #define SENSE_SPI_MOSI PA_7
nfathurr 34:029fc3b83f78 42 #define SENSE_SPI_MISO PA_6
nfathurr 34:029fc3b83f78 43 #define SENSE_SPI_SCK PA_5
nfathurr 34:029fc3b83f78 44 #define SENSE_SPI_CS PC_7
nfathurr 34:029fc3b83f78 45 //pin declarations
nfathurr 34:029fc3b83f78 46 #define SENSE_RST_PIN PB_10
nfathurr 34:029fc3b83f78 47 #define SENSE_ERROR_PIN PB_3
nfathurr 34:029fc3b83f78 48 #define SENSE_ALERT_PIN PB_5
nfathurr 34:029fc3b83f78 49 #define SENSE_DREADY_PIN PB_4
nfathurr 34:029fc3b83f78 50 #endif
nfathurr 34:029fc3b83f78 51
nfathurr 34:029fc3b83f78 52
nfathurr 34:029fc3b83f78 53 #ifdef PROSWIFT
nfathurr 34:029fc3b83f78 54 //spi frequency
nfathurr 34:029fc3b83f78 55 #define SENSE_SPI_FREQUENCY 2000000
nfathurr 34:029fc3b83f78 56 #define SENSE_SPI_MOSI SPI_MOSI
nfathurr 34:029fc3b83f78 57 #define SENSE_SPI_MISO SPI_MISO
nfathurr 34:029fc3b83f78 58 #define SENSE_SPI_SCK SPI_SCK
nfathurr 34:029fc3b83f78 59 #define SENSE_SPI_CS SPI_CS
nfathurr 34:029fc3b83f78 60 //pin declarations
nfathurr 34:029fc3b83f78 61 #define SENSE_RST_PIN PB_10
nfathurr 34:029fc3b83f78 62 #define SENSE_ERROR_PIN PB_3
nfathurr 34:029fc3b83f78 63 #define SENSE_ALERT_PIN PB_5
nfathurr 34:029fc3b83f78 64 #define SENSE_DREADY_PIN PB_4
nfathurr 34:029fc3b83f78 65 #endif
nfathurr 34:029fc3b83f78 66
nfathurr 34:029fc3b83f78 67 /*
nfathurr 34:029fc3b83f78 68 ******************************************************************************
nfathurr 34:029fc3b83f78 69 * Bluetooth Low Energy
nfathurr 34:029fc3b83f78 70 *-----------------------------------------------------------------------------
nfathurr 34:029fc3b83f78 71 */
nfathurr 34:029fc3b83f78 72
nfathurr 34:029fc3b83f78 73 #ifdef BL652
nfathurr 34:029fc3b83f78 74
nfathurr 34:029fc3b83f78 75 #ifdef MYSWIFT
nfathurr 34:029fc3b83f78 76 //pin declarations
nfathurr 34:029fc3b83f78 77 #define BLE_RST_PIN PA_8
nfathurr 34:029fc3b83f78 78 #define BLE_RTS_PIN PA_0
nfathurr 34:029fc3b83f78 79 #define BLE_CTS_PIN PB_2
nfathurr 34:029fc3b83f78 80 //uart pins and baudrate
nfathurr 34:029fc3b83f78 81 #define BLE_BAUD_RATE 115200
nfathurr 34:029fc3b83f78 82 #define BLE_SERIAL_TX PA_2
nfathurr 34:029fc3b83f78 83 #define BLE_SERIAL_RX PA_3
nfathurr 34:029fc3b83f78 84 //mode pins
nfathurr 34:029fc3b83f78 85 #define BLE_MODE_0_PIN PB_0
nfathurr 34:029fc3b83f78 86 #define BLE_MODE_1_PIN PA_1
nfathurr 34:029fc3b83f78 87 #endif
nfathurr 34:029fc3b83f78 88
nfathurr 34:029fc3b83f78 89 #ifdef PROSWIFT
nfathurr 34:029fc3b83f78 90 //pin declarations
nfathurr 34:029fc3b83f78 91 #define BLE_RST_PIN PA_0
nfathurr 34:029fc3b83f78 92 #define BLE_RTS_PIN PA_8
nfathurr 34:029fc3b83f78 93 #define BLE_CTS_PIN PA_10
nfathurr 34:029fc3b83f78 94 //uart pins and baudrate
nfathurr 34:029fc3b83f78 95 #define BLE_BAUD_RATE 115200
nfathurr 34:029fc3b83f78 96 #define BLE_SERIAL_TX PA_2
nfathurr 34:029fc3b83f78 97 #define BLE_SERIAL_RX PA_3
nfathurr 34:029fc3b83f78 98 //mode pins
nfathurr 34:029fc3b83f78 99 #define BLE_MODE_0_PIN PB_0
nfathurr 34:029fc3b83f78 100 #define BLE_MODE_1_PIN PA_4
nfathurr 34:029fc3b83f78 101 #endif
nfathurr 34:029fc3b83f78 102
nfathurr 34:029fc3b83f78 103 #endif
nfathurr 34:029fc3b83f78 104
nfathurr 34:029fc3b83f78 105
nfathurr 34:029fc3b83f78 106 /*
nfathurr 34:029fc3b83f78 107 ******************************************************************************
nfathurr 34:029fc3b83f78 108 * PC Serial
nfathurr 34:029fc3b83f78 109 *-----------------------------------------------------------------------------
nfathurr 34:029fc3b83f78 110 */
nfathurr 34:029fc3b83f78 111
nfathurr 34:029fc3b83f78 112 #ifdef MYSWIFT
nfathurr 34:029fc3b83f78 113 #define PC_UART_TX_PIN PA_9
nfathurr 34:029fc3b83f78 114 #define PC_UART_RX_PIN PA_10
nfathurr 34:029fc3b83f78 115 #define PC_UART_BAUDRATE 921600
nfathurr 34:029fc3b83f78 116 #endif
nfathurr 34:029fc3b83f78 117
nfathurr 34:029fc3b83f78 118
nfathurr 34:029fc3b83f78 119 #ifdef PROSWIFT
nfathurr 34:029fc3b83f78 120 #define PC_UART_TX_PIN PA_11
nfathurr 34:029fc3b83f78 121 #define PC_UART_RX_PIN PA_12
nfathurr 34:029fc3b83f78 122 #define PC_UART_BAUDRATE 115200
nfathurr 34:029fc3b83f78 123 #endif
nfathurr 34:029fc3b83f78 124
nfathurr 34:029fc3b83f78 125 /*
nfathurr 34:029fc3b83f78 126 ******************************************************************************
nfathurr 34:029fc3b83f78 127 * Battery
nfathurr 34:029fc3b83f78 128 *-----------------------------------------------------------------------------
nfathurr 34:029fc3b83f78 129 */
nfathurr 34:029fc3b83f78 130 #ifdef MYSWIFT
nfathurr 34:029fc3b83f78 131 //#define VCC 3.3
nfathurr 34:029fc3b83f78 132 //#define BATTERY_V_PIN PH_0
nfathurr 34:029fc3b83f78 133 #endif
nfathurr 34:029fc3b83f78 134
nfathurr 34:029fc3b83f78 135 /*
nfathurr 34:029fc3b83f78 136 ******************************************************************************
nfathurr 34:029fc3b83f78 137 * Status LED
nfathurr 34:029fc3b83f78 138 *-----------------------------------------------------------------------------
nfathurr 34:029fc3b83f78 139 */
nfathurr 34:029fc3b83f78 140
nfathurr 34:029fc3b83f78 141 #ifdef MYSWIFT
nfathurr 34:029fc3b83f78 142 #define STATUS_LED_PIN PC_8
nfathurr 34:029fc3b83f78 143 #endif
nfathurr 34:029fc3b83f78 144
nfathurr 34:029fc3b83f78 145 #ifdef PROSWIFT
nfathurr 34:029fc3b83f78 146 #define STATUS_LED_PIN LED1
nfathurr 34:029fc3b83f78 147 #endif
nfathurr 34:029fc3b83f78 148
nfathurr 34:029fc3b83f78 149 #endif
nfathurr 34:029fc3b83f78 150
nfathurr 34:029fc3b83f78 151 /*
nfathurr 34:029fc3b83f78 152 ******************************************************************************
nfathurr 34:029fc3b83f78 153 * VIRT_EEPROM
nfathurr 34:029fc3b83f78 154 *-----------------------------------------------------------------------------
nfathurr 34:029fc3b83f78 155 */
nfathurr 34:029fc3b83f78 156
nfathurr 34:029fc3b83f78 157 #undef VIRT_EEPROM