Modularizando o src
Dependencies: EALib EthernetInterface_vz mbed-rtos mbed
Fork of header_main_colinas_V0-20-09-14 by
Diff: utils.cpp
- Revision:
- 81:3656f00ab3db
- Parent:
- 78:1353744f01e1
- Child:
- 112:6ae726539ab9
diff -r 61d61c9eb75c -r 3656f00ab3db utils.cpp --- a/utils.cpp Tue Dec 16 19:34:30 2014 +0000 +++ b/utils.cpp Tue Dec 30 12:37:40 2014 +0000 @@ -38,8 +38,6 @@ return( str ); } -void reset_leds( void ){ led1 = led2 = 1; led3 = led4 = 0; } - int convert_ext_to_port( int ext ){ if( ext < 1000 ) return ext; @@ -74,4 +72,11 @@ return 1; /* matches */ else return 0; /* does not match */ +} + +uint8_t xmemmatch(const uint8_t * s1, const uint8_t * s2, uint16_t size){ + while (size--) { + if (*s1++ != *s2++) return 0; /* does not match */ + } + return 1; /* matches */ } \ No newline at end of file