From d947018ecc12c84a6b34116cdca6f775590bae0b Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Mon, 16 Apr 2018 09:53:07 +0300 Subject: Move datadef.h to the main folder --- Software/Embedded_SW/Embedded/DataDef.h | 124 ++++++++++++++++++++++++++++++++ 1 file changed, 124 insertions(+) create mode 100644 Software/Embedded_SW/Embedded/DataDef.h (limited to 'Software/Embedded_SW/Embedded/DataDef.h') diff --git a/Software/Embedded_SW/Embedded/DataDef.h b/Software/Embedded_SW/Embedded/DataDef.h new file mode 100644 index 000000000..4f0582e50 --- /dev/null +++ b/Software/Embedded_SW/Embedded/DataDef.h @@ -0,0 +1,124 @@ +#ifndef DATADEF_H +#define DATADEF_H + +#define EVALUATION_BOARD // to use the LCD only when using the evaluation board +#define USE_HIGH_SPEED_GPIO // to use AHB GPIO (A..J) ports A-J APB or AHB, ports K-Q on AHB only + +#define ON 1 +#define OFF 0 + +enum +{ + PASSED = 0, + FAILED = 1, + NOT_SUPPORTED = 254, + VERIFIED = 255 +}; + + +#define OK 0 +#define ERROR 1 + +#define ENABLE 0 +#define DISABLE 1 + +#define NEW 0 +#define USED 1 + +#define START 0 +#define STOP 1 +#define NOSTOP 2 +#define CONTINUE 2 + +#define NOTBUSY 0 +#define BUSY 1 +// +// motor direction +#define CW 0 // clockwise +#define CCW 1 // counter clockwise + +#define TRUE 1 +#define FALSE 0 + +#define INPUT 0x0 +#define OUTPUT 0x1 + +#define PULLDOWN 0 +#define PULLUP 1 + +#define TX 0 +#define RX 1 +#define TXRX 2 +#define ODD 0 +#define EVEN 1 + +#define READY 0 +#define NOTREADY 1 +#define WAIT 2 + +#define LOW 0x0 +#define HIGH 0x1 + +#define WR 0 +#define RD 1 + +#define FLAGSTART 1 +#define FLAGSET 1 +#define FLAGCLEAR 0 + +#define IN 2 +#define OUT 3 + +#define INIT 1 +#define SKIP_INIT 0 + +#define byte uint8_t//char +#define boolean bool + +#define SERIAL 0x0 +#define DISPLAY 0x1 + +#define LSBFIRST 0 +#define MSBFIRST 1 + +#define CHANGE 1 +#define FALLING 2 +#define RISING 3 + +//SPI +typedef struct //S_SPI +{ + unsigned char MotID; + unsigned int TX_MOSI; //32bit (Master Output Slave Input ) + unsigned int RX_MISO; //24bit (Master Input Slave Output) + //unsigned int BUSY; //32bit + +}SPI;//SPI + +//--------------------------------------------------------------------- +#pragma diag_suppress 169 /* Avoid warnings on VOID * conversions (protobuf issue) +The warning: +#169-D argument of type "size_t (*)(const CalculateResponse *, uint8_t *)" is incompatible with parameter of type "size_t (*)(void *, uint8_t *)" Calculate.c /twine_usblib_demo/PMR/Stubs line 53 C/C++ Problem + + +//#pragma diag_suppress 190 // Avoid the warning - #190-D enumerated type mixed with another type protobuf-c.c + * +or in the environment add command line: + +Project -> properties -> +Press on show advanced settings +CCS Build -> +Advanced Options -> +Diagnistic Options -> +Add the warning number in +Supports diagnostic (--diag_suppress, - pds) +169 +190 +*/ + +//Project Properties->Build->Compiler->Include Options +//There may be paths there relative to a build variable, rather than hard-coded paths, that may be triggering the error. + + + +#endif /* DATADEF_H */ -- cgit v1.3.1 From 26871cba2047dfc7afa6922a34e4f6b7bc9d4932 Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Mon, 16 Apr 2018 10:07:07 +0300 Subject: fix datadeh.h to latest version --- Software/Embedded_SW/Embedded/DataDef.h | 1 + 1 file changed, 1 insertion(+) (limited to 'Software/Embedded_SW/Embedded/DataDef.h') diff --git a/Software/Embedded_SW/Embedded/DataDef.h b/Software/Embedded_SW/Embedded/DataDef.h index 4f0582e50..619d8f843 100644 --- a/Software/Embedded_SW/Embedded/DataDef.h +++ b/Software/Embedded_SW/Embedded/DataDef.h @@ -92,6 +92,7 @@ typedef struct //S_SPI unsigned int TX_MOSI; //32bit (Master Output Slave Input ) unsigned int RX_MISO; //24bit (Master Input Slave Output) //unsigned int BUSY; //32bit + unsigned char AMT_OF_Words:3; //The amount of spi words (usually byte sized) per transmission (send 4 to 32bit) }SPI;//SPI -- cgit v1.3.1