This repository has been archived on 2025-04-02. You can view files and clone it, but cannot push or open issues or pull requests.
controller-hart/User/hart/master/inc/hart_master.h

29 lines
926 B
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/***
* @Author:
* @Date: 2023-03-20 19:27:47
* @LastEditors: xxx
* @LastEditTime: 2023-03-30 00:31:58
* @FilePath: \hart\hart\inc\hart_master.h
* @Description: hart主机处理
* @email:
* @Copyright (c) 2023 by xxx, All Rights Reserved.
*/
#ifndef __HART_MASTER_H__
#define __HART_MASTER_H__
#include "lib.h"
#include "./hart_master_frame.h"
#pragma pack(1)
typedef struct
{
uint8_t address_bit; // 为1时表示基本主设备为0时表示副主设备
response_cb response_call; // 回复消息接口
hart_response_t *response;
} hart_master_init_t;
#pragma pack()
extern BOOL hart_master_init(const hart_master_init_t *const init);
extern BOOL hart_master_handle(uint8_t *rxBuf, uint16_t len);
extern BOOL hart_master_command_req(const hart_command_req_t *const req); // 主机请求指令接口
#endif // __HART_MASTER_H__