1818
1919 Notes:
2020 *The return type and parameters taken by each callback function are explained above in brackets.
21- *The receiveFunction return false if no byte is available. If a byte is available, it is stored in the byte passed as reference and it returns true.
21+ *The receiveFunction must return false if no byte is available. If a byte is available, it is stored in the byte passed as reference and it returns true.
2222 *If, for some reason, the K-line does not echo back the bytes received, full_duplex should be set to false even if the serial interface is capable of
2323 receiving while sending.
2424
3737 ||
3838 ||bool receiveFunction(uint8_t &data) {
3939 || if (Serial1.available()) {
40- || data = KLine .read();
40+ || data = Serial1 .read();
4141 || return true;
4242 || }
4343 || return false;
@@ -59,7 +59,7 @@ KLineKWP1281Lib::KLineKWP1281Lib(beginFunction_type beginFunction, endFunction_t
5959 KWP1281debugFunction(KWP1281debugFunction_type debug_function)
6060
6161 Parameters:
62- debug_function -> function to execute after receiving a KWP1281 message, to show it
62+ debug_function -> function to execute after sending/ receiving a KWP1281 message, to show it
6363
6464 Description:
6565 Attaches a function to be called for debugging KWP1281 messages.
@@ -110,13 +110,13 @@ void KLineKWP1281Lib::KWP1281debugFunction(KWP1281debugFunction_type debug_funct
110110
111111/* *
112112 Function:
113- custom5baudWaitFunction(function)
113+ custom5baudWaitFunction(callBack_type function)
114114
115115 Parameters:
116116 function -> routine to execute after sending each bit during the 5-baud-init procedure
117117
118118 Description:
119- Defines a custom function to execute while initializing the control module.
119+ Attaches a custom function to be executed while initializing the control module.
120120
121121 Notes:
122122 *To achieve a baud rate of 5, the custom function must take 200 milliseconds.
@@ -130,13 +130,13 @@ void KLineKWP1281Lib::custom5baudWaitFunction(callBack_type function)
130130
131131/* *
132132 Function:
133- customErrorFunction(function)
133+ customErrorFunction(callBack_type function)
134134
135135 Parameters:
136136 function -> routine to execute when a communication error occurs
137137
138138 Description:
139- Defines a custom function to execute if an error occurs.
139+ Attaches a custom function to be executed if an error occurs.
140140
141141 Notes:
142142 *It will be called once, after a timeout occurs while waiting for data.
@@ -809,7 +809,7 @@ KLineKWP1281Lib::executionStatus KLineKWP1281Lib::clearFaults()
809809
810810 Parameters:
811811 channel -> adaptation channel to read
812- & value -> will store the value read from the channel
812+ value -> will store the value read from the channel
813813
814814 Returns:
815815 executionStatus -> whether or not the operation executed successfully
@@ -852,7 +852,7 @@ KLineKWP1281Lib::executionStatus KLineKWP1281Lib::readAdaptation(uint8_t channel
852852
853853 Parameters:
854854 channel -> adaptation channel to test the value on
855- value -> value to test
855+ value -> value to test
856856
857857 Returns:
858858 executionStatus -> whether or not the operation executed successfully
@@ -901,8 +901,8 @@ KLineKWP1281Lib::executionStatus KLineKWP1281Lib::testAdaptation(uint8_t channel
901901 adapt(uint8_t channel, uint16_t value, uint32_t workshop_code)
902902
903903 Parameters:
904- channel -> adaptation channel to modify
905- value -> value to store in the channel
904+ channel -> adaptation channel to modify
905+ value -> value to store in the channel
906906 workshop_code -> WSC to use
907907
908908 Returns:
@@ -1218,7 +1218,7 @@ KLineKWP1281Lib::measurementType KLineKWP1281Lib::getMeasurementType(uint8_t mea
12181218 getMeasurementValue(uint8_t measurement_index, uint8_t amount_of_measurements, uint8_t measurement_buffer[], size_t measurement_buffer_size)
12191219
12201220 Parameters:
1221- measurement_index -> index of the measurement that needs to be calculated (0-4 )
1221+ measurement_index -> index of the measurement that needs to be calculated (0-3 )
12221222 amount_of_measurements -> total number of measurements stored in the array (value passed as reference to readGroup())
12231223 measurement_buffer[] -> array in which measurements have been stored by readGroup()
12241224 measurement_buffer_size -> total size of the given array (provided with the sizeof() operator)
@@ -1924,8 +1924,8 @@ char* KLineKWP1281Lib::getMeasurementUnits(uint8_t measurement_index, uint8_t am
19241924 readROM(uint8_t chunk_size, uint16_t start_address, uint8_t memory_buffer[], uint8_t memory_buffer_size)
19251925
19261926 Parameters:
1927- chunk_size -> how many bytes to read
1928- memory_buffer[] -> array into which to store the bytes read
1927+ chunk_size -> how many bytes to read
1928+ memory_buffer[] -> array into which to store the bytes read
19291929 memory_buffer_size -> total (maximum) length of the given array
19301930
19311931 Returns:
0 commit comments