#ifndef _BEIDOU_HTY_DRV_H_ #define _BEIDOU_HTY_DRV_H_ #include #include #define MCU_DRV_BEIDOU_HTY_UART_ID MCU_BSP_UART1_ID #define MCU_DRV_BEIDOU_HTY_UART_BAUDRATE 115200 // 波特率 #define MCU_DRV_BEIDOU_HTY_UART_WORDLEN UART_WORDLENGTH_8B // 8位字长 #define MCU_DRV_BEIDOU_HTY_UART_STOPBITS UART_STOPBITS_1 // 1位停止位 #define MCU_DRV_BEIDOU_HTY_UART_PARITY UART_PARITY_NONE // 无奇偶校验位 #define MCU_DRV_BEIDOU_HTY_UART_MODE UART_MODE_TX_RX // 读写模式 #define MCU_DRV_BEIDOU_HTY_CTRL_POWER_GPIO_PIN GPIO_PIN_8 #define MCU_DRV_BEIDOU_HTY_CTRL_POWER_GPIO_PORT GPIOE #define MCU_DRV_BEIDOU_HTY_CTRL_POWER_GPIO_MODE GPIO_MODE_OUTPUT_PP #define MCU_DRV_BEIDOU_HTY_CTRL_POWER_GPIO_PULL GPIO_PULLDOWN #define MCU_DRV_BEIDOU_HTY_CTRL_POWER_GPIO_SPEED GPIO_SPEED_FREQ_HIGH int McuDrvBeiDouHtyInit(void); /* 打开电源 */ void McuDrvBeiDouHtyOpenPower(void); /* 关闭电源 */ void McuDrvBeiDouHtyClosePower(void); /* 接收机配置函数 */ int McuDrvBeiDouHtyConfOpposite(char *buf, int buflen); /* 北斗发送打包 */ int McuDrvBeiDouHtySendPacket(uint8_t *Buf, uint16_t BufLen); /* 设置重发次数 */ int McuDrvBeiDouHtySetRetryCount(uint8_t Count); #endif