precision-converters-firmware
runner
work
precision-converters-firmware
precision-converters-firmware
projects
ad559xr_console
app
app_config.h
Go to the documentation of this file.
1
15
/******************************************************************************/
16
/***************************** Include Files **********************************/
17
/******************************************************************************/
18
#ifndef _APP_CONFIG_H_
19
#define _APP_CONFIG_H_
20
21
#include <stdint.h>
22
#include <PinNames.h>
23
24
/******************************************************************************/
25
/************************* Macros & Constant Definitions ***************************/
26
/******************************************************************************/
27
// Supported Devices
28
#define DEV_AD5592R 0
29
#define DEV_AD5593R 1
30
31
#define AD5593R_A0_STATE 0
32
33
// **** Note for User: ACTIVE_DEVICE selection ****
34
// Define the device type here from the list of below device type defines
35
// e.g. #define ACTIVE_DEVICE ID_AD5593R -> This will set AD5593R as an ACTIVE_DEVICE.
36
// The ACTIVE_DEVICE is default set to AD5592R, if device type is not defined.
37
38
#if !defined(ACTIVE_DEVICE)
39
#define ACTIVE_DEVICE DEV_AD5592R
40
#endif
41
51
//#define ARDUINO
52
53
#define NUM_CHANNELS 8
54
55
#define AD5593R_I2C (0x10 | (AD5593R_A0_STATE & 0x01))
56
57
// Pin mapping of with SDP-120 or Arduino connectors
58
#ifdef ARDUINO
59
#define I2C_SCL ARDUINO_UNO_D15
// I2C_SCL
60
#define I2C_SDA ARDUINO_UNO_D14
// I2C_SDA
61
62
#define SPI_CSB ARDUINO_UNO_D10
// SPI_CS
63
#define SPI_HOST_SDO ARDUINO_UNO_D11
// SPI_MOSI
64
#define SPI_HOST_SDI ARDUINO_UNO_D12
// SPI_MISO
65
#define SPI_SCK ARDUINO_UNO_D13
// SPI_SCK
66
67
#define GAIN_PIN ARDUINO_UNO_D8
68
#define RESET_PIN ARDUINO_UNO_D9
69
#define LDAC_PIN ARDUINO_UNO_D7
70
#define ADDR0_PIN ARDUINO_UNO_D6
71
#else
72
// SDP-120 connector
73
#define I2C_SCL SDP_I2C_SCL
// PH_7
74
#define I2C_SDA SDP_I2C_SDA
// PC_9
75
76
#define SPI_CSB SDP_SPI_CS_A
// PB_9
77
#define SPI_HOST_SDI SDP_SPI_MISO
// PF_8
78
#define SPI_HOST_SDO SDP_SPI_MOSI
// PF_9
79
#define SPI_SCK SDP_SPI_SCK
// PH_6
80
#endif
81
82
#endif
//_APP_CONFIG_H_
Generated by
1.9.1