42 lines
983 B
C
42 lines
983 B
C
|
|
#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<31><35><EFBFBD>Ƶ<EFBFBD>ԴIO
|
|||
|
|
#define POWER_STA HAL_GPIO_ReadPin(CAT_RUN_GPIO_Port, CAT_RUN_Pin) //<2F><>ȡ<EFBFBD><C8A1>ƽ״̬,<2C><><EFBFBD><EFBFBD><EFBFBD>жϿ<D0B6><CFBF>ػ<EFBFBD>״̬
|
|||
|
|
//#define NET_STA HAL_GPIO_ReadPin(CAT_NET_GPIO_Port, CAT_NET_Pin) //<2F><>ȡ<EFBFBD><C8A1>ƽ״̬,<2C><><EFBFBD><EFBFBD><EFBFBD>ж<EFBFBD>ע<EFBFBD><D7A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬
|
|||
|
|
|
|||
|
|
#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__*/
|
|||
|
|
|
|||
|
|
|