Miguel Angel Caycho
/
Pruebas_Ventilador_Eplimin_01_Backup
para el ventilador
Diff: project_defines.h
- Revision:
- 7:f4e248182d31
- Parent:
- 6:d38287621cca
- Child:
- 8:208d965a3bd2
--- a/project_defines.h Mon Apr 20 11:39:30 2020 +0000 +++ b/project_defines.h Mon Apr 20 21:58:36 2020 +0000 @@ -16,8 +16,15 @@ #define ENCODER_B_SIGNAL PA_14 //Nextion display -#define NEXTION_TX_PIN PC_10 -#define NEXTION_RX_PIN PC_11 +#define NEXTION_DISPLAY_TX_PIN PC_10 +#define NEXTION_DISPLAY_RX_PIN PC_11 + +// Pressure sensors +#define PRESSURE_SENSOR_01_SDA_PIN PB_9 +#define PRESSURE_SENSOR_01_SCL_PIN PB_8 + +#define PRESSURE_SENSOR_02_SDA_PIN PB_10 +#define PRESSURE_SENSOR_02_SCL_PIN PB_11 //Stepper motor #define STEPPER_PULSE_PIN PC_8 @@ -47,6 +54,18 @@ #define I_E_RATIO_INDEX_DEFAULT 0 /* Defines for the Nextion user interface */ + +#define NEXTION_DISPLAY_BAUD_RATE 9600 + +#define BLACK 0 +#define BLUE 31 +#define BROWN 48192 +#define GREEN 2016 +#define YELLOW 65504 +#define RED 63488 +#define GRAY 33840 +#define WHITE 65535 + #define NORMAL_COLOR BLACK #define SELECT_COLOR BLUE #define ADJUST_COLOR GREEN @@ -79,12 +98,17 @@ #define MAIN_SCREEN_DEFAULT_STATE Main_Screen_Cursor_Disable -/* Defines for the pressure sensor */ -#define PRESSURE_SENSOR_SLAVE_ADDRES 0x28 +/* Defines for the pressure sensors */ +#define PRESSURE_SENSOR_I2C_CLK_HZ 200000 +#define PRESSURE_SENSOR_01_SLAVE_ADDRESS 0x28 +#define PRESSURE_SENSOR_02_SLAVE_ADDRESS 0x28 +#define PRESSURE_SENSOR_01_SWA (PRESSURE_SENSOR_01_SLAVE_ADDRESS << 1) +#define PRESSURE_SENSOR_02_SWA (PRESSURE_SENSOR_02_SLAVE_ADDRESS << 1) +#define PRESSURE_SENSOR_01_SRA (PRESSURE_SENSOR_01_SWA | 1) +#define PRESSURE_SENSOR_02_SRA (PRESSURE_SENSOR_02_SWA | 1) +#define PRESSURE_DISPLAY_THRESHOLD 0.01f /* Defines for the stepper motor control */ - - #define TO_HOME 0 #define TO_AIRBAG 1 #define STEPPER_ENABLED 0