This commit is contained in:
起床就犯困 2024-07-15 17:22:55 +08:00
parent 9e112a4749
commit 0bf09ca66a
29 changed files with 5366 additions and 4993 deletions

View File

@ -7,11 +7,11 @@ Toolchain=RISC-V
Series=CH32V30X
Description=
PeripheralVersion=1.4
Target Path=obj\CH32V303.hex
Target Path=obj\CH32V303_V0.1.hex
CLKSpeed=1
RTOS=RT-Thread
Vendor=WCH
MCU=CH32V303VCT6
Mcu Type=CH32V30x
Link=WCH-Link
Link=WCH-Link

View File

@ -19,10 +19,150 @@ typedef enum
SL_Function_Code_Registration_request = 0xA1, /* ×¢²áÇëÇó */
}SL_MsgFunctionCode;
/* 寄存器地址 */
typedef enum
{
SL_Register_Registration_Status = 0x0000, /* 注册状态 */
SL_Register_address = 0x0001, /* 地址 */
SL_Register_Access_Node_Type = 0x0002, /* 接入节点类型 */
SL_Register_Communication_Methods = 0x0003, /* 通信方式 */
SL_Register_Battery_Voltage = 0x0100, /* 电池电压 */
SL_Register_Battery_temperature = 0x0101, /* 电池温度 */
SL_Register_Remaining_Battery_Bower = 0x0102, /* 电池剩余电量 */
SL_Register_Solar_Open_Circuit_Voltage1 = 0x0103, /* 太阳能开路电压1 */
SL_Register_Solar_Open_Circuit_Voltage2 = 0x0104, /* 太阳能开路电压2 */
SL_Register_Ambient_Temperature = 0x0200, /* 环境温度 */
SL_Register_Ambient_Humidity = 0x0201, /* 环境湿度 */
SL_Register_Barometric_Pressure = 0x0202, /* 大气压 */
SL_Register_Wind_Speed = 0x0203, /* 风速 */
SL_Register_Wind_Direction = 0x0204, /* 风向 */
SL_Register_Rainfall = 0x0205, /* 雨量 */
SL_Register_Optical_Radiation = 0x0206, /* 光辐射 */
SL_Register_Leakage_Current_Value = 0x0220, /* 泄漏电流值 */
SL_Register_Leakage_Current_MaxValue = 0x0221, /* 最大泄漏电流值 */
SL_Register_Pulse_Frequency = 0x0222, /* 脉冲次数 */
SL_Register_Zero_Leakage_Current_MaxValue_Statistics = 0x0223, /* 清零最大泄漏电流值统计 */
SL_Register_Zero_Pulse_Frequency_Statistics = 0x0224, /* 清零脉冲次数统计 */
SL_Register_Inclination_AngleX = 0x0230, /* X轴倾角 */
SL_Register_Inclination_AngleY = 0x0231, /* Y轴倾角 */
SL_Register_Zero_Inclination_Angle = 0x0232, /* 校零倾角 */
}SL_MsgRegister;
/* 注册状态 */
typedef enum
{
UNREGISTER = 0, /* 未注册 */
REGISTER_FAIL = 1, /* 注册失败 */
REGISTER_SUCCESS = 2, /* 注册成功 */
}SL_REGISTERSTATUS;
/* 接入节点类型 */
typedef enum
{
POWERBOX = 1, /* 电源箱子 */
MICROMETEOROLOGY = 2, /* 微气象 */
}SL_ACCESSNODETYPE;
/* 通信方式 */
typedef enum
{
RS485 = 1,
RJ45 = 2,
}SL_COMMUNICATIONMETHODS;
/* 指定对齐方式为1字节 */
#pragma pack(push,1)
/* 读时发送的帧格式(汇聚网关->接入节点) */
typedef struct _SL_Mppt_Rorecv_pack{
uint8_t start_Flag[2]; /* 起始标志 */
uint8_t address[7]; /* 地址 */
uint8_t function_Code; /* 功能码 */
uint8_t read_Register_Start_Address_H; /* 读取寄存器起始地址高8位 */
uint8_t read_Register_Start_Address_L; /* 读取寄存器起始地址低八位 */
uint8_t read_Register_Number_H; /* 读取寄存器个数高八位 */
uint8_t read_Register_Number_L; /* 读取寄存器个数低八位 */
uint8_t check_Bit_H; /* 校验位高八位 */
uint8_t check_Bit_L; /* 校验位低八位 */
uint8_t end_Flag; /* 结束标志 */
}SL_Mppt_Rorecv_pack;
#define SL_MPPT_RORECV_PACK_SIZE (sizeof(SL_Mppt_Rorecv_pack))
/* 读时接收到的回复帧格式(接入节点->汇聚网关) */
typedef struct _SL_Mppt_ROReply_pack{
uint8_t start_Flag[2]; /* 起始标志 */
uint8_t address[7]; /* 地址 */
uint8_t function_Code; /* 功能码 */
uint8_t write_Register_Number_H; /* 回复字节数长度高八位 */
uint8_t write_Register_Number_L; /* 回复字节数长度低八位 */
uint8_t *content; /* 回复数据内容 */
uint8_t check_Bit_H; /* 校验位高八位 */
uint8_t check_Bit_L; /* 校验位低八位 */
uint8_t end_Flag; /* 结束标志 */
}SL_Mppt_ROReply_pack;
#define SL_MPPT_ROReply_PACK_SIZE (sizeof(SL_Mppt_ROReply_pack))
/* 扫描广播帧F1汇聚网关->接入节点) */
typedef struct _SL_Mppt_ScanBroadcast_pack{
uint8_t start_Flag[2]; /* 起始标志 */
uint8_t address[7]; /* 地址 */
uint8_t function_Code; /* 功能码 */
uint8_t check_Bit_H; /* 校验位高八位 */
uint8_t check_Bit_L; /* 校验位低八位 */
uint8_t end_Flag; /* 结束标志 */
}SL_Mppt_Scan_Broadcast_pack;
#define SL_MPPT_SCAN_BROADCAST_PACK_SIZE (sizeof(SL_Mppt_Scan_Broadcast_pack))
/* 注册请求帧F2接入节点->汇聚网关) */
typedef struct _SL_Mppt_RegistrationRequest_pack{
uint8_t start_Flag[2]; /* 起始标志 */
uint8_t address[7]; /* 地址 */
uint8_t function_Code; /* 功能码 */
uint8_t register_Length_H; /* 寄存器长度高八位 */
uint8_t register_Length_L; /* 寄存器长度低八位 */
uint8_t registration_Status_H; /* 注册状态高八位 */
uint8_t registration_Status_L; /* 注册状态低八位 */
uint8_t access_Node_ID[7]; /* 接入节点ID */
uint8_t access_Node_Type_H; /* 接入节点类型高八位 */
uint8_t access_Node_Type_L; /* 接入节点类型低八位 */
uint8_t check_Bit_H; /* 校验位高八位 */
uint8_t check_Bit_L; /* 校验位低八位 */
uint8_t end_Flag; /* 结束标志 */
}SL_Mppt_RegistrationRequest_pack;
#define SL_MPPT_REGISTRATIONREQUEST_PACK_SIZE (sizeof(SL_Mppt_RegistrationRequest_pack))
/* 注册回复帧F3汇聚网关->接入节点) */
typedef struct _SL_Mppt_RegistrationReply_pack{
uint8_t start_Flag[2]; /* 起始标志 */
uint8_t address[7]; /* 地址 */
uint8_t function_Code; /* 功能码 */
uint8_t register_Length_H; /* 寄存器长度高八位 */
uint8_t register_Length_L; /* 寄存器长度低八位 */
uint8_t registration_Status_H; /* 注册状态高八位 */
uint8_t registration_Status_L; /* 注册状态低八位 */
uint8_t check_Bit_H; /* 校验位高八位 */
uint8_t check_Bit_L; /* 校验位低八位 */
uint8_t end_Flag; /* 结束标志 */
}SL_Mppt_RegistrationReply_pack;
#define SL_MPPT_REGISTRATIONREPLY_PACK_SIZE (sizeof(SL_Mppt_RegistrationReply_pack))
/* */
#define RECV_LENGTH 20
typedef struct _SL_Mppt_Recv_pack{
uint8_t start_Flag[2]; /* 起始标志 */
uint8_t address[7]; /* 地址 */
uint8_t function_Code; /* 功能码 */
uint8_t recv_Data[RECV_LENGTH]; /* 其他部分 */
}SL_Mppt_Recv_pack;
/* 恢复默认的对齐设置 */
#pragma pack(pop)
extern SL_Mppt_Scan_Broadcast_pack g_Scan_Broadcast_pack;

