Fixed function names
This commit is contained in:
		
							
								
								
									
										12
									
								
								sgp40.c
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								sgp40.c
									
									
									
									
									
								
							| @@ -132,7 +132,7 @@ int8_t sgp40_measure_raw_signal_compensated(uint16_t * voc_ticks, uint16_t relat | |||||||
| 	return SGP40_OK; | 	return SGP40_OK; | ||||||
| } | } | ||||||
|  |  | ||||||
| int8_t SGP40_execute_self_test ( uint8_t * test_result) | int8_t sgp40_execute_self_test ( uint8_t * test_result) | ||||||
| { | { | ||||||
| 	uint8_t buffer[16]; | 	uint8_t buffer[16]; | ||||||
| 	int8_t result; | 	int8_t result; | ||||||
| @@ -151,17 +151,17 @@ int8_t SGP40_execute_self_test ( uint8_t * test_result) | |||||||
| 		return SGP40_ERROR; | 		return SGP40_ERROR; | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	test_result = buffer[0]; | 	*test_result = buffer[0]; | ||||||
| 	uint8_t test_result_crc = buffer[2]; | 	uint8_t test_result_crc = buffer[2]; | ||||||
|  |  | ||||||
| 	uint8_t crc_correct = crc8_calculate(buffer, 2) == test_result_crc; | 	uint8_t crc_correct = sensirion_crc8_calculate(buffer, 2) == test_result_crc; | ||||||
| 	if (!crc_correct) { | 	if (!crc_correct) { | ||||||
| 		return SGP40_CRC8_ERROR; | 		return SGP40_CRC8_ERROR; | ||||||
| 	} | 	} | ||||||
| 	return SGP40_OK; | 	return SGP40_OK; | ||||||
| } | } | ||||||
|  |  | ||||||
| int8_t SGP40_get_serial_number(uint8_t serial[6]) | int8_t sgp40_get_serial_number(uint8_t serial[6]) | ||||||
| { | { | ||||||
| 	uint8_t buffer[16]; | 	uint8_t buffer[16]; | ||||||
|  |  | ||||||
| @@ -194,11 +194,11 @@ int8_t SGP40_get_serial_number(uint8_t serial[6]) | |||||||
| 	return SGP40_OK; | 	return SGP40_OK; | ||||||
| } | } | ||||||
|  |  | ||||||
| int8_t SGP40_turn_heater_off(void) | int8_t sgp40_turn_heater_off(void) | ||||||
| { | { | ||||||
| 	return sgp40_send_cmd(SGP40_TURN_HEATER_OFF); | 	return sgp40_send_cmd(SGP40_TURN_HEATER_OFF); | ||||||
| } | } | ||||||
| int8_t SGP40_soft_reset(void) | int8_t sgp40_soft_reset(void) | ||||||
| { | { | ||||||
| 	return sgp40_send_cmd(SGP40_SOFT_RESET); | 	return sgp40_send_cmd(SGP40_SOFT_RESET); | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Jan Mrna
					Jan Mrna