Fixed the issue with pin name mapping in app_config.h file.
Dependencies: platform_drivers adi_console_menu AD7124_no_OS
Revision 5:ca3854efb1e9, committed 2020-03-04
- Comitter:
- mahphalke
- Date:
- Wed Mar 04 10:55:20 2020 +0000
- Parent:
- 4:52464a9e1cf7
- Commit message:
- Fixed the issue with pin name mapping in app_config.h file.
Changed in this revision
app/ad7124_console_app.c | Show annotated file Show diff for this revision Revisions of this file |
app/app_config.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/app/ad7124_console_app.c Tue Mar 03 11:55:34 2020 +0000 +++ b/app/ad7124_console_app.c Wed Mar 04 10:55:20 2020 +0000 @@ -21,6 +21,8 @@ #include <string.h> #include <stdbool.h> +#include "app_config.h" + #include "platform_support.h" #include "platform_drivers.h" #include "spi_extra.h" @@ -31,7 +33,6 @@ #include "ad7124_regs_configs.h" #include "ad7124_console_app.h" -#include "app_config.h" /* defines */
--- a/app/app_config.h Tue Mar 03 11:55:34 2020 +0000 +++ b/app/app_config.h Wed Mar 04 10:55:20 2020 +0000 @@ -15,6 +15,7 @@ #define _APP_CONFIG_H_ #include <stdint.h> +#include <PinNames.h> //#define ARDUINO @@ -28,27 +29,26 @@ // Pin mapping of AD7124 with SDP-K1/Arduino (reference: PinNames.h) #ifdef ARDUINO -#define I2C_SCL 0x17 // I2C_SCL (D14) -#define I2C_SDA 0x18 // I2C_SDA (D15) +#define I2C_SCL D15 // I2C_SCL +#define I2C_SDA D14 // I2C_SDA -#define SPI_SS 0x0F // SPI_CS (D10) -#define SPI_MISO 0x07 // SPI_MOSI (D11) -#define SPI_MOSI 0x14 // SPI_MISO (D12) -#define SPI_SCK 0x13 // SPI_SCK (D13) +#define SPI_SS D10 // SPI_CS +#define SPI_MISO D11 // SPI_MOSI +#define SPI_MOSI D12 // SPI_MISO +#define SPI_SCK D13 // SPI_SCK #else -#define I2C_SCL 0x77 // SDP_I2C_SCL (PH_7) -#define I2C_SDA 0x29 // SDP_I2C_SDA (PC_9) +#define I2C_SCL SDP_I2C_SCL // PH_7 +#define I2C_SDA SDP_I2C_SDA // PC_9 -#define SPI_SS_A 0x19 // SDP_SPI_CS_A (PB_9) -#define SPI_SS_B 0x26 // SDP_SPI_CS_B (PC_6) -#define SPI_SS_C 0x27 // SDP_SPI_CS_C (PC_7) -#define SPI_MISO 0x58 // SDP_SPI_MOSI (PF_9) -#define SPI_MOSI 0x59 // SDP_SPI_MISO (PF_8) -#define SPI_SCK 0x76 // SDP_SPI_SCK (PH_6) +#define SPI_SS_A SDP_SPI_CS_A // PB_9 +#define SPI_SS_B SDP_SPI_CS_B // PC_6 +#define SPI_SS_C SDP_SPI_CS_C // PC_7 +#define SPI_MISO SDP_SPI_MISO // PF_8 +#define SPI_MOSI SDP_SPI_MOSI // PF_9 +#define SPI_SCK SDP_SPI_SCK // PH_6 #endif // Common pin mappings -#define LED_GREEN 0xA5 // LED3 (PK_5) - +#define LED_GREEN LED3 // PK_5 #endif //_APP_CONFIG_H_