12.07.2015 Views

Programming Manual Elektor Proton Robot - ELEKTOR.se

Programming Manual Elektor Proton Robot - ELEKTOR.se

Programming Manual Elektor Proton Robot - ELEKTOR.se

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

char cursor;cursor = line *20;LCD03_SET_CURSOR(cursor);LCD03_WRITE_STRING(""); //20 x space}/*************************************************************************STRING FUNCTIONS - STRING FUNCTIONS - STRING FUNCTIONS - STRING FUNCTIONS**************************************************************************///unsigned char STR_LEN( const char *p );//This function returns the length of the string p.unsigned char STR_LEN( const char *p ){unsigned char n = 0;while( *p != '\0' ){p++;n++;}return n;}//bit str_equal( const char *p, const char *q );//This function returns whether the strings p and q are equal.char STR_EQUAL( const char *p, const char *q ){for(;;){if( *p != *q ){return 0;}if( *p == '\0' ){return 1;}p++;q++;}}char STR_PREFIX( const char *p, const char *q ){for(;;){if( *p == '\0' ){return 1;}if( *p != *q ){return 0;}p++;q++;}}//This function copies up to n characters from string q to string p. S is the size of string n.void STR_COPY( char *p, unsigned char s, char *q, unsigned char n ){for(;;){*p = '\0';if( s == 0 ) return;if( n == 0 ) return;if( *q == '\0' ) return;*p = *q;p++;q++;s--;Bart Huyskens <strong>Manual</strong> <strong>Elektor</strong> <strong>Proton</strong> V1.0 3 April 2011 168

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!