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

30 lines
790 B
C

/***
* @Author:
* @Date: 2023-03-20 19:27:47
* @LastEditors: xxx
* @LastEditTime: 2023-03-30 00:32:16
* @FilePath: \hart\hart\inc\hart_slave.h
* @Description: hart从机处理
* @email:
* @Copyright (c) 2023 by xxx, All Rights Reserved.
*/
#ifndef __HART_SLAVE_H__
#define __HART_SLAVE_H__
#include "lib.h"
#include "./hart_slave_req.h"
#pragma pack(1)
typedef struct
{
response_cb response_call; // 回复消息接口
hart_response_t *response;
} hart_slave_init_t;
#pragma pack()
extern BOOL hart_slave_init(const hart_slave_init_t *const init);
extern BOOL hart_slave_handle(uint8_t uart_index, uint8_t *rxBuf, uint16_t len);
extern void hart_slave_device_attribute_init(void);
extern BOOL hart_slave_device_send(hart_cache_t *cache_data);
#endif // __HART_SLAVE_H__