#include "g_variable.h"

struct vcu_vstate1_st g_vcu_vstate1;
struct vcu_vstate4_st g_vcu_vstate4;
struct vcu_vstate8_st g_vcu_vstate8;
struct eps_state g_eps_state;
struct driving_state g_driving_state;

struct ecu_eps_st g_ecu_eps_cmd;
struct ecu_speed_st g_ecu_speed_cmd;
struct ecu_control_st g_ecu_control_cmd;
struct gate_control_st2 g_ecu_control2_cmd;

SYSTIMER t1;
SYSTIMER t2;
SYSTIMER t3;

pthread_mutex_t Mutex_CAN_S1_DATA = PTHREAD_MUTEX_INITIALIZER;
pthread_mutex_t Mutex_CAN_S4_DATA = PTHREAD_MUTEX_INITIALIZER;
pthread_mutex_t Mutex_CAN_S8_DATA = PTHREAD_MUTEX_INITIALIZER;
pthread_mutex_t Mutex_CAN_DRV_DATA = PTHREAD_MUTEX_INITIALIZER;
pthread_mutex_t Mutex_CAN_EPS_DATA = PTHREAD_MUTEX_INITIALIZER;

pthread_mutex_t Mutex_EPS_DATA = PTHREAD_MUTEX_INITIALIZER;
pthread_mutex_t Mutex_SPEED_DATA = PTHREAD_MUTEX_INITIALIZER;
pthread_mutex_t Mutex_CONTROL_DATA = PTHREAD_MUTEX_INITIALIZER;

can_frame read_frame;
can_frame write_frame;

int Output = 0;
int OutputSpeed = 10;

int print_st_1 = 0;
int print_st_4 = 0;
int print_st_8 = 0;
int print_st_eps = 0;
int print_st_drive = 0;