mirror of
https://github.com/armink/FreeModbus_Slave-Master-RTT-STM32.git
synced 2024-09-01 08:09:25 +08:00
a5528950d0
2、【修改】FreeModbus的port文件夹下相关文件的命名方式,从机保留FreeModbus原有的文件,主机则在文件名后面增加“_m”以区分,尽量保证FreeModbus源码的统一性; 3、【增加】FreeModbus主机初始化、使能、失能及定时器状态机相关方法,定时器超时状态机还需要后期完善,发送状态机及接收状态机还未实现; Signed-off-by: armink <armink.ztl@gmail.com>
46 lines
1.2 KiB
C
46 lines
1.2 KiB
C
/*********************************************************************************************************
|
|
// NCLUDE FILES
|
|
*********************************************************************************************************/
|
|
#ifndef APP_TASK_H
|
|
#define APP_TASK_H
|
|
|
|
#include <stdlib.h>
|
|
#include <stdio.h>
|
|
#include <rthw.h>
|
|
#include <rtthread.h>
|
|
#include <stm32f10x_conf.h>
|
|
#include "bsp.h"
|
|
#include "delay_conf.h"
|
|
#include "cpuusage.h"
|
|
#include "user_app.h"
|
|
|
|
/*******************************************************************************************************/
|
|
// DEFINES
|
|
/*******************************************************************************************************/
|
|
|
|
|
|
#define success 0
|
|
#define fail 1
|
|
|
|
#define false 0
|
|
#define true 1
|
|
|
|
|
|
extern uint16_t usDiscreteInputBuf[] ;
|
|
extern uint16_t usCoilBuf[] ;
|
|
extern uint16_t usRegInputBuf[] ;
|
|
extern uint16_t usRegHoldingBuf[] ;
|
|
|
|
|
|
|
|
|
|
extern void cpu_usage_get(rt_uint8_t *major, rt_uint8_t *minor);
|
|
extern void cpu_usage_init(void);
|
|
|
|
|
|
|
|
void rtthread_startup(void);
|
|
|
|
|
|
#endif
|