Hey guys, I need help manipulating strings in GNU GCC, its for USART... this is the prob:
I set up a simple at24c02 eeprom to see all the text sent from PC (br@ys terminal) to AVR when using scanf... so lets say I send my command:
the output on my eeprom is:
62 72 65 6e 74 0 0 0 0 0 0 e1 4 30 73 7f 2a 31 5c
b r e n t . . . . . . . . . . . . . .
no matter the length of the string I enter, it tags on those 14 extra chars, im sure they are used in GCC to tell it when scanf should stop recording or what have you... but I need a way to cut those last 14 chars off...
I have done some searching but I cannot find what I am looking for, I know commands like strncmp but that doesent help...
I need to somehow only read from start to - the last 14
anyone have any ideas?
BTW: im using the latest winAVR, and I have stdio(fdevopen) set up for USART like this (if it helps)
FILE * stdio_dev; stdio_dev = fdevopen(uart_tx, uart_rx);