| | |
| | | #ifndef _WIRELESS_REMOTE_COMM_H_ |
| | | #define _WIRELESS_REMOTE_COMM_H_ |
| | | #include "define_all.h" |
| | | #include "system_general_para.h" |
| | | |
| | | // Ô¶´«µçÔ´ |
| | | #define WRC_PWR_PORT GPIOA |
| | | #define WRC_PWR_PIN GPIO_Pin_7 |
| | | |
| | | #define WRC_PWR_PORT GPIOE |
| | | #define WRC_PWR_PIN GPIO_Pin_6 |
| | | |
| | | #define WRC_PWR_ON GPIO_SetBits(WRC_PWR_PORT, WRC_PWR_PIN) |
| | | #define WRC_PWR_OFF GPIO_ResetBits(WRC_PWR_PORT, WRC_PWR_PIN) |
| | | |
| | | #define WRC_SEND_NORMAL(__DATA__,__SIZE__) UARTx_SendData_Normal(UART1,__DATA__,__SIZE__) |
| | | //3V8¿ª¹Ø |
| | | #define PWR_3V8_O_PORT GPIOE |
| | | #define PWR_3V8_O_PIN GPIO_Pin_7 |
| | | |
| | | #define PWR_3V8_ON GPIO_SetBits(PWR_3V8_O_PORT, PWR_3V8_O_PIN) |
| | | #define PWR_3V8_OFF GPIO_ResetBits(PWR_3V8_O_PORT, PWR_3V8_O_PIN) |
| | | |
| | | |
| | | #define WRC_SEND_NORMAL(__DATA__,__SIZE__) do{UARTx_SendData_Normal(UART1,__DATA__,__SIZE__);delay_us(10);WRC_RX_DMA_CH0_reload();}while(0) |
| | | |
| | | |
| | | typedef enum |
| | |
| | | WRC_MEANS_NONE = 0U, // ĬÈÏÖµ |
| | | WRC_MEANS_RTC_TIMING, // ¶¨Ê±Æô¶¯ |
| | | WRC_MEANS_KEY, // °´¼ü |
| | | WRC_MEANS_ALARM, // ±¨¾¯ |
| | | WRC_MEANS_ALARM, // ±¨¾¯¡¢Ê¼þ |
| | | WRC_MEANS_POWER, // ¿ª»ú/¸´Î» |
| | | WRC_MEANS_RTC_INTERVAL, // ÖÜÆÚ |
| | | WRC_MEANS_AGAIN, // ÔÙ´Î |
| | |
| | | |
| | | typedef enum |
| | | { |
| | | LINK_NONE = 0U, // ĬÈÏÖµ |
| | | LINK_OK, |
| | | LINK_ERR, |
| | | } LINK_STATUS; // Á¬½ÓÀàÐÍ |
| | | |
| | | |
| | | typedef enum |
| | | { |
| | | WRC_TIME_START_NONE = 0U, // ĬÈÏÖµ |
| | | WRC_TIME_START_INTERVAL, //¼ä¸ô |
| | | WRC_TIME_START_TIMING, //¶¨Ê± |
| | | WRC_TIME_START_TIMING_TIMING, //¼ä¸ôºÍ¶¨Ê±Í¬Ê±ÉúЧ |
| | | } WRC_TIME_START_TYPE; // ʱ¼äÆô¶¯·½Ê½ |
| | | |
| | | |
| | | #pragma pack(1) |
| | | |
| | | typedef struct |
| | | { |
| | | WRC_START_MEANS wrc_start_flag; |
| | | __IO WRC_STATUS wrc_state; |
| | | WRC_START_MEANS wrc_start_flag; |
| | | __IO LINK_STATUS link_status; |
| | | |
| | | } WRC_CTRL_PARA_T; |
| | | |
| | | |
| | | #define WRC_REC_BUF_LENGTH 256 |
| | | typedef struct{ |
| | | |
| | | uint8_t recv_buf[WRC_REC_BUF_LENGTH]; |
| | | uint16_t recv_length; |
| | | FlagStatus recv_flag; |
| | | }WRC_UART_PARA_T; |
| | | |
| | | |
| | | |
| | | typedef struct{ |
| | | uint8_t net_signal_intensity; //ÍøÂçÐźÅÇ¿¶È |
| | | uint8_t SIM_Type; //SIM¿¨ÀàÐÍ |
| | | char IMEI[15]; |
| | | char ICCID[20]; |
| | | int SNR; |
| | | }LINK_INFO_T; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | #pragma pack() |
| | | |
| | | |
| | | |
| | |
| | | |
| | | |
| | | extern WRC_CTRL_PARA_T wrc_ctrl_para_g; |
| | | extern WRC_UART_PARA_T wrc_uart_para_g; |
| | | extern LINK_INFO_T link_info_g; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | void WirelessRemoteCommPro(FUN_START_CTRL_PARA_T * sys_fun_run_ctrl_p); |
| | | |
| | | |
| | | |
| | |
| | | |
| | | |
| | | |
| | | void WirelessRemoteCommPro(void); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | #endif |
| | | #endif |