96 lines
2.7 KiB
C
96 lines
2.7 KiB
C
/**
|
|
* @file ate0005.h
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "nvs_flash.h"
|
|
#include "esp_wifi.h"
|
|
#include "esp_timer.h"
|
|
#include "zh_160x_i2c.h"
|
|
#include "zh_encoder.h"
|
|
#include "zh_inclinometer.h"
|
|
#include "zh_tachometer.h"
|
|
#include "zh_ota_server.h"
|
|
#include "zh_espnow.h"
|
|
#include "zh_syslog.h"
|
|
|
|
#define STATS_TASK_PRIORITY tskIDLE_PRIORITY
|
|
#define STATS_TASK_STACK_SIZE configMINIMAL_STACK_SIZE + 1280
|
|
#define A_INCLINOMETER_TASK_PRIORITY tskIDLE_PRIORITY + 5
|
|
#define A_INCLINOMETER_TASK_STACK_SIZE configMINIMAL_STACK_SIZE + 512
|
|
#define B_INCLINOMETER_TASK_PRIORITY tskIDLE_PRIORITY + 5
|
|
#define B_INCLINOMETER_TASK_STACK_SIZE configMINIMAL_STACK_SIZE + 512
|
|
#define A_TACHOMETER_TASK_PRIORITY tskIDLE_PRIORITY + 5
|
|
#define A_TACHOMETER_TASK_STACK_SIZE configMINIMAL_STACK_SIZE + 512
|
|
#define B_TACHOMETER_TASK_PRIORITY tskIDLE_PRIORITY + 5
|
|
#define B_TACHOMETER_TASK_STACK_SIZE configMINIMAL_STACK_SIZE + 512
|
|
#define ENCODER_TASK_PRIORITY tskIDLE_PRIORITY + 4
|
|
#define ENCODER_TASK_STACK_SIZE configMINIMAL_STACK_SIZE
|
|
#define EXPANDER_TASK_PRIORITY tskIDLE_PRIORITY + 4
|
|
#define EXPANDER_TASK_STACK_SIZE configMINIMAL_STACK_SIZE
|
|
|
|
#define TRIAC_ON true
|
|
#define TRIAC_OFF false
|
|
|
|
#define ENCODER_BUTTON_RELEASED true
|
|
#define ENCODER_BUTTON_PRESSED false
|
|
|
|
#define LED_OFF ZH_PCF8574_GPIO_LOW
|
|
#define LED_ON ZH_PCF8574_GPIO_HIGH
|
|
|
|
#define RELAY_OFF ZH_PCF8574_GPIO_LOW
|
|
#define RELAY_ON ZH_PCF8574_GPIO_HIGH
|
|
|
|
#define MODE_ANGLE_ANGLE 0
|
|
#define MAIN_MENU_ANGLE_ANGLE_NAME "ANGLE/ANGLE"
|
|
#define MODE_TACHO_TACHO 1
|
|
#define MAIN_MENU_TACHO_TACHO_NAME "TACHO/TACHO"
|
|
#define MODE_ANGLE_TACHO 2
|
|
#define MAIN_MENU_ANGLE_TACHO_NAME "ANGLE/TACHO"
|
|
#define MODE_REMOTE 3
|
|
#define MAIN_MENU_REMOTE_NAME "REMOTE"
|
|
|
|
#define WIFI_AP_SSID "ATE0005"
|
|
#define WIFI_AP_PASS "repairlab"
|
|
#define WIFI_AP_CHANNEL 1
|
|
#define MAX_AP_CONNECTION 4
|
|
|
|
#define WIFI_STA_SSID "rick_professor"
|
|
#define WIFI_STA_PASS "repairlab"
|
|
#define WIFI_STA_MAXIMUM_RETRY 10
|
|
|
|
#define SYSLOG_IP "77.51.201.8"
|
|
|
|
#define I2C_SCL_GPIO GPIO_NUM_22
|
|
#define I2C_SDA_GPIO GPIO_NUM_21
|
|
|
|
#define LCD_I2C_ADDRESS 0x20 /*!< U2. */
|
|
|
|
#define MODE_ENCODER_NUMBER 0x01 /*!< Connector EN1. */
|
|
#define MODE_ENCODER_A_GPIO GPIO_NUM_27
|
|
#define MODE_ENCODER_B_GPIO GPIO_NUM_26
|
|
#define MODE_ENCODER_S_GPIO GPIO_NUM_25
|
|
|
|
#define A_OPTICAL_DEVICE_A_GPIO GPIO_NUM_14 /*!< Connector EN2. */
|
|
#define A_OPTICAL_DEVICE_B_GPIO GPIO_NUM_13
|
|
|
|
#define B_OPTICAL_DEVICE_A_GPIO GPIO_NUM_18 /*!< Connector EN3. */
|
|
#define B_OPTICAL_DEVICE_B_GPIO GPIO_NUM_19
|
|
|
|
#ifdef __cplusplus
|
|
extern "C"
|
|
{
|
|
#endif
|
|
|
|
typedef struct
|
|
{
|
|
uint32_t a_inclinometer_task_min_stack_size;
|
|
uint32_t b_inclinometer_task_min_stack_size;
|
|
uint32_t a_tachometer_task_min_stack_size;
|
|
uint32_t b_tachometer_task_min_stack_size;
|
|
} task_stats_t;
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif |