OBD Source Code -Section 1- Without Car / Section 2 - With car
Dependencies: mbed
obd_libraries.cpp@0:e36d80703ed0, 2017-02-27 (annotated)
- Committer:
- bala0x07
- Date:
- Mon Feb 27 06:12:23 2017 +0000
- Revision:
- 0:e36d80703ed0
- Child:
- 1:c23c05b36e33
Before Adding VIN & DTC
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| bala0x07 | 0:e36d80703ed0 | 1 | #include "mbed.h" |
| bala0x07 | 0:e36d80703ed0 | 2 | #include "obd_libraries.h" |
| bala0x07 | 0:e36d80703ed0 | 3 | #include "common_definitions.h" |
| bala0x07 | 0:e36d80703ed0 | 4 | |
| bala0x07 | 0:e36d80703ed0 | 5 | Serial pco(USBTX, USBRX); |
| bala0x07 | 0:e36d80703ed0 | 6 | Serial OBD_UART(PA_0, PA_1); |
| bala0x07 | 0:e36d80703ed0 | 7 | |
| bala0x07 | 0:e36d80703ed0 | 8 | char pass = 0; |
| bala0x07 | 0:e36d80703ed0 | 9 | char reception_complete = 0; |
| bala0x07 | 0:e36d80703ed0 | 10 | |
| bala0x07 | 0:e36d80703ed0 | 11 | char obd_reset_cmd[] = "ATZ\r"; |
| bala0x07 | 0:e36d80703ed0 | 12 | char battery_voltage_cmd[] = "ATRV\r"; |
| bala0x07 | 0:e36d80703ed0 | 13 | char protocol_auto_detect_cmd[] = "ATSP0\r"; |
| bala0x07 | 0:e36d80703ed0 | 14 | char read_CAN_protocol_cmd[] = "ATDPN\r"; |
| bala0x07 | 0:e36d80703ed0 | 15 | char allow_long_cmd[] = "ATAL\r"; |
| bala0x07 | 0:e36d80703ed0 | 16 | char engine_rpm_cmd[] = "010C\r"; |
| bala0x07 | 0:e36d80703ed0 | 17 | char vehicle_speed_cmd[] = "010D\r"; |
| bala0x07 | 0:e36d80703ed0 | 18 | char vin_number_cmd[] = "0902 5\r"; |
| bala0x07 | 0:e36d80703ed0 | 19 | |
| bala0x07 | 0:e36d80703ed0 | 20 | float car_battery_voltage; |
| bala0x07 | 0:e36d80703ed0 | 21 | long vehicle_speed; |
| bala0x07 | 0:e36d80703ed0 | 22 | char OBD_UART_RX_Buffer[50]; |
| bala0x07 | 0:e36d80703ed0 | 23 | extern char OBD_RxBuffer_End_Pos; |
| bala0x07 | 0:e36d80703ed0 | 24 | //char OBD_UART_RX_Size = 50; |
| bala0x07 | 0:e36d80703ed0 | 25 | |
| bala0x07 | 0:e36d80703ed0 | 26 | |
| bala0x07 | 0:e36d80703ed0 | 27 | //Serial pco(USBTX, USBRX); |
| bala0x07 | 0:e36d80703ed0 | 28 | //Serial OBD_UART(PA_0, PA_1); |
| bala0x07 | 0:e36d80703ed0 | 29 | |
| bala0x07 | 0:e36d80703ed0 | 30 | void OBD_onDataRx() |
| bala0x07 | 0:e36d80703ed0 | 31 | { |
| bala0x07 | 0:e36d80703ed0 | 32 | //pcm.printf("\r\n ENTERED \r\n"); |
| bala0x07 | 0:e36d80703ed0 | 33 | if(OBD_UART.readable()) { |
| bala0x07 | 0:e36d80703ed0 | 34 | |
| bala0x07 | 0:e36d80703ed0 | 35 | pco.putc(OBD_UART_RX_Buffer[OBD_RxBuffer_End_Pos++] = OBD_UART.getc()); |
| bala0x07 | 0:e36d80703ed0 | 36 | /* |
| bala0x07 | 0:e36d80703ed0 | 37 | if(OBD_RxBuffer_End_Pos >= OBD_UART_RX_Size) { |
| bala0x07 | 0:e36d80703ed0 | 38 | // BUFFER OVERFLOW. What goes here depends on how you want to cope with that situation. |
| bala0x07 | 0:e36d80703ed0 | 39 | // For now just throw everything away. |
| bala0x07 | 0:e36d80703ed0 | 40 | OBD_RxBuffer_End_Pos = 0; |
| bala0x07 | 0:e36d80703ed0 | 41 | } |
| bala0x07 | 0:e36d80703ed0 | 42 | */ |
| bala0x07 | 0:e36d80703ed0 | 43 | } |
| bala0x07 | 0:e36d80703ed0 | 44 | } |
| bala0x07 | 0:e36d80703ed0 | 45 | |
| bala0x07 | 0:e36d80703ed0 | 46 | |
| bala0x07 | 0:e36d80703ed0 | 47 | //************************************************************************************************************************ |
| bala0x07 | 0:e36d80703ed0 | 48 | |
| bala0x07 | 0:e36d80703ed0 | 49 | void received_data_verification(char *rcv_data_pointer, char *ref_data_pointer, char num) |
| bala0x07 | 0:e36d80703ed0 | 50 | { |
| bala0x07 | 0:e36d80703ed0 | 51 | char dummy_data[num], count; |
| bala0x07 | 0:e36d80703ed0 | 52 | for(count = 0; count < num; count++) |
| bala0x07 | 0:e36d80703ed0 | 53 | { |
| bala0x07 | 0:e36d80703ed0 | 54 | pco.putc(*rcv_data_pointer); |
| bala0x07 | 0:e36d80703ed0 | 55 | if(*rcv_data_pointer++ == *ref_data_pointer++) |
| bala0x07 | 0:e36d80703ed0 | 56 | pass = 1; |
| bala0x07 | 0:e36d80703ed0 | 57 | else |
| bala0x07 | 0:e36d80703ed0 | 58 | { |
| bala0x07 | 0:e36d80703ed0 | 59 | pass = 0; |
| bala0x07 | 0:e36d80703ed0 | 60 | return; |
| bala0x07 | 0:e36d80703ed0 | 61 | } |
| bala0x07 | 0:e36d80703ed0 | 62 | } |
| bala0x07 | 0:e36d80703ed0 | 63 | } |
| bala0x07 | 0:e36d80703ed0 | 64 | |
| bala0x07 | 0:e36d80703ed0 | 65 | //************************************************************************************************************************ |
| bala0x07 | 0:e36d80703ed0 | 66 | /* |
| bala0x07 | 0:e36d80703ed0 | 67 | char* copy_characters(char *copy_char_pointer, char start_position, char end_position) |
| bala0x07 | 0:e36d80703ed0 | 68 | { |
| bala0x07 | 0:e36d80703ed0 | 69 | char total_num; |
| bala0x07 | 0:e36d80703ed0 | 70 | char count; |
| bala0x07 | 0:e36d80703ed0 | 71 | total_num = end_position - start_position; |
| bala0x07 | 0:e36d80703ed0 | 72 | char copied_data[total_num]; |
| bala0x07 | 0:e36d80703ed0 | 73 | copy_char_pointer += start_position; |
| bala0x07 | 0:e36d80703ed0 | 74 | |
| bala0x07 | 0:e36d80703ed0 | 75 | for(count = 0; count < total_num; count++) |
| bala0x07 | 0:e36d80703ed0 | 76 | { |
| bala0x07 | 0:e36d80703ed0 | 77 | copied_data[count] = *copy_char_pointer++; |
| bala0x07 | 0:e36d80703ed0 | 78 | } |
| bala0x07 | 0:e36d80703ed0 | 79 | |
| bala0x07 | 0:e36d80703ed0 | 80 | pco.printf("\r\n%s", copied_data); |
| bala0x07 | 0:e36d80703ed0 | 81 | |
| bala0x07 | 0:e36d80703ed0 | 82 | copy_char_pointer = copied_data; // Shifting the pointer to copied_data array |
| bala0x07 | 0:e36d80703ed0 | 83 | |
| bala0x07 | 0:e36d80703ed0 | 84 | return copy_char_pointer; |
| bala0x07 | 0:e36d80703ed0 | 85 | } |
| bala0x07 | 0:e36d80703ed0 | 86 | */ |
| bala0x07 | 0:e36d80703ed0 | 87 | |
| bala0x07 | 0:e36d80703ed0 | 88 | |
| bala0x07 | 0:e36d80703ed0 | 89 | //************************************************************************************************************************ |
| bala0x07 | 0:e36d80703ed0 | 90 | |
| bala0x07 | 0:e36d80703ed0 | 91 | void process_battery_voltage(char *battery_voltage_pointer) |
| bala0x07 | 0:e36d80703ed0 | 92 | { |
| bala0x07 | 0:e36d80703ed0 | 93 | char battery_voltage_data[4]; // One decimal point precision ( For ex : 12.5 ) |
| bala0x07 | 0:e36d80703ed0 | 94 | char count; |
| bala0x07 | 0:e36d80703ed0 | 95 | battery_voltage_pointer += 5; // ATRV<CR> counts to 5 |
| bala0x07 | 0:e36d80703ed0 | 96 | for(count = 0; count < 4; count++) |
| bala0x07 | 0:e36d80703ed0 | 97 | { |
| bala0x07 | 0:e36d80703ed0 | 98 | battery_voltage_data[count] = *battery_voltage_pointer++; |
| bala0x07 | 0:e36d80703ed0 | 99 | } |
| bala0x07 | 0:e36d80703ed0 | 100 | car_battery_voltage = atof(battery_voltage_data); // Converts the Battery Volatge from String to Float data type |
| bala0x07 | 0:e36d80703ed0 | 101 | |
| bala0x07 | 0:e36d80703ed0 | 102 | printf("\r\nCAR BATTERY VOLTAGE = %f",car_battery_voltage); |
| bala0x07 | 0:e36d80703ed0 | 103 | } |
| bala0x07 | 0:e36d80703ed0 | 104 | |
| bala0x07 | 0:e36d80703ed0 | 105 | //************************************************************************************************************************ |
| bala0x07 | 0:e36d80703ed0 | 106 | |
| bala0x07 | 0:e36d80703ed0 | 107 | void process_vehicle_speed(char *vehicle_speed_pointer) |
| bala0x07 | 0:e36d80703ed0 | 108 | { |
| bala0x07 | 0:e36d80703ed0 | 109 | char vehicle_speed_data[2]; // Vehicle speed data is returned by a 2 byte value |
| bala0x07 | 0:e36d80703ed0 | 110 | char *strtol_pointer; |
| bala0x07 | 0:e36d80703ed0 | 111 | char count; |
| bala0x07 | 0:e36d80703ed0 | 112 | //"010D\r41 0D 4F\r\r>" |
| bala0x07 | 0:e36d80703ed0 | 113 | vehicle_speed_pointer += 11; |
| bala0x07 | 0:e36d80703ed0 | 114 | for(count = 0; count < 2; count++) |
| bala0x07 | 0:e36d80703ed0 | 115 | { |
| bala0x07 | 0:e36d80703ed0 | 116 | vehicle_speed_data[count] = *vehicle_speed_pointer++; |
| bala0x07 | 0:e36d80703ed0 | 117 | } |
| bala0x07 | 0:e36d80703ed0 | 118 | |
| bala0x07 | 0:e36d80703ed0 | 119 | vehicle_speed = strtol(vehicle_speed_data, &strtol_pointer, 16); |
| bala0x07 | 0:e36d80703ed0 | 120 | |
| bala0x07 | 0:e36d80703ed0 | 121 | printf("\r\nVEHICLE SPEED = %ld\r\n", vehicle_speed); |
| bala0x07 | 0:e36d80703ed0 | 122 | } |
| bala0x07 | 0:e36d80703ed0 | 123 | |
| bala0x07 | 0:e36d80703ed0 | 124 | //************************************************************************************************************************ |
| bala0x07 | 0:e36d80703ed0 | 125 | |
| bala0x07 | 0:e36d80703ed0 | 126 | |
| bala0x07 | 0:e36d80703ed0 | 127 | void fetch_battery_voltage() |
| bala0x07 | 0:e36d80703ed0 | 128 | { |
| bala0x07 | 0:e36d80703ed0 | 129 | OBD_UART.printf(battery_voltage_cmd); |
| bala0x07 | 0:e36d80703ed0 | 130 | wait(1); |
| bala0x07 | 0:e36d80703ed0 | 131 | while(!(OBD_UART_RX_Buffer[OBD_RxBuffer_End_Pos-1] == '>')); // Waits here until the reception complete flag has been enabled |
| bala0x07 | 0:e36d80703ed0 | 132 | pco.printf("Reception Complete\r\n"); |
| bala0x07 | 0:e36d80703ed0 | 133 | received_data_verification(OBD_UART_RX_Buffer, battery_voltage_cmd, (strlen(battery_voltage_cmd)-1)); |
| bala0x07 | 0:e36d80703ed0 | 134 | |
| bala0x07 | 0:e36d80703ed0 | 135 | process_battery_voltage(OBD_UART_RX_Buffer); |
| bala0x07 | 0:e36d80703ed0 | 136 | |
| bala0x07 | 0:e36d80703ed0 | 137 | if(pass == 1) |
| bala0x07 | 0:e36d80703ed0 | 138 | printf("\r\nOBD READ BATTERY VOLTAGE SUCCESSFUL \r\n\r\n"); |
| bala0x07 | 0:e36d80703ed0 | 139 | else |
| bala0x07 | 0:e36d80703ed0 | 140 | printf("\r\nOBD READ BATTERY VOLTAGE FAILED \r\n\r\n"); |
| bala0x07 | 0:e36d80703ed0 | 141 | reception_complete = 0; // Disabling the reception complete flag |
| bala0x07 | 0:e36d80703ed0 | 142 | OBD_RxBuffer_End_Pos = 0; // Rx Buffer will be overwritten in the next data reception |
| bala0x07 | 0:e36d80703ed0 | 143 | } |
| bala0x07 | 0:e36d80703ed0 | 144 | |
| bala0x07 | 0:e36d80703ed0 | 145 | //************************************************************************************************************************ |
| bala0x07 | 0:e36d80703ed0 | 146 | |
| bala0x07 | 0:e36d80703ed0 | 147 | void fetch_vehicle_speed() |
| bala0x07 | 0:e36d80703ed0 | 148 | { |
| bala0x07 | 0:e36d80703ed0 | 149 | char virtual_rx_speed_buffer[] = "010D\r41 0D 4F\r\r>"; |
| bala0x07 | 0:e36d80703ed0 | 150 | /* |
| bala0x07 | 0:e36d80703ed0 | 151 | OBD_UART.printf(vehicle_speed_cmd); |
| bala0x07 | 0:e36d80703ed0 | 152 | wait(1); |
| bala0x07 | 0:e36d80703ed0 | 153 | while(!(OBD_UART_RX_Buffer[OBD_RxBuffer_End_Pos-1] == '>')); // Waits here until the reception complete flag has been enabled |
| bala0x07 | 0:e36d80703ed0 | 154 | pco.printf("Reception Complete\r\n"); |
| bala0x07 | 0:e36d80703ed0 | 155 | received_data_verification(OBD_UART_RX_Buffer, allow_long_cmd, (strlen(vehicle_speed_cmd)-1)); |
| bala0x07 | 0:e36d80703ed0 | 156 | */ |
| bala0x07 | 0:e36d80703ed0 | 157 | process_vehicle_speed(virtual_rx_speed_buffer); |
| bala0x07 | 0:e36d80703ed0 | 158 | |
| bala0x07 | 0:e36d80703ed0 | 159 | if(pass == 1) |
| bala0x07 | 0:e36d80703ed0 | 160 | printf("\r\VEHICLE SPEED DATA RECEIVED SUCCESSFULLY \r\n\r\n"); |
| bala0x07 | 0:e36d80703ed0 | 161 | else |
| bala0x07 | 0:e36d80703ed0 | 162 | printf("\r\nVEHICLE SPEED DATA RECEPTION FAILED\r\n\r\n"); |
| bala0x07 | 0:e36d80703ed0 | 163 | reception_complete = 0; // Disabling the reception complete flag |
| bala0x07 | 0:e36d80703ed0 | 164 | OBD_RxBuffer_End_Pos = 0; // Rx Buffer will be overwritten in the next data reception |
| bala0x07 | 0:e36d80703ed0 | 165 | |
| bala0x07 | 0:e36d80703ed0 | 166 | } |
| bala0x07 | 0:e36d80703ed0 | 167 | |
| bala0x07 | 0:e36d80703ed0 | 168 | //************************************************************************************************************************ |
| bala0x07 | 0:e36d80703ed0 | 169 | /* |
| bala0x07 | 0:e36d80703ed0 | 170 | void fetch_vin_number() |
| bala0x07 | 0:e36d80703ed0 | 171 | { |
| bala0x07 | 0:e36d80703ed0 | 172 | char virtual_rx_vin_buffer[] = "0902 5\r014 \r0: 49 02 01 54 4D 42 \r1: 46 4B 4A 35 4A 32 43 \r2: 47 30 31 34 37 33 33 \r\r>"; |
| bala0x07 | 0:e36d80703ed0 | 173 | */ |
| bala0x07 | 0:e36d80703ed0 | 174 | |
| bala0x07 | 0:e36d80703ed0 | 175 | /* |
| bala0x07 | 0:e36d80703ed0 | 176 | Chassis Number : TMBFKJ5J2CG014733 |
| bala0x07 | 0:e36d80703ed0 | 177 | |
| bala0x07 | 0:e36d80703ed0 | 178 | [TX] - 0902 5<CR> |
| bala0x07 | 0:e36d80703ed0 | 179 | |
| bala0x07 | 0:e36d80703ed0 | 180 | [RX] - 0902 5<CR> |
| bala0x07 | 0:e36d80703ed0 | 181 | 014 <CR> |
| bala0x07 | 0:e36d80703ed0 | 182 | 0: 49 02 01 54 4D 42 <CR> |
| bala0x07 | 0:e36d80703ed0 | 183 | 1: 46 4B 4A 35 4A 32 43 <CR> |
| bala0x07 | 0:e36d80703ed0 | 184 | 2: 47 30 31 34 37 33 33 <CR> |
| bala0x07 | 0:e36d80703ed0 | 185 | <CR> |
| bala0x07 | 0:e36d80703ed0 | 186 | > |
| bala0x07 | 0:e36d80703ed0 | 187 | */ |
| bala0x07 | 0:e36d80703ed0 | 188 | /* |
| bala0x07 | 0:e36d80703ed0 | 189 | OBD_UART.printf(vin_number_cmd); |
| bala0x07 | 0:e36d80703ed0 | 190 | wait(1); |
| bala0x07 | 0:e36d80703ed0 | 191 | while(!(OBD_UART_RX_Buffer[OBD_RxBuffer_End_Pos-1] == '>')); // Waits here until the reception complete flag has been enabled |
| bala0x07 | 0:e36d80703ed0 | 192 | pco.printf("Reception Complete\r\n"); |
| bala0x07 | 0:e36d80703ed0 | 193 | received_data_verification(OBD_UART_RX_Buffer, allow_long_cmd, (strlen(vin_number_cmd)-1)); |
| bala0x07 | 0:e36d80703ed0 | 194 | */ |
| bala0x07 | 0:e36d80703ed0 | 195 | |
| bala0x07 | 0:e36d80703ed0 | 196 | //************************************************************************************************************************ |
| bala0x07 | 0:e36d80703ed0 | 197 | /* |
| bala0x07 | 0:e36d80703ed0 | 198 | void check_for_dtc() |
| bala0x07 | 0:e36d80703ed0 | 199 | { |
| bala0x07 | 0:e36d80703ed0 | 200 | */ |
| bala0x07 | 0:e36d80703ed0 | 201 | |
| bala0x07 | 0:e36d80703ed0 | 202 | //************************************************************************************************************************ |
| bala0x07 | 0:e36d80703ed0 | 203 | |
| bala0x07 | 0:e36d80703ed0 | 204 | void initialize_obd() |
| bala0x07 | 0:e36d80703ed0 | 205 | { |
| bala0x07 | 0:e36d80703ed0 | 206 | char data[3]; |
| bala0x07 | 0:e36d80703ed0 | 207 | char *data_pointer; |
| bala0x07 | 0:e36d80703ed0 | 208 | |
| bala0x07 | 0:e36d80703ed0 | 209 | data_pointer = data; |
| bala0x07 | 0:e36d80703ed0 | 210 | |
| bala0x07 | 0:e36d80703ed0 | 211 | pco.baud(38400); |
| bala0x07 | 0:e36d80703ed0 | 212 | OBD_UART.baud(38400); |
| bala0x07 | 0:e36d80703ed0 | 213 | |
| bala0x07 | 0:e36d80703ed0 | 214 | OBD_UART.attach(&OBD_onDataRx); |
| bala0x07 | 0:e36d80703ed0 | 215 | |
| bala0x07 | 0:e36d80703ed0 | 216 | OBD_UART.printf("%s",obd_reset_cmd); |
| bala0x07 | 0:e36d80703ed0 | 217 | |
| bala0x07 | 0:e36d80703ed0 | 218 | wait(1); |
| bala0x07 | 0:e36d80703ed0 | 219 | |
| bala0x07 | 0:e36d80703ed0 | 220 | /* |
| bala0x07 | 0:e36d80703ed0 | 221 | pco.printf("Reception not completed"); |
| bala0x07 | 0:e36d80703ed0 | 222 | pco.printf("\r\n%d",OBD_RxBuffer_End_Pos); |
| bala0x07 | 0:e36d80703ed0 | 223 | pco.printf("\r\n%c",OBD_UART_RX_Buffer[OBD_RxBuffer_End_Pos-1]); |
| bala0x07 | 0:e36d80703ed0 | 224 | */ |
| bala0x07 | 0:e36d80703ed0 | 225 | |
| bala0x07 | 0:e36d80703ed0 | 226 | while(!(OBD_UART_RX_Buffer[OBD_RxBuffer_End_Pos-1] == '>')); // Waits here until the reception complete flag has been enabled |
| bala0x07 | 0:e36d80703ed0 | 227 | pco.printf("Reception Complete\r\n"); |
| bala0x07 | 0:e36d80703ed0 | 228 | received_data_verification(OBD_UART_RX_Buffer, obd_reset_cmd, (strlen(obd_reset_cmd)-1)); |
| bala0x07 | 0:e36d80703ed0 | 229 | |
| bala0x07 | 0:e36d80703ed0 | 230 | if(pass == 1) |
| bala0x07 | 0:e36d80703ed0 | 231 | printf("\r\nOBD RESET SUCCESSFUL \r\n\r\n"); |
| bala0x07 | 0:e36d80703ed0 | 232 | else |
| bala0x07 | 0:e36d80703ed0 | 233 | printf("\r\nOBD RESET FAILED \r\n\r\n"); |
| bala0x07 | 0:e36d80703ed0 | 234 | |
| bala0x07 | 0:e36d80703ed0 | 235 | reception_complete = 0; // Disabling the reception complete flag |
| bala0x07 | 0:e36d80703ed0 | 236 | OBD_RxBuffer_End_Pos = 0; // Rx Buffer will be overwritten in the next data reception |
| bala0x07 | 0:e36d80703ed0 | 237 | |
| bala0x07 | 0:e36d80703ed0 | 238 | //-------------------------------------------------------------------------------------------------------------------------- |
| bala0x07 | 0:e36d80703ed0 | 239 | |
| bala0x07 | 0:e36d80703ed0 | 240 | OBD_UART.printf(allow_long_cmd); |
| bala0x07 | 0:e36d80703ed0 | 241 | wait(1); |
| bala0x07 | 0:e36d80703ed0 | 242 | while(!(OBD_UART_RX_Buffer[OBD_RxBuffer_End_Pos-1] == '>')); // Waits here until the reception complete flag has been enabled |
| bala0x07 | 0:e36d80703ed0 | 243 | pco.printf("Reception Complete\r\n"); |
| bala0x07 | 0:e36d80703ed0 | 244 | received_data_verification(OBD_UART_RX_Buffer, allow_long_cmd, (strlen(allow_long_cmd)-1)); |
| bala0x07 | 0:e36d80703ed0 | 245 | |
| bala0x07 | 0:e36d80703ed0 | 246 | if(pass == 1) |
| bala0x07 | 0:e36d80703ed0 | 247 | printf("\r\nLONG DATA RECEPTION ENABLED SUCCESSFULLY \r\n\r\n"); |
| bala0x07 | 0:e36d80703ed0 | 248 | else |
| bala0x07 | 0:e36d80703ed0 | 249 | printf("\r\nLONG DATA RECEPTION ENABLING FAILED\r\n\r\n"); |
| bala0x07 | 0:e36d80703ed0 | 250 | reception_complete = 0; // Disabling the reception complete flag |
| bala0x07 | 0:e36d80703ed0 | 251 | OBD_RxBuffer_End_Pos = 0; // Rx Buffer will be overwritten in the next data reception |
| bala0x07 | 0:e36d80703ed0 | 252 | |
| bala0x07 | 0:e36d80703ed0 | 253 | } |
| bala0x07 | 0:e36d80703ed0 | 254 | |
| bala0x07 | 0:e36d80703ed0 | 255 | //************************************************************************************************************************ |
| bala0x07 | 0:e36d80703ed0 | 256 | |
| bala0x07 | 0:e36d80703ed0 | 257 | |
| bala0x07 | 0:e36d80703ed0 | 258 | |
| bala0x07 | 0:e36d80703ed0 | 259 |