/*** * @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); extern void hart_slave_timer_1s(void); extern void hart_slave_write_protect_close(void); #endif // __HART_SLAVE_H__