![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
Modularizando o src
Dependencies: EALib EthernetInterface_vz mbed-rtos mbed
Fork of header_main_colinas_V0-20-09-14 by
vz_protocol.cpp@70:714c33487aae, 2014-11-13 (annotated)
- Committer:
- klauss
- Date:
- Thu Nov 13 19:16:48 2014 +0000
- Revision:
- 70:714c33487aae
- Parent:
- 69:65665afbad5d
- Child:
- 72:895ca792c647
versao mais estavel conseguindo fazer ligacoes e tratando telemetria e inicio do protocolo do bl, ainda em valida??o
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
klauss | 0:4d17cd9c8f9d | 1 | #include "vz_protocol.h" |
Cola | 23:4a6d631a6298 | 2 | #include "prompt.h" |
klauss | 48:195c97f12e8e | 3 | #include "debug.h" |
klauss | 0:4d17cd9c8f9d | 4 | |
klauss | 70:714c33487aae | 5 | //extern DigitalOut led2; |
klauss | 70:714c33487aae | 6 | //extern DigitalOut led4; |
Cola | 20:2d6ab23956e5 | 7 | |
Cola | 20:2d6ab23956e5 | 8 | uint16_t pkg_ckserr = 0; |
Cola | 20:2d6ab23956e5 | 9 | uint16_t pkg_cksok = 0; |
klauss | 0:4d17cd9c8f9d | 10 | |
klauss | 34:f19d9735428e | 11 | uint8_t * __parse_vz_pkg__( int * ext, int * port, volatile uint8_t * type, uint8_t * cb_buffer ){ |
klauss | 0:4d17cd9c8f9d | 12 | uint8_t p_lsb, p_msb; |
klauss | 0:4d17cd9c8f9d | 13 | uint8_t e_lsb, e_msb; |
klauss | 0:4d17cd9c8f9d | 14 | |
klauss | 0:4d17cd9c8f9d | 15 | if( cb_buffer == NULL ) return( NULL ); |
klauss | 0:4d17cd9c8f9d | 16 | |
klauss | 58:af7e8788f106 | 17 | /* |
klauss | 58:af7e8788f106 | 18 | if( cb_buffer[ 6 ] == __TELEMETRY__ ){ |
klauss | 58:af7e8788f106 | 19 | if( debug_telemetry ){ |
klauss | 58:af7e8788f106 | 20 | pc.printf("\n\r Original package\n\r"); |
klauss | 58:af7e8788f106 | 21 | pc.printf("\n\r 1. "); |
klauss | 58:af7e8788f106 | 22 | uint8_t count = 2; |
klauss | 58:af7e8788f106 | 23 | for( register int i = 0; i < __CB_BUFFER_SIZE__; i++ ){ |
klauss | 58:af7e8788f106 | 24 | if( i > 0 && !( i % 15 ) ) pc.printf("\n\r%2i. ", count++ ); |
klauss | 58:af7e8788f106 | 25 | pc.printf("%3x ", cb_buffer[ i ] ); |
klauss | 58:af7e8788f106 | 26 | } |
klauss | 58:af7e8788f106 | 27 | pc.printf("\n\r"); |
klauss | 58:af7e8788f106 | 28 | |
klauss | 58:af7e8788f106 | 29 | if( tcp_session ) tcp_client.send_all( ( char *)cb_buffer, __CB_BUFFER_SIZE__ ); |
klauss | 58:af7e8788f106 | 30 | } |
klauss | 58:af7e8788f106 | 31 | } |
klauss | 58:af7e8788f106 | 32 | */ |
klauss | 58:af7e8788f106 | 33 | |
klauss | 63:0d95da692bb4 | 34 | if( cb_buffer[ 6 ] == __FLOOD__ ){ |
klauss | 63:0d95da692bb4 | 35 | flood_counter++; |
Cola | 21:0bd688722e81 | 36 | static uint8_t flood_cnt = 0; |
Cola | 21:0bd688722e81 | 37 | static uint8_t first_run_flag = 0; |
Cola | 21:0bd688722e81 | 38 | static Timer t; |
Cola | 21:0bd688722e81 | 39 | if (first_run_flag == 0) { |
Cola | 21:0bd688722e81 | 40 | flood_cnt = cb_buffer[0]; |
Cola | 21:0bd688722e81 | 41 | first_run_flag++; |
Cola | 21:0bd688722e81 | 42 | t.start(); |
Cola | 21:0bd688722e81 | 43 | } else { |
Cola | 21:0bd688722e81 | 44 | if (cb_buffer[0] == 0x00){ |
Cola | 21:0bd688722e81 | 45 | pc.printf("%d", t.read_us()); |
klauss | 48:195c97f12e8e | 46 | if( tcp_session ){ |
klauss | 48:195c97f12e8e | 47 | char tmp[ 16 ]; |
klauss | 48:195c97f12e8e | 48 | sprintf( tmp, "%d", t.read_us() ); |
klauss | 48:195c97f12e8e | 49 | tcp_client.send_all( tmp, strlen( tmp ) ); |
Cola | 21:0bd688722e81 | 50 | } |
klauss | 48:195c97f12e8e | 51 | } |
Cola | 21:0bd688722e81 | 52 | flood_cnt++; |
Cola | 21:0bd688722e81 | 53 | while (flood_cnt != cb_buffer[0]) { |
Cola | 21:0bd688722e81 | 54 | pc.printf("0"); |
Cola | 21:0bd688722e81 | 55 | flood_cnt++; |
klauss | 48:195c97f12e8e | 56 | if( tcp_session ){ |
klauss | 48:195c97f12e8e | 57 | tcp_client.send_all( "0", strlen( "0" ) ); |
klauss | 48:195c97f12e8e | 58 | } |
Cola | 21:0bd688722e81 | 59 | } |
Cola | 21:0bd688722e81 | 60 | int i; |
Cola | 21:0bd688722e81 | 61 | int ok = 1; |
Cola | 21:0bd688722e81 | 62 | uint8_t cmp; |
Cola | 21:0bd688722e81 | 63 | for (i=0, cmp=cb_buffer[0]; (i<300) && (ok==1); i++, cmp++) { |
Cola | 21:0bd688722e81 | 64 | if (i != 6) { |
Cola | 21:0bd688722e81 | 65 | if (cb_buffer[i] != cmp) ok = 0; |
Cola | 21:0bd688722e81 | 66 | } |
Cola | 21:0bd688722e81 | 67 | } |
klauss | 48:195c97f12e8e | 68 | if( ok ){ |
Cola | 21:0bd688722e81 | 69 | pc.printf("+"); |
klauss | 48:195c97f12e8e | 70 | if( tcp_session ){ |
klauss | 48:195c97f12e8e | 71 | tcp_client.send_all( "+", strlen( "+" ) ); |
klauss | 48:195c97f12e8e | 72 | } |
klauss | 48:195c97f12e8e | 73 | }else{ |
Cola | 21:0bd688722e81 | 74 | pc.printf("%02x",cb_buffer[0] ); |
Cola | 21:0bd688722e81 | 75 | pc.printf("#"); |
Cola | 21:0bd688722e81 | 76 | pc.printf("\n\r"); |
klauss | 48:195c97f12e8e | 77 | if( tcp_session ){ |
klauss | 48:195c97f12e8e | 78 | char tmp[ 16 ]; |
klauss | 48:195c97f12e8e | 79 | sprintf( tmp, "%02x#\n\r", cb_buffer[ 0 ] ); |
klauss | 48:195c97f12e8e | 80 | tcp_client.send_all( tmp, strlen( tmp ) ); |
klauss | 48:195c97f12e8e | 81 | } |
klauss | 48:195c97f12e8e | 82 | for( int i = 0; i < 300 ; i++ ){ |
klauss | 48:195c97f12e8e | 83 | pc.printf("%x", cb_buffer[ i ]); |
klauss | 48:195c97f12e8e | 84 | if( tcp_session ){ |
klauss | 48:195c97f12e8e | 85 | char tmp[ 16 ]; |
klauss | 48:195c97f12e8e | 86 | sprintf( tmp, "%x", cb_buffer[ i ] ); |
klauss | 48:195c97f12e8e | 87 | tcp_client.send_all( tmp, strlen( tmp ) ); |
klauss | 48:195c97f12e8e | 88 | } |
klauss | 48:195c97f12e8e | 89 | } |
Cola | 21:0bd688722e81 | 90 | } |
Cola | 21:0bd688722e81 | 91 | } |
Cola | 21:0bd688722e81 | 92 | return( NULL ); |
Cola | 21:0bd688722e81 | 93 | } |
Cola | 21:0bd688722e81 | 94 | |
klauss | 0:4d17cd9c8f9d | 95 | uint16_t cc = ( uint16_t )cb_buffer[ 4 ] << 8 | cb_buffer[ 5 ]; |
klauss | 0:4d17cd9c8f9d | 96 | |
klauss | 18:01a93677e40c | 97 | if( cc != __checksum__( cb_buffer, __CB_BUFFER_SIZE__ ) ){ |
Cola | 20:2d6ab23956e5 | 98 | /*pc.printf("\n\r CKS ERROR: "); |
Cola | 20:2d6ab23956e5 | 99 | for (int i=0; i< 300; i++ ){ pc.printf("%x ", cb_buffer[i]); } |
Cola | 20:2d6ab23956e5 | 100 | pc.printf("\n\r");*/ |
Cola | 20:2d6ab23956e5 | 101 | pkg_ckserr++; |
klauss | 18:01a93677e40c | 102 | return( NULL ); |
Cola | 20:2d6ab23956e5 | 103 | |
klauss | 0:4d17cd9c8f9d | 104 | }else{ |
Cola | 20:2d6ab23956e5 | 105 | pkg_cksok++; |
klauss | 0:4d17cd9c8f9d | 106 | e_msb = cb_buffer[ 0 ]; |
klauss | 0:4d17cd9c8f9d | 107 | e_lsb = cb_buffer[ 1 ]; |
klauss | 0:4d17cd9c8f9d | 108 | *ext = e_msb << 8 | e_lsb; |
klauss | 0:4d17cd9c8f9d | 109 | |
klauss | 0:4d17cd9c8f9d | 110 | p_msb = cb_buffer[ 2 ]; |
klauss | 0:4d17cd9c8f9d | 111 | p_lsb = cb_buffer[ 3 ]; |
klauss | 0:4d17cd9c8f9d | 112 | *port = p_msb << 8 | p_lsb; |
klauss | 0:4d17cd9c8f9d | 113 | |
klauss | 0:4d17cd9c8f9d | 114 | *type = cb_buffer[ 6 ]; |
klauss | 0:4d17cd9c8f9d | 115 | |
klauss | 0:4d17cd9c8f9d | 116 | return( cb_buffer + __VZ_HEADER_OFFSET__ ); |
klauss | 0:4d17cd9c8f9d | 117 | } |
Cola | 20:2d6ab23956e5 | 118 | |
klauss | 0:4d17cd9c8f9d | 119 | } |
klauss | 0:4d17cd9c8f9d | 120 | uint8_t * __build_cb_package__( int ext, int port, uint8_t type, char * cb_buffer, uint8_t seq_num, int length, uint8_t * pkg ){ |
klauss | 0:4d17cd9c8f9d | 121 | pkg[ 0 ] = ( uint8_t )( ( ext & 0xFF00 ) >> 8 ); |
klauss | 0:4d17cd9c8f9d | 122 | pkg[ 1 ] = ( uint8_t )( ext & 0x00FF ); |
klauss | 0:4d17cd9c8f9d | 123 | pkg[ 2 ] = ( uint8_t )( ( port & 0xFF00 ) >> 8 ); |
klauss | 0:4d17cd9c8f9d | 124 | pkg[ 3 ] = ( uint8_t )( port & 0x00FF ); |
klauss | 0:4d17cd9c8f9d | 125 | |
klauss | 0:4d17cd9c8f9d | 126 | pkg[ 6 ] = type; |
klauss | 0:4d17cd9c8f9d | 127 | |
klauss | 0:4d17cd9c8f9d | 128 | size_t fill = 0x00; |
klauss | 0:4d17cd9c8f9d | 129 | |
klauss | 0:4d17cd9c8f9d | 130 | if( type == __AUDIO__ ){ |
klauss | 0:4d17cd9c8f9d | 131 | for( register int i = __VZ_HEADER_OFFSET__; i < length + __VZ_HEADER_OFFSET__; i++ ) |
klauss | 0:4d17cd9c8f9d | 132 | pkg[ i ] = ( uint8_t )cb_buffer[ i - __VZ_HEADER_OFFSET__ ]; |
klauss | 0:4d17cd9c8f9d | 133 | fill = length + __VZ_HEADER_OFFSET__; |
klauss | 0:4d17cd9c8f9d | 134 | }else if( type == __INVITE__ ){ |
klauss | 0:4d17cd9c8f9d | 135 | pkg[ 7 ] = seq_num; |
klauss | 0:4d17cd9c8f9d | 136 | //__print_clock__( pkg + 8 ); |
klauss | 0:4d17cd9c8f9d | 137 | pkg[ __TIMESLICE_PLACE__ ] = cb_buffer[ __TIMESLICE_PLACE__ ]; |
klauss | 0:4d17cd9c8f9d | 138 | fill = __TIMESLICE_PLACE__ + 1; |
klauss | 0:4d17cd9c8f9d | 139 | }else if( type == __REGISTRY__ || type == __BOOT__ ){ |
klauss | 0:4d17cd9c8f9d | 140 | pkg[ 7 ] = seq_num; |
klauss | 14:22a35f575502 | 141 | //__print_clock__( pkg + 8 ); |
klauss | 0:4d17cd9c8f9d | 142 | fill = __VZ_HEADER_OFFSET__ + __CLOCK_SYNC_SIZE__ + __SEQ_NUM_SIZE__; |
klauss | 70:714c33487aae | 143 | }else if( type == __CB_BYE__ ){ |
klauss | 0:4d17cd9c8f9d | 144 | pkg[ 7 ] = seq_num; |
klauss | 0:4d17cd9c8f9d | 145 | //__print_clock__( pkg + 8 ); |
klauss | 0:4d17cd9c8f9d | 146 | pkg[ __TIMESLICE_PLACE__ ] = cb_buffer[ __TIMESLICE_PLACE__ ]; |
klauss | 0:4d17cd9c8f9d | 147 | fill = __TIMESLICE_PLACE__ + 1; |
klauss | 67:cdedc64d9921 | 148 | }else if( type == __PROMPT__ ){ |
Cola | 21:0bd688722e81 | 149 | //__print_clock__( pkg + 8 ); |
Cola | 21:0bd688722e81 | 150 | xmemcpy((pkg+7), (uint8_t*)cb_buffer, 293); |
klauss | 67:cdedc64d9921 | 151 | //FIXME isso forca qualquer cmd ter < 100 chars |
Cola | 21:0bd688722e81 | 152 | fill = 100; |
klauss | 67:cdedc64d9921 | 153 | }else if( type == __TELEMETRY__ ){ |
klauss | 4:de46f0d9b14d | 154 | pkg[ 7 ] = seq_num; |
klauss | 14:22a35f575502 | 155 | //__print_clock__( pkg + 8 ); |
klauss | 4:de46f0d9b14d | 156 | pkg[ __TIMESLICE_PLACE__ ] = cb_buffer[ __TIMESLICE_PLACE__ ]; |
klauss | 4:de46f0d9b14d | 157 | fill = __TIMESLICE_PLACE__ + 1; |
klauss | 67:cdedc64d9921 | 158 | }else if( type == __BOOTLOADER_CBX__ ){ |
klauss | 67:cdedc64d9921 | 159 | pkg[ 7 ] = seq_num; |
klauss | 67:cdedc64d9921 | 160 | //__print_clock__( pkg + 8 ); |
klauss | 67:cdedc64d9921 | 161 | fill = __VZ_HEADER_OFFSET__ + __CLOCK_SYNC_SIZE__ + __SEQ_NUM_SIZE__; |
klauss | 67:cdedc64d9921 | 162 | }else{ |
klauss | 67:cdedc64d9921 | 163 | fill = __VZ_HEADER_OFFSET__; |
klauss | 0:4d17cd9c8f9d | 164 | } |
klauss | 0:4d17cd9c8f9d | 165 | |
klauss | 67:cdedc64d9921 | 166 | for( register uint16_t i = fill; i < __CB_BUFFER_SIZE__; i++ ) pkg[ i ] = 0x00; |
klauss | 0:4d17cd9c8f9d | 167 | |
klauss | 0:4d17cd9c8f9d | 168 | uint16_t cc = __checksum__( pkg, 300 ); |
klauss | 0:4d17cd9c8f9d | 169 | pkg[ 4 ] =( uint8_t )( ( cc & 0xFF00 ) >> 8) ; |
klauss | 0:4d17cd9c8f9d | 170 | pkg[ 5 ] =( uint8_t )( cc & 0x00FF ); |
klauss | 0:4d17cd9c8f9d | 171 | |
klauss | 0:4d17cd9c8f9d | 172 | return pkg; |
klauss | 0:4d17cd9c8f9d | 173 | } |
klauss | 0:4d17cd9c8f9d | 174 | |
klauss | 0:4d17cd9c8f9d | 175 | char * __build_eth__package__( void ){ |
klauss | 0:4d17cd9c8f9d | 176 | return( NULL ); |
klauss | 0:4d17cd9c8f9d | 177 | } |
klauss | 0:4d17cd9c8f9d | 178 | |
klauss | 0:4d17cd9c8f9d | 179 | uint8_t * __read_cb_buffer__( uint8_t * dest, uint8_t * src ){ |
klauss | 0:4d17cd9c8f9d | 180 | for( register int i = 0; i < __CB_BUFFER_SIZE__; i++ ) *dest++ = *src++; |
klauss | 0:4d17cd9c8f9d | 181 | return( dest ); |
klauss | 0:4d17cd9c8f9d | 182 | } |
klauss | 0:4d17cd9c8f9d | 183 | |
klauss | 0:4d17cd9c8f9d | 184 | uint8_t * __read_eth_buffer__( uint8_t * dest, uint8_t * src ){ |
klauss | 0:4d17cd9c8f9d | 185 | |
klauss | 0:4d17cd9c8f9d | 186 | for( register int i = 0; i < __ETH_BUFFER_SIZE__; i++ ) *dest++ = *src++; |
klauss | 0:4d17cd9c8f9d | 187 | |
klauss | 0:4d17cd9c8f9d | 188 | return( dest ); |
klauss | 0:4d17cd9c8f9d | 189 | } |
klauss | 0:4d17cd9c8f9d | 190 | |
klauss | 0:4d17cd9c8f9d | 191 | uint8_t * __write_cb_buffer__( uint8_t * dest, uint8_t * src ){ |
klauss | 0:4d17cd9c8f9d | 192 | for( register int i = 0; i < __CB_BUFFER_SIZE__; i++ ) *dest++ = *src++; |
klauss | 0:4d17cd9c8f9d | 193 | return( dest ); |
klauss | 0:4d17cd9c8f9d | 194 | } |
klauss | 0:4d17cd9c8f9d | 195 | |
klauss | 0:4d17cd9c8f9d | 196 | uint8_t * __write_eth_buffer__( uint8_t * dest, uint8_t * src ){ |
klauss | 0:4d17cd9c8f9d | 197 | for( register int i = 0; i < __ETH_BUFFER_SIZE__; i++ ) *dest++ = *src++; |
klauss | 0:4d17cd9c8f9d | 198 | |
klauss | 0:4d17cd9c8f9d | 199 | return( dest ); |
klauss | 0:4d17cd9c8f9d | 200 | } |
klauss | 0:4d17cd9c8f9d | 201 | |
klauss | 0:4d17cd9c8f9d | 202 | uint16_t __checksum__( uint8_t * buffer, size_t length ){ |
klauss | 70:714c33487aae | 203 | if( !buffer ) return( 0 ); |
klauss | 0:4d17cd9c8f9d | 204 | uint16_t cc = 0x00; |
klauss | 0:4d17cd9c8f9d | 205 | buffer[ 4 ] = buffer[ 5 ] = 0x5a; |
klauss | 0:4d17cd9c8f9d | 206 | for( register int i = 0; i < length; i++ ){ |
klauss | 0:4d17cd9c8f9d | 207 | cc += buffer[ i ]; |
klauss | 0:4d17cd9c8f9d | 208 | if( cc & BIT15 ){ |
klauss | 0:4d17cd9c8f9d | 209 | cc <<= 1; |
klauss | 0:4d17cd9c8f9d | 210 | cc |= BIT0; |
klauss | 0:4d17cd9c8f9d | 211 | }else{ cc <<= BIT0; } |
klauss | 0:4d17cd9c8f9d | 212 | } |
klauss | 0:4d17cd9c8f9d | 213 | cc ^= 0xffff; |
klauss | 0:4d17cd9c8f9d | 214 | return cc; |
klauss | 0:4d17cd9c8f9d | 215 | } |
klauss | 0:4d17cd9c8f9d | 216 | |
klauss | 0:4d17cd9c8f9d | 217 | void __print_clock__( uint8_t * buffer ){ |
klauss | 70:714c33487aae | 218 | if( !buffer ) return; |
klauss | 70:714c33487aae | 219 | |
klauss | 14:22a35f575502 | 220 | //int ntp_result = ntp.setTime( "200.192.232.8", 123, 3 ); |
klauss | 70:714c33487aae | 221 | //led2 = !led2; |
klauss | 0:4d17cd9c8f9d | 222 | struct tm ts; |
klauss | 46:a670f187a704 | 223 | //int ntp_result = ntp.setTime( "200.192.232.8" ); |
klauss | 63:0d95da692bb4 | 224 | //int ntp_result = ntp.setTime( "200.192.232.8", 123, 3 ); |
klauss | 63:0d95da692bb4 | 225 | //if( ntp_result == 0 ){ |
klauss | 14:22a35f575502 | 226 | time_t seconds; |
klauss | 14:22a35f575502 | 227 | // seconds = time(NULL); |
klauss | 14:22a35f575502 | 228 | time( &seconds ); |
klauss | 14:22a35f575502 | 229 | ts = *localtime( &seconds ); |
klauss | 63:0d95da692bb4 | 230 | //} |
klauss | 0:4d17cd9c8f9d | 231 | |
klauss | 0:4d17cd9c8f9d | 232 | int ano = ts.tm_year + 1900; |
klauss | 0:4d17cd9c8f9d | 233 | int mes = ts.tm_mon + 1; |
klauss | 0:4d17cd9c8f9d | 234 | int dia = ts.tm_mday; |
klauss | 0:4d17cd9c8f9d | 235 | int hora = ts.tm_hour - 3; |
klauss | 0:4d17cd9c8f9d | 236 | int min = ts.tm_min; |
klauss | 0:4d17cd9c8f9d | 237 | int sec = ts.tm_sec; |
klauss | 0:4d17cd9c8f9d | 238 | |
klauss | 0:4d17cd9c8f9d | 239 | buffer[ 0 ] = ano / 1000; |
klauss | 0:4d17cd9c8f9d | 240 | ano -= buffer[ 0 ] * 1000; |
klauss | 0:4d17cd9c8f9d | 241 | buffer[ 1 ] = ano / 100; |
klauss | 0:4d17cd9c8f9d | 242 | ano -= buffer[ 1 ]* 100; |
klauss | 0:4d17cd9c8f9d | 243 | buffer[ 2 ] = ano / 10; |
klauss | 0:4d17cd9c8f9d | 244 | ano -= buffer[ 2 ] * 10; |
klauss | 0:4d17cd9c8f9d | 245 | buffer[ 3 ] = ano; |
klauss | 0:4d17cd9c8f9d | 246 | buffer[ 4 ] = mes / 10; |
klauss | 0:4d17cd9c8f9d | 247 | buffer[ 5 ] = mes % 10; |
klauss | 0:4d17cd9c8f9d | 248 | buffer[ 6 ] = dia / 10; |
klauss | 0:4d17cd9c8f9d | 249 | buffer[ 7 ] = dia % 10; |
klauss | 0:4d17cd9c8f9d | 250 | buffer[ 8 ] = hora / 10; |
klauss | 0:4d17cd9c8f9d | 251 | buffer[ 9 ] = hora % 10; |
klauss | 0:4d17cd9c8f9d | 252 | buffer[ 10 ] = min / 10; |
klauss | 0:4d17cd9c8f9d | 253 | buffer[ 11 ] = min % 10; |
klauss | 0:4d17cd9c8f9d | 254 | buffer[ 12 ] = sec / 10; |
klauss | 0:4d17cd9c8f9d | 255 | buffer[ 13 ] = sec % 10; |
klauss | 0:4d17cd9c8f9d | 256 | |
klauss | 0:4d17cd9c8f9d | 257 | /* convertendo pro ascii do nro */ |
klauss | 0:4d17cd9c8f9d | 258 | for( register int i = 0; i < 14; i++ ) buffer[ i ] += 0x30; |
klauss | 70:714c33487aae | 259 | //led4 = !led4; |
klauss | 0:4d17cd9c8f9d | 260 | } |