Browse Source

add can new rfid struct, but not used

Signed-off-by: kevin <huhui@sharkgulf.com>
kevin 2 years ago
parent
commit
5628460444
1 changed files with 21 additions and 0 deletions
  1. 21 0
      Applications/bsp/gd32/can.h

+ 21 - 0
Applications/bsp/gd32/can.h

@@ -27,6 +27,27 @@ typedef union {
 	};
 }can_id_t;
 
+#if 0
+typedef union {
+	uint32_t id;
+	struct {
+		uint32_t	dest		:5; /*bit 0-4  */
+		uint32_t	src 		:5; /*bit 5-9 */
+		uint32_t	idx 		:4; /*bit 10-13 */
+		uint32_t	total		:4; /*bit 14-17 */
+		uint32_t	command		:8; /*bit 18-25 */
+		uint32_t	type 		:1; /*bit 26, 1:Request(Need ack), 0:Ack(No ack needed)*/
+		uint32_t	res			:1; /*bit 27 */
+		uint32_t    lpkg		:1; /*bit 28 , 0: short package, 1: long package*/
+	};
+	struct {
+		uint32_t ext_command		:27; /*bit 0-26 */
+		uint32_t ext_type			:1;  /*bit 26, 1:Request(Need ack), 0:Ack(No ack needed)*/
+		uint32_t ext_pkg			:1;  /*bit 28 , 0: short package, 1: long package*/
+	};
+}cid_v2;
+#endif
+
 //CAN filter setting
 #ifdef CAN_COMMUNICATION_SPEC_V1P4
 //specification 1.4