| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- /**
- * @file HW_UART_ATY.h
- *
- * @param Project DEVICE_GENERAL_ATY_LIB
- *
- * @author ATY
- *
- * @copyright
- * - Copyright 2017 - 2023 MZ-ATY
- * - This code follows:
- * - MZ-ATY Various Contents Joint Statement -
- * <a href="https://mengze.top/MZ-ATY_VCJS">
- * https://mengze.top/MZ-ATY_VCJS</a>
- * - CC 4.0 BY-NC-SA -
- * <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/">
- * https://creativecommons.org/licenses/by-nc-sa/4.0/</a>
- * - Your use will be deemed to have accepted the terms of this statement.
- *
- * @brief Familiar functions of uart for STC51
- *
- * @version
- * - 1_01_221231 > ATY
- * -# Preliminary version, first Release
- ********************************************************************************
- */
- #ifndef __HW_UART_ATY_H
- #define __HW_UART_ATY_H
- #include "INCLUDE_ATY.h"
- #include "stdio.h"
- // #include "stdlib.h"
- // #include "string.h"
- /******************************* For user *************************************/
- /******************************************************************************/
- #define UART_RX_MAX_LEN (9 + (15 * 4))
- #define PRINTF_RX_MAX_LEN 64
- // #define UART_RX_MAX_LEN 16
- typedef struct _uartMsgStruct{
- uint8_t rx[UART_RX_MAX_LEN];
- uint8_t tx;
- uint8_t rxCount;
- uint8_t txCount;
- uint8_t busyFlag;
- uint32_t overCount;
- uint8_t rcvOverFlag;
- } uartMsgStruct;
- extern struct _uartMsgStruct uartMsgStruct_t;
- void UartInit(void);
- void UartSendByte(uint8_t byte);
- void UartSendBytes(uint8_t* bytes, uint16_t len);
- void UartSendStr(uint8_t* buf);
- void UartSendFloat(float dataFloat);
- void UartSendFloatStr(float dataFloat);
- void UartReceiveProcess(void);
- void UartReceiveProcess_User(struct _uartMsgStruct* ptr);
- #endif /* __HW_UART_ATY_H */
- /******************************** End Of File *********************************/
|