35
Software/inc/inflash.h Normal file
View File

@ -0,0 +1,35 @@
/*
* inflash.h
*
* Created on: 2024624
* Author: psx
*/
#ifndef APP_INC_INFLASH_H_
#define APP_INC_INFLASH_H_
#include "debug.h"
#pragma pack(push,1)
typedef struct _config_info{
uint8_t start_Flag[2]; /* 起始标志 */
uint8_t address[7]; /* 地址 */
uint8_t end_Flag; /* 结束标志 */
uint16_t Access_Node_Type; /* 接入节点类型 */
uint16_t Communication_Methods; /* 通信方式 */
uint32_t bat485_Baud; /* 串口波特率 */
uint32_t gw485_Baud; /* 串口波特率 */
}config_info;
#define CONFIG_INFO_SIZE (sizeof(config_info))
#pragma pack(pop)
extern config_info g_slConfigInfo;
#define FLASH_SAVE_ADDR_BEGIN (0x00)
#define FLASH_SAVE_ADDR_END (0x00 + CONFIG_INFO_SIZE)
void save_config_info(config_info save_config_info);
uint8_t read_config_info(void);
#endif /* APP_INC_INFLASH_H_ */

View File

@ -11,7 +11,7 @@
#include "communication_protocol.h"
void Rs485_thread_Init(void);
void UartRecv_thread_Init(void);
#endif /* SOFTWARE_THREAD_RS485_H_ */

