#ifndef __CAT_H__ #define __CAT_H__ #include "main.h" #define CAT_POW_Pin GPIO_PIN_9 #define CAT_POW_GPIO_Port GPIOC //#define CAT_RST_Pin GPIO_PIN_9 //#define CAT_RST_GPIO_Port GPIOC #define CAT_RUN_Pin GPIO_PIN_8 #define CAT_RUN_GPIO_Port GPIOC //#define CAT_NET_Pin GPIO_PIN_7 //#define CAT_NET_GPIO_Port GPIOA /**USART2 GPIO Configuration PA2 ------> USART2_TX PA3 ------> USART2_RX */ #define POWER_KEY(x) HAL_GPIO_WritePin(CAT_POW_GPIO_Port, CAT_POW_Pin, (GPIO_PinState)x) //PA15控制电源IO #define POWER_STA HAL_GPIO_ReadPin(CAT_RUN_GPIO_Port, CAT_RUN_Pin) //读取电平状态,可以判断开关机状态 //#define NET_STA HAL_GPIO_ReadPin(CAT_NET_GPIO_Port, CAT_NET_Pin) //读取电平状态,可以判断注册网络状态 #define CAT1_printf u2_printf void catInit(void); void catConnectServer(void); uint8_t catSendCmd(char *, char *, uint8_t , uint8_t ); void activeEvents(void); #endif /*__DMA_H__*/