From c795fdee216c0a5bd3c3e319d23632c266c8b4fc Mon Sep 17 00:00:00 2001 From: Jan Mrna Date: Fri, 17 Jun 2022 10:30:37 +0200 Subject: [PATCH] Fixed function names --- sgp40.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sgp40.c b/sgp40.c index 09f20e6..3fd38f3 100644 --- a/sgp40.c +++ b/sgp40.c @@ -132,7 +132,7 @@ int8_t sgp40_measure_raw_signal_compensated(uint16_t * voc_ticks, uint16_t relat 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]; int8_t result; @@ -151,17 +151,17 @@ int8_t SGP40_execute_self_test ( uint8_t * test_result) return SGP40_ERROR; } - test_result = buffer[0]; + *test_result = buffer[0]; 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) { return SGP40_CRC8_ERROR; } 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]; @@ -194,11 +194,11 @@ int8_t SGP40_get_serial_number(uint8_t serial[6]) 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); } -int8_t SGP40_soft_reset(void) +int8_t sgp40_soft_reset(void) { return sgp40_send_cmd(SGP40_SOFT_RESET); }