View File

@ -12,7 +12,6 @@
#include <rtthread.h>
#include <rthw.h>
#include "RingQueue/ring_queue.h"
#include "rs485.h"
#define ASCII_CHAR_BACKSPACE 0x08 /* '\b' */
#define ASCII_CHAR_CHARACTER_TABULATION 0x09 /* '\t' */
@ -31,14 +30,14 @@ extern device_handle g_J4RS485_UART8_handle;
extern device_handle g_J50RS485_USART3_handle;
extern device_handle g_LORA_UART5_handle;
typedef enum{
J1RS485_UART6 = 6,
J2RS485_UART7 = 7,
J3RS485_USART2 = 2,
J4RS485_UART8 = 8,
J50RS485_USART3 = 3,
LORA_UART5 = 5,
}uartIndex_e;
//typedef enum{
// J1RS485_UART6 = UART6,
// J2RS485_UART7 = 7,
// J3RS485_USART2 = 2,
// J4RS485_UART8 = 8,
// J50RS485_USART3 = 3,
// LORA_UART5 = 5,
//}uartIndex_e;
typedef enum{
ONLYONE = 1,
@ -53,7 +52,7 @@ typedef enum{
/* UART 驱动数据结构对应一个uart设备 */
typedef struct _uart_device_info{
uint8_t init;
uartIndex_e uart_index;
USART_TypeDef *uart_index;
uint32_t uart_baudrate;
RingQueue uart_ring_queue;
uartNum_e uart_num;

View File

@ -1,46 +0,0 @@
/*
* Rs485.c
*
* Created on: 2024518
* Author: 34509
*/
#include "Rs485.h"
/* 定义线程控制块指针 */
static rt_thread_t Rs485_thread = RT_NULL;
/* 函数声明 */
static void Rs485_thread_entry(void* parameter);
void Rs485_thread_Init(void)
{
Rs485_thread = /* 线程控制块指针 */
rt_thread_create( "led", /* 线程名字 */
Rs485_thread_entry, /* 线程入口函数 */
RT_NULL, /* 线程入口函数参数 */
512, /* 线程栈大小 */
10, /* 线程的优先级 */
20); /* 线程时间片 */
/* 启动线程,开启调度 */
if (Rs485_thread != RT_NULL)
rt_thread_startup(Rs485_thread);
else
return;
}
void Rs485_thread_entry(void* parameter)
{
while (1) {
rt_thread_mdelay(3000);
}
}

View File

@ -6,7 +6,124 @@
*/
#include <communication_protocol.h>
#include "uart_dev.h"
#include "inflash.h"
SL_Mppt_Scan_Broadcast_pack g_Scan_Broadcast_pack = {
.start_Flag = "SL",
.address = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF},
.function_Code = SL_Function_Code_Broadcast_Scan,
.check_Bit_H = 0x36,
.check_Bit_L = 0xE6,
.end_Flag = 0x16,
};
/* 读取串口数据时用该数组解析 */
static uint8_t uart_buff[50]={0x00};
/**
* @brief
* @param
* @retval
*/
uint16_t CheckFunc(uint8_t *arr_buff, uint8_t len)
{
uint16_t crc = 0xFFFF;
uint16_t i, j;
for (j = 0; j < len; ++j) {
crc = crc ^ (*arr_buff++);
for (i = 0; i < 8; ++i) {
if ((crc&0x0001) > 0) {
crc = crc >> 1;
crc = crc ^ 0xa001;
}
else {
crc = crc >> 1;
}
}
}
return crc;
}
/**
* @brief 485线
* @param
* @retval 1
* 0
*/
uint8_t Check_485_bus_busy(device_handle device)
{
uart_device_info *device_info = (uart_device_info *)device;
if((!device) || (!device_info->init))
return 0;
USART_ITConfig(device_info->uart_index, USART_IT_RXNE, ENABLE);
uint16_t num_ago = ring_queue_length(device);
Delay_Ms(2);
uint16_t num_now = ring_queue_length(device);
USART_ITConfig(device_info->uart_index, USART_IT_RXNE, DISABLE);
if (num_now == num_ago) {
return 0;
}
return 1;
}
/**
* @brief "SL"
* @param start_buff
* @retval 1
* 0
*/
static int Match_Startflag(uint8_t start_buff[2])
{
if ((start_buff[0] == g_slConfigInfo.start_Flag[0]) && \
(start_buff[1] == g_slConfigInfo.start_Flag[1])) {
return 1;
}
return 0;
}
/**
* @brief
* @param uart_handle
* @param buff
* @param buff_size
* @retval
*/
static int uart_read_climate_pack(device_handle uart_handle,uint8_t *buff, uint32_t buff_size)
{
}
/**
* @brief
* @param
* @retval
*/
void FRT_MsgHandler(device_handle device, uint8_t *pMsg, uint32_t MsgLen)
{
SL_Mppt_Recv_pack *pack = (SL_Mppt_Recv_pack *)pMsg;
}
/**
* @brief
* @param
* @retval
*/
void read_and_process_uart_data(device_handle device)
{
// printf("ring_queue_length = %d \n", ring_queue_length(device));
if (ring_queue_length(device) > 10) {
memset(uart_buff, 0, sizeof(uart_buff));
int ret = uart_read_climate_pack(device, uart_buff, sizeof(uart_buff));
if(ret > 0){
FRT_MsgHandler(device, uart_buff, ret);
}
}
}

48
Software/src/inflash.c Normal file
View File

@ -0,0 +1,48 @@
/*
* inflash.c
*
* Created on: 2024624
* Author: psx
*/
#include "inflash.h"
#include "flash.h"
config_info g_slConfigInfo = {
.start_Flag = {'S', 'L'},
.end_Flag = 0x16,
};
/**
* @brief
* @param save_config_info
* @retval
*/
void save_config_info(config_info save_config_info)
{
SPI_Flash_Write((uint8_t *)&save_config_info, FLASH_SAVE_ADDR_BEGIN, CONFIG_INFO_SIZE);
}
/**
* @brief
* @param read_config_info
* @retval 0 flash中读取配置失败
* 1 flash中读取配置成功
*/
uint8_t read_config_info(void)
{
config_info temp_config_info;
SPI_Flash_Read((uint8_t *)&temp_config_info, FLASH_SAVE_ADDR_BEGIN, CONFIG_INFO_SIZE);
if (temp_config_info.start_Flag[0] == 'S') {
g_slConfigInfo = temp_config_info;
return 1;
}
return 0;
}

48
Software/src/thread.c Normal file
View File

@ -0,0 +1,48 @@
/*
* Rs485.c
*
* Created on: 2024518
* Author: 34509
*/
#include <thread.h>
#include "uart_dev.h"
/* 定义线程控制块指针 */
static rt_thread_t UartRecv_thread = RT_NULL;
/* 函数声明 */
static void UartRecv_thread_entry(void* parameter);
void UartRecv_thread_Init(void)
{
UartRecv_thread = /* 线程控制块指针 */
rt_thread_create( "UartRecv", /* 线程名字 */
UartRecv_thread_entry, /* 线程入口函数 */
RT_NULL, /* 线程入口函数参数 */
512, /* 线程栈大小 */
3, /* 线程的优先级 */
20); /* 线程时间片 */
/* 启动线程,开启调度 */
if (UartRecv_thread != RT_NULL)
rt_thread_startup(UartRecv_thread);
else
return;
}
void UartRecv_thread_entry(void* parameter)
{
while (1) {
if (ring_queue_length(g_J50RS485_USART3_handle) > 1) {
rt_thread_mdelay(30);
}
rt_thread_mdelay(100);
}
}

View File

@ -52,32 +52,32 @@ uint8_t LORA_in_buff[IN_BUFF_SIZE];
uart_device_info uart_devices[]={
[0] = {
.init = 0,
.uart_index = J1RS485_UART6,
.uart_index = UART6,
.uart_num = ONLYONE,
},
[1] = {
.init = 0,
.uart_index = J2RS485_UART7,
.uart_index = UART7,
.uart_num = ONLYONE,
},
[2] = {
.init = 0,
.uart_index = J3RS485_USART2,
.uart_index = USART2,
.uart_num = ONLYONE,
},
[3] = {
.init = 0,
.uart_index = J4RS485_UART8,
.uart_index = UART8,
.uart_num = ONLYONE,
},
[4] = {
.init = 0,
.uart_index = J50RS485_USART3,
.uart_index = USART3,
.uart_num = J0RS485,
},
[5] = {
.init = 0,
.uart_index = LORA_UART5,
.uart_index = UART5,
.uart_num = ONLYONE,
},
};
@ -167,17 +167,17 @@ device_handle uart_dev_init(void)
* @retval None
*/
void uart_init(uart_device_info *uart_device, int baud)
{ rt_kprintf("1 \n");
{
uart_device->uart_baudrate = baud;
if (uart_device->uart_index == J1RS485_UART6) {
if (uart_device->uart_index == UART6) {
J1_485_Init(baud);
} else if (uart_device->uart_index == J2RS485_UART7) {
} else if (uart_device->uart_index == UART7) {
J2_485_Init(baud);
} else if (uart_device->uart_index == J3RS485_USART2) {
} else if (uart_device->uart_index == USART2) {
J3_485_Init(baud);
} else if (uart_device->uart_index == J4RS485_UART8) {
} else if (uart_device->uart_index == UART8) {
J4_485_Init(baud);
} else if (uart_device->uart_index == J50RS485_USART3) {
} else if (uart_device->uart_index == USART3) {
J5_0_485_Init(baud);
if (uart_device->uart_num == J0RS485) {
USART_CONNET_J0();
@ -192,8 +192,7 @@ void uart_init(uart_device_info *uart_device, int baud)
} else if (uart_device->uart_num == J9RS485) {
USART_CONNET_J9();
}
rt_kprintf("1 \n");
} else if (uart_device->uart_index == LORA_UART5) {
} else if (uart_device->uart_index == UART5) {
;
}
}
@ -210,17 +209,8 @@ uint8_t uart_putchar(device_handle device, char ch)
if((!device) || (!device_info->init))
return 0;
if (device_info->uart_index == J1RS485_UART6) {
USARTx_SendByte_str(device_info->uart_index, ch);
} else if (device_info->uart_index == J2RS485_UART7) {
} else if (device_info->uart_index == J3RS485_USART2) {
} else if (device_info->uart_index == J4RS485_UART8) {
} else if (device_info->uart_index == J50RS485_USART3) {
USARTx_SendByte_str(USART3, ch);
}
return 1;
}

View File

@ -34,7 +34,6 @@ int main(void)
SystemCoreClockUpdate();
rt_kprintf(" SysClk: %dHz\r\n",SystemCoreClock);
rt_kprintf(" ChipID: %08x\r\n",DBGMCU_GetCHIPID());
rt_kprintf("test \r\n");
app_star();

View File

@ -6,7 +6,7 @@
#include "inc/UART.h"
#include <inc/communication_protocol.h>
#include "inc/Rs485.h"
#include <inc/thread.h>
#include "inc/uart_dev.h"
@ -37,11 +37,7 @@ void software_init()
{
uart_dev_init();
// uart_sendstr(g_J50RS485_USART3_handle, "This is a test data.\n");
USARTx_SendStr(USART3, "This is a test data.\n");
Rs485_thread_Init();
UartRecv_thread_Init();
}
/*

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -49,7 +49,10 @@ Software/src/communication_protocol.o: \
D:\psx\su806\git\CH32V303_V0.1\rtthread\components\drivers\include/ipc/pipe.h \
D:\psx\su806\git\CH32V303_V0.1\rtthread\components\drivers\include/ipc/poll.h \
D:\psx\su806\git\CH32V303_V0.1\rtthread\components\drivers\include/drivers/serial.h \
D:\psx\su806\git\CH32V303_V0.1\rtthread\components\drivers\include/drivers/pin.h
D:\psx\su806\git\CH32V303_V0.1\rtthread\components\drivers\include/drivers/pin.h \
D:\psx\su806\git\CH32V303_V0.1\Software\inc/uart_dev.h \
D:\psx\su806\git\CH32V303_V0.1\drivers/RingQueue/ring_queue.h \
D:\psx\su806\git\CH32V303_V0.1\Software\inc/inflash.h
D:\psx\su806\git\CH32V303_V0.1\Software\inc/communication_protocol.h:
@ -150,3 +153,9 @@ D:\psx\su806\git\CH32V303_V0.1\rtthread\components\drivers\include/ipc/poll.h:
D:\psx\su806\git\CH32V303_V0.1\rtthread\components\drivers\include/drivers/serial.h:
D:\psx\su806\git\CH32V303_V0.1\rtthread\components\drivers\include/drivers/pin.h:
D:\psx\su806\git\CH32V303_V0.1\Software\inc/uart_dev.h:
D:\psx\su806\git\CH32V303_V0.1\drivers/RingQueue/ring_queue.h:
D:\psx\su806\git\CH32V303_V0.1\Software\inc/inflash.h:

118
obj/Software/src/inflash.d Normal file
View File

@ -0,0 +1,118 @@
Software/src/inflash.o: ../Software/src/inflash.c \
D:\psx\su806\git\CH32V303_V0.1\Software\inc/inflash.h \
D:\psx\su806\git\CH32V303_V0.1\Debug/debug.h \
D:\psx\su806\git\CH32V303_V0.1\Peripheral\inc/ch32v30x.h \
D:\psx\su806\git\CH32V303_V0.1\Core/core_riscv.h \
D:\psx\su806\git\CH32V303_V0.1\User/system_ch32v30x.h \
D:\psx\su806\git\CH32V303_V0.1\User/ch32v30x_conf.h \
D:\psx\su806\git\CH32V303_V0.1\Peripheral\inc/ch32v30x_adc.h \
D:\psx\su806\git\CH32V303_V0.1\Peripheral\inc/ch32v30x.h \
D:\psx\su806\git\CH32V303_V0.1\Peripheral\inc/ch32v30x_bkp.h \
D:\psx\su806\git\CH32V303_V0.1\Peripheral\inc/ch32v30x_can.h \
D:\psx\su806\git\CH32V303_V0.1\Peripheral\inc/ch32v30x_crc.h \
D:\psx\su806\git\CH32V303_V0.1\Peripheral\inc/ch32v30x_dac.h \
D:\psx\su806\git\CH32V303_V0.1\Peripheral\inc/ch32v30x_dbgmcu.h \
D:\psx\su806\git\CH32V303_V0.1\Peripheral\inc/ch32v30x_dma.h \
D:\psx\su806\git\CH32V303_V0.1\Peripheral\inc/ch32v30x_exti.h \
D:\psx\su806\git\CH32V303_V0.1\Peripheral\inc/ch32v30x_flash.h \
D:\psx\su806\git\CH32V303_V0.1\Peripheral\inc/ch32v30x_fsmc.h \
D:\psx\su806\git\CH32V303_V0.1\Peripheral\inc/ch32v30x_gpio.h \
D:\psx\su806\git\CH32V303_V0.1\Peripheral\inc/ch32v30x_i2c.h \
D:\psx\su806\git\CH32V303_V0.1\Peripheral\inc/ch32v30x_iwdg.h \
D:\psx\su806\git\CH32V303_V0.1\Peripheral\inc/ch32v30x_pwr.h \
D:\psx\su806\git\CH32V303_V0.1\Peripheral\inc/ch32v30x_rcc.h \
D:\psx\su806\git\CH32V303_V0.1\Peripheral\inc/ch32v30x_rtc.h \
D:\psx\su806\git\CH32V303_V0.1\Peripheral\inc/ch32v30x_sdio.h \
D:\psx\su806\git\CH32V303_V0.1\Peripheral\inc/ch32v30x_spi.h \
D:\psx\su806\git\CH32V303_V0.1\Peripheral\inc/ch32v30x_tim.h \
D:\psx\su806\git\CH32V303_V0.1\Peripheral\inc/ch32v30x_usart.h \
D:\psx\su806\git\CH32V303_V0.1\Peripheral\inc/ch32v30x_wwdg.h \
D:\psx\su806\git\CH32V303_V0.1\User/ch32v30x_it.h \
D:\psx\su806\git\CH32V303_V0.1\Peripheral\inc/ch32v30x_misc.h \
D:\psx\su806\git\CH32V303_V0.1\Hardware\inc/flash.h \
D:\psx\su806\git\CH32V303_V0.1\rtthread\include/rthw.h \
D:\psx\su806\git\CH32V303_V0.1\rtthread\include/rtthread.h \
D:\psx\su806\git\CH32V303_V0.1\rtthread/rtconfig.h \
D:\psx\su806\git\CH32V303_V0.1\rtthread\include/rtdebug.h \
D:\psx\su806\git\CH32V303_V0.1\rtthread\include/rtdef.h \
D:\psx\su806\git\CH32V303_V0.1\rtthread\include/rtservice.h \
D:\psx\su806\git\CH32V303_V0.1\rtthread\include/rtm.h \
D:\psx\su806\git\CH32V303_V0.1\rtthread\components\finsh/finsh_api.h
D:\psx\su806\git\CH32V303_V0.1\Software\inc/inflash.h:
D:\psx\su806\git\CH32V303_V0.1\Debug/debug.h:
D:\psx\su806\git\CH32V303_V0.1\Peripheral\inc/ch32v30x.h:
D:\psx\su806\git\CH32V303_V0.1\Core/core_riscv.h:
D:\psx\su806\git\CH32V303_V0.1\User/system_ch32v30x.h:
D:\psx\su806\git\CH32V303_V0.1\User/ch32v30x_conf.h:
D:\psx\su806\git\CH32V303_V0.1\Peripheral\inc/ch32v30x_adc.h:
D:\psx\su806\git\CH32V303_V0.1\Peripheral\inc/ch32v30x.h:
D:\psx\su806\git\CH32V303_V0.1\Peripheral\inc/ch32v30x_bkp.h:
D:\psx\su806\git\CH32V303_V0.1\Peripheral\inc/ch32v30x_can.h:
D:\psx\su806\git\CH32V303_V0.1\Peripheral\inc/ch32v30x_crc.h:
D:\psx\su806\git\CH32V303_V0.1\Peripheral\inc/ch32v30x_dac.h:
D:\psx\su806\git\CH32V303_V0.1\Peripheral\inc/ch32v30x_dbgmcu.h:
D:\psx\su806\git\CH32V303_V0.1\Peripheral\inc/ch32v30x_dma.h:
D:\psx\su806\git\CH32V303_V0.1\Peripheral\inc/ch32v30x_exti.h:
D:\psx\su806\git\CH32V303_V0.1\Peripheral\inc/ch32v30x_flash.h:
D:\psx\su806\git\CH32V303_V0.1\Peripheral\inc/ch32v30x_fsmc.h:
D:\psx\su806\git\CH32V303_V0.1\Peripheral\inc/ch32v30x_gpio.h:
D:\psx\su806\git\CH32V303_V0.1\Peripheral\inc/ch32v30x_i2c.h:
D:\psx\su806\git\CH32V303_V0.1\Peripheral\inc/ch32v30x_iwdg.h:
D:\psx\su806\git\CH32V303_V0.1\Peripheral\inc/ch32v30x_pwr.h:
D:\psx\su806\git\CH32V303_V0.1\Peripheral\inc/ch32v30x_rcc.h:
D:\psx\su806\git\CH32V303_V0.1\Peripheral\inc/ch32v30x_rtc.h:
D:\psx\su806\git\CH32V303_V0.1\Peripheral\inc/ch32v30x_sdio.h:
D:\psx\su806\git\CH32V303_V0.1\Peripheral\inc/ch32v30x_spi.h:
D:\psx\su806\git\CH32V303_V0.1\Peripheral\inc/ch32v30x_tim.h:
D:\psx\su806\git\CH32V303_V0.1\Peripheral\inc/ch32v30x_usart.h:
D:\psx\su806\git\CH32V303_V0.1\Peripheral\inc/ch32v30x_wwdg.h:
D:\psx\su806\git\CH32V303_V0.1\User/ch32v30x_it.h:
D:\psx\su806\git\CH32V303_V0.1\Peripheral\inc/ch32v30x_misc.h:
D:\psx\su806\git\CH32V303_V0.1\Hardware\inc/flash.h:
D:\psx\su806\git\CH32V303_V0.1\rtthread\include/rthw.h:
D:\psx\su806\git\CH32V303_V0.1\rtthread\include/rtthread.h:
D:\psx\su806\git\CH32V303_V0.1\rtthread/rtconfig.h:
D:\psx\su806\git\CH32V303_V0.1\rtthread\include/rtdebug.h:
D:\psx\su806\git\CH32V303_V0.1\rtthread\include/rtdef.h:
D:\psx\su806\git\CH32V303_V0.1\rtthread\include/rtservice.h:
D:\psx\su806\git\CH32V303_V0.1\rtthread\include/rtm.h:
D:\psx\su806\git\CH32V303_V0.1\rtthread\components\finsh/finsh_api.h:

BIN
obj/Software/src/inflash.o Normal file

Binary file not shown.

View File

@ -5,21 +5,24 @@
# Add inputs and outputs from these tool invocations to the build variables
C_SRCS += \
../Software/src/Rs485.c \
../Software/src/communication_protocol.c \
../Software/src/inflash.c \
../Software/src/mutex.c \
../Software/src/thread.c \
../Software/src/uart_dev.c
OBJS += \
./Software/src/Rs485.o \
./Software/src/communication_protocol.o \
./Software/src/inflash.o \
./Software/src/mutex.o \
./Software/src/thread.o \
./Software/src/uart_dev.o
C_DEPS += \
./Software/src/Rs485.d \
./Software/src/communication_protocol.d \
./Software/src/inflash.d \
./Software/src/mutex.d \
./Software/src/thread.d \
./Software/src/uart_dev.d

View File

@ -1,5 +1,5 @@
Software/src/Rs485.o: ../Software/src/Rs485.c \
D:\psx\su806\git\CH32V303_V0.1\Software\inc/Rs485.h \
Software/src/thread.o: ../Software/src/thread.c \
D:\psx\su806\git\CH32V303_V0.1\Software\inc/thread.h \
D:\psx\su806\git\CH32V303_V0.1\Software\inc/communication_protocol.h \
D:\psx\su806\git\CH32V303_V0.1\Hardware/inc/UART.h \
D:\psx\su806\git\CH32V303_V0.1\Peripheral\inc/ch32v30x.h \
@ -49,9 +49,11 @@ Software/src/Rs485.o: ../Software/src/Rs485.c \
D:\psx\su806\git\CH32V303_V0.1\rtthread\components\drivers\include/ipc/pipe.h \
D:\psx\su806\git\CH32V303_V0.1\rtthread\components\drivers\include/ipc/poll.h \
D:\psx\su806\git\CH32V303_V0.1\rtthread\components\drivers\include/drivers/serial.h \
D:\psx\su806\git\CH32V303_V0.1\rtthread\components\drivers\include/drivers/pin.h
D:\psx\su806\git\CH32V303_V0.1\rtthread\components\drivers\include/drivers/pin.h \
D:\psx\su806\git\CH32V303_V0.1\Software\inc/uart_dev.h \
D:\psx\su806\git\CH32V303_V0.1\drivers/RingQueue/ring_queue.h
D:\psx\su806\git\CH32V303_V0.1\Software\inc/Rs485.h:
D:\psx\su806\git\CH32V303_V0.1\Software\inc/thread.h:
D:\psx\su806\git\CH32V303_V0.1\Software\inc/communication_protocol.h:
@ -152,3 +154,7 @@ D:\psx\su806\git\CH32V303_V0.1\rtthread\components\drivers\include/ipc/poll.h:
D:\psx\su806\git\CH32V303_V0.1\rtthread\components\drivers\include/drivers/serial.h:
D:\psx\su806\git\CH32V303_V0.1\rtthread\components\drivers\include/drivers/pin.h:
D:\psx\su806\git\CH32V303_V0.1\Software\inc/uart_dev.h:
D:\psx\su806\git\CH32V303_V0.1\drivers/RingQueue/ring_queue.h:

BIN
obj/Software/src/thread.o Normal file

Binary file not shown.

View File

@ -38,9 +38,8 @@ Software/src/uart_dev.o: ../Software/src/uart_dev.c \
D:\psx\su806\git\CH32V303_V0.1\rtthread\components\finsh/finsh_api.h \
D:\psx\su806\git\CH32V303_V0.1\rtthread\include/rthw.h \
D:\psx\su806\git\CH32V303_V0.1\drivers/RingQueue/ring_queue.h \
D:\psx\su806\git\CH32V303_V0.1\Software\inc/rs485.h \
D:\psx\su806\git\CH32V303_V0.1\Software\inc/communication_protocol.h \
D:\psx\su806\git\CH32V303_V0.1\Hardware/inc/UART.h \
D:\psx\su806\git\CH32V303_V0.1\Hardware\inc/J1_UART6.h \
D:\psx\su806\git\CH32V303_V0.1\Hardware\inc/UART.h \
D:\psx\su806\git\CH32V303_V0.1\rtthread\components\drivers\include/drivers/pin.h \
D:\psx\su806\git\CH32V303_V0.1\rtthread\components\drivers\include/rtdevice.h \
D:\psx\su806\git\CH32V303_V0.1\rtthread\components\drivers\include/ipc/ringbuffer.h \
@ -52,8 +51,6 @@ Software/src/uart_dev.o: ../Software/src/uart_dev.c \
D:\psx\su806\git\CH32V303_V0.1\rtthread\components\drivers\include/ipc/poll.h \
D:\psx\su806\git\CH32V303_V0.1\rtthread\components\drivers\include/drivers/serial.h \
D:\psx\su806\git\CH32V303_V0.1\rtthread\components\drivers\include/drivers/pin.h \
D:\psx\su806\git\CH32V303_V0.1\Hardware\inc/J1_UART6.h \
D:\psx\su806\git\CH32V303_V0.1\Hardware\inc/UART.h \
D:\psx\su806\git\CH32V303_V0.1\Hardware\inc/J2_UART7.h \
D:\psx\su806\git\CH32V303_V0.1\Hardware\inc/J3_USART2.h \
D:\psx\su806\git\CH32V303_V0.1\Hardware\inc/J4_UART8.h \
@ -137,11 +134,9 @@ D:\psx\su806\git\CH32V303_V0.1\rtthread\include/rthw.h:
D:\psx\su806\git\CH32V303_V0.1\drivers/RingQueue/ring_queue.h:
D:\psx\su806\git\CH32V303_V0.1\Software\inc/rs485.h:
D:\psx\su806\git\CH32V303_V0.1\Hardware\inc/J1_UART6.h:
D:\psx\su806\git\CH32V303_V0.1\Software\inc/communication_protocol.h:
D:\psx\su806\git\CH32V303_V0.1\Hardware/inc/UART.h:
D:\psx\su806\git\CH32V303_V0.1\Hardware\inc/UART.h:
D:\psx\su806\git\CH32V303_V0.1\rtthread\components\drivers\include/drivers/pin.h:
@ -165,10 +160,6 @@ D:\psx\su806\git\CH32V303_V0.1\rtthread\components\drivers\include/drivers/seria
D:\psx\su806\git\CH32V303_V0.1\rtthread\components\drivers\include/drivers/pin.h:
D:\psx\su806\git\CH32V303_V0.1\Hardware\inc/J1_UART6.h:
D:\psx\su806\git\CH32V303_V0.1\Hardware\inc/UART.h:
D:\psx\su806\git\CH32V303_V0.1\Hardware\inc/J2_UART7.h:
D:\psx\su806\git\CH32V303_V0.1\Hardware\inc/J3_USART2.h:

Binary file not shown.

Binary file not shown.

View File

@ -51,11 +51,10 @@ User/start.d: ../User/start.c D:\psx\su806\git\CH32V303_V0.1\User/start.h \
D:\psx\su806\git\CH32V303_V0.1\Hardware/inc/Flash.h \
D:\psx\su806\git\CH32V303_V0.1\Hardware/inc/UART.h \
D:\psx\su806\git\CH32V303_V0.1\Software/inc/communication_protocol.h \
D:\psx\su806\git\CH32V303_V0.1\Software/inc/Rs485.h \
D:\psx\su806\git\CH32V303_V0.1\Software/inc/thread.h \
D:\psx\su806\git\CH32V303_V0.1\Software/inc/communication_protocol.h \
D:\psx\su806\git\CH32V303_V0.1\Software/inc/uart_dev.h \
D:\psx\su806\git\CH32V303_V0.1\drivers/RingQueue/ring_queue.h \
D:\psx\su806\git\CH32V303_V0.1\Software/inc/rs485.h
D:\psx\su806\git\CH32V303_V0.1\drivers/RingQueue/ring_queue.h
D:\psx\su806\git\CH32V303_V0.1\User/start.h:
@ -163,12 +162,10 @@ D:\psx\su806\git\CH32V303_V0.1\Hardware/inc/UART.h:
D:\psx\su806\git\CH32V303_V0.1\Software/inc/communication_protocol.h:
D:\psx\su806\git\CH32V303_V0.1\Software/inc/Rs485.h:
D:\psx\su806\git\CH32V303_V0.1\Software/inc/thread.h:
D:\psx\su806\git\CH32V303_V0.1\Software/inc/communication_protocol.h:
D:\psx\su806\git\CH32V303_V0.1\Software/inc/uart_dev.h:
D:\psx\su806\git\CH32V303_V0.1\drivers/RingQueue/ring_queue.h:
D:\psx\su806\git\CH32V303_V0.1\Software/inc/rs485.h:

Binary file not shown.