整理干净的基本

This commit is contained in:
RB 2025-04-28 23:19:00 +08:00
parent c02866d135
commit 58bea2f20a
7 changed files with 30 additions and 69 deletions

View File

@ -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,
)

View File

@ -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,

View File

@ -6,8 +6,6 @@ extern "C" {
#include <stdbool.h>
#include "user_math.h"
#define CRC16_INIT 0XFFFF
uint16_t CRC16_Calc(const uint8_t *buf, size_t len, uint16_t crc);

View File

@ -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,

View File

@ -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) {

View File

@ -13,38 +13,38 @@ extern "C"
#include <stdbool.h>
#include <stdint.h>
/* Exported constants ------------------------------------------------------- */
/* Exported macro ----------------------------------------------------------- */
/* Exported types ----------------------------------------------------------- */
/* Exported constants ------------------------------------------------------- */
/* Exported macro ----------------------------------------------------------- */
/* Exported types ----------------------------------------------------------- */
typedef struct
{
typedef struct
{
uint8_t head;
uint8_t data;
uint8_t crc;
} UART_RxData_t;
} UART_RxData_t;
typedef struct
{
typedef struct
{
uint8_t head;
uint8_t data;
uint8_t crc;
} UART_TxData_t;
} UART_TxData_t;
typedef struct
{
typedef struct
{
UART_RxData_t rx_data; // Received data buffer
UART_TxData_t tx_data; // Transmit data buffer
} UART_t;
} 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