diff --git a/MRobot.spec b/MRobot.spec deleted file mode 100644 index fe59881..0000000 --- a/MRobot.spec +++ /dev/null @@ -1,38 +0,0 @@ -# -*- mode: python ; coding: utf-8 -*- - - -a = Analysis( - ['MRobot.py'], - pathex=[], - binaries=[], - datas=[], - hiddenimports=[], - hookspath=[], - hooksconfig={}, - runtime_hooks=[], - excludes=[], - noarchive=False, - optimize=0, -) -pyz = PYZ(a.pure) - -exe = EXE( - pyz, - a.scripts, - a.binaries, - a.datas, - [], - name='MRobot', - debug=False, - bootloader_ignore_signals=False, - strip=False, - upx=True, - upx_exclude=[], - runtime_tmpdir=None, - console=False, - disable_windowed_traceback=False, - argv_emulation=False, - target_arch=None, - codesign_identity=None, - entitlements_file=None, -) diff --git a/User/component/crc16.c b/User/component/crc16_rm.c similarity index 99% rename from User/component/crc16.c rename to User/component/crc16_rm.c index 2d9de2a..cacdad1 100644 --- a/User/component/crc16.c +++ b/User/component/crc16_rm.c @@ -1,4 +1,4 @@ -#include "crc16.h" +#include "crc16_rm.h" static const uint16_t crc16_tab[256] = { 0x0000, 0x1189, 0x2312, 0x329b, 0x4624, 0x57ad, 0x6536, 0x74bf, 0x8c48, diff --git a/User/component/crc16.h b/User/component/crc16_rm.h similarity index 91% rename from User/component/crc16.h rename to User/component/crc16_rm.h index dc54b30..9f349ec 100644 --- a/User/component/crc16.h +++ b/User/component/crc16_rm.h @@ -6,8 +6,6 @@ extern "C" { #include -#include "user_math.h" - #define CRC16_INIT 0XFFFF uint16_t CRC16_Calc(const uint8_t *buf, size_t len, uint16_t crc); diff --git a/User/component/crc8.c b/User/component/crc8_rm.c similarity index 98% rename from User/component/crc8.c rename to User/component/crc8_rm.c index 3dad677..3b27aec 100644 --- a/User/component/crc8.c +++ b/User/component/crc8_rm.c @@ -2,7 +2,7 @@ 参考了Linux */ -#include "crc8.h" +#include "crc8_rm.h" static const uint8_t crc8_tab[256] = { 0x00, 0x5e, 0xbc, 0xe2, 0x61, 0x3f, 0xdd, 0x83, 0xc2, 0x9c, 0x7e, 0x20, diff --git a/User/component/crc8.h b/User/component/crc8_rm.h similarity index 100% rename from User/component/crc8.h rename to User/component/crc8_rm.h diff --git a/User/device/oled_i2c.c b/User/device/oled_i2c.c index 8021c22..e89dc4e 100644 --- a/User/device/oled_i2c.c +++ b/User/device/oled_i2c.c @@ -142,6 +142,7 @@ static const uint8_t oled_font[95][8] = { {0x00,0x08,0x04,0x04,0x08,0x10,0x10,0x08,}, /* "~", 94 */ }; + /* Exported functions ------------------------------------------------------- */ void OLED_Init(void) { diff --git a/User/device/pc_uart.h b/User/device/pc_uart.h index bfa6c18..683eed4 100644 --- a/User/device/pc_uart.h +++ b/User/device/pc_uart.h @@ -13,38 +13,38 @@ extern "C" #include #include - /* Exported constants ------------------------------------------------------- */ - /* Exported macro ----------------------------------------------------------- */ - /* Exported types ----------------------------------------------------------- */ +/* Exported constants ------------------------------------------------------- */ +/* Exported macro ----------------------------------------------------------- */ +/* Exported types ----------------------------------------------------------- */ - typedef struct - { - uint8_t head; - uint8_t data; - uint8_t crc; - } UART_RxData_t; +typedef struct +{ + uint8_t head; + uint8_t data; + uint8_t crc; +} UART_RxData_t; - typedef struct - { - uint8_t head; - uint8_t data; - uint8_t crc; - } UART_TxData_t; +typedef struct +{ + uint8_t head; + uint8_t data; + uint8_t crc; +} UART_TxData_t; - typedef struct - { - UART_RxData_t rx_data; // Received data buffer - UART_TxData_t tx_data; // Transmit data buffer - } UART_t; +typedef struct +{ + UART_RxData_t rx_data; // Received data buffer + UART_TxData_t tx_data; // Transmit data buffer +} UART_t; - /* Exported functions prototypes -------------------------------------------- */ +/* Exported functions prototypes -------------------------------------------- */ - int UART_Init(UART_t *huart); - int UART_StartReceive(UART_t *huart); - bool UART_IsReceiveComplete(void); - int8_t UART_ParseData(UART_t *huart); - void UART_PackTx(UART_t *huart, UART_TxData_t *tx_data); - int8_t UART_StartSend(UART_t *huart); +int UART_Init(UART_t *huart); +int UART_StartReceive(UART_t *huart); +bool UART_IsReceiveComplete(void); +int8_t UART_ParseData(UART_t *huart); +void UART_PackTx(UART_t *huart, UART_TxData_t *tx_data); +int8_t UART_StartSend(UART_t *huart); #ifdef __cplusplus } #endif