how to write the character value from structure into the serial interface and convert into integer value?
问题 struct MemoryTag1; typedef struct MemoryTag1{ char a[8]= {'+','0','2','6','.','5','EA','\r'}; // setpoint temperature value char b[8]= {'-','0','2','4','.','5','EB','\r'}; char c[6]= {'+','0','2','0','EC','\r'}; }Memory1; // This is a message structure which I want to transfer over the serial interface (RS232) and later convert into integer value. please guide me in this. 回答1: Your syntax is a bit off - try this: // declare Memory1 struct type to hold data typedef struct MemoryTag1 { char a[9