// // ****************************************************************** // // /\ /| @File spi_packet.h // // \ V/ @Brief // // | "") @Author lijinwen, ghz005@uni-trend.com.cn // // / | @Creation 2024-07-19 // // / \\ @Modified 2024-07-23 // // *(__\_\ // // ****************************************************************** #pragma once #include #include //#include "../decode_event.h" namespace Protocol { //内部使用数据结构 数据帧 struct DataPacketInfo { int32_t index; int32_t len; int32_t is_last; int32_t miso_data_count; int32_t mosi_data_count; //uint8_t* miso_data_ptr; //to std::vector miso_data; //uint8_t* mosi_data_ptr; //to std::vector mosi_data; uint8_t miso_data; uint8_t mosi_data; int32_t bit_count; int32_t real_bit_count; }; struct SpiPacket { int32_t start_index; int32_t start_len; int32_t has_start; intptr_t data_ptr; //to std::vector int32_t data_count; int32_t has_end; int32_t end_index; int32_t end_len; DataPacketInfo data_info; }; }