From 6ca5f69a4d136ce57ce13e6647395ebdce197df4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20=C5=BDaitl=C3=ADk?= Date: Sun, 12 Jun 2022 19:06:29 +0200 Subject: [PATCH] renamed functions --- sht4x.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sht4x.c b/sht4x.c index feacac7..5c71424 100644 --- a/sht4x.c +++ b/sht4x.c @@ -14,15 +14,15 @@ /* TODO prejmenovat vsechny na sht4x_* */ /* I2C */ -int8_t i2c_transmit(uint8_t address, uint8_t *buffer, int len) __attribute__((weak)); -int8_t i2c_receive(uint8_t address, uint8_t *buffer, int len) __attribute__((weak)); +int8_t sht4x_i2c_transmit(uint8_t address, uint8_t *buffer, int len) __attribute__((weak)); +int8_t sht4x_i2c_receive(uint8_t address, uint8_t *buffer, int len) __attribute__((weak)); /* CRC */ uint8_t sensirion_crc8_calculate(const uint8_t *data, uint16_t count) __attribute__((weak)); /* Interrupts */ int8_t sht4x_disable_interrupts(void) __attribute__((weak)); int8_t sht4x_enable_interrupts(void) __attribute__((weak)); /* delay function */ -void sht4x_delay_ms(int delay_ms) __attribute__((weak)); +void delay_ms(int delay_ms) __attribute__((weak)); int8_t sht4x_send_cmd(sht4x_cmd_t cmd) { @@ -43,15 +43,15 @@ int8_t sht4x_measure(int16_t *temperature, uint16_t *relative_humidity) buffer[0] = SHT4X_START_MEAS_HIGH_PRECISION; /* disable interrupts to prevent modbus/i2c conflict */ sht4x_disable_interrupts(); - result = i2c_transmit(SHT4X_I2C_ADDRESS<<1, buffer, 1); + result = sht4x_i2c_transmit(SHT4X_I2C_ADDRESS<<1, buffer, 1); sht4x_enable_interrupts(); if (result != 0) { return SHT4X_ERROR; } - sht4x_delay_ms(10); /* 10 ms should be enough */ + delay_ms(10); /* 10 ms should be enough */ /* read out */ sht4x_disable_interrupts(); - result = i2c_receive(SHT4X_I2C_ADDRESS<<1, buffer, 6); + result = sht4x_i2c_receive(SHT4X_I2C_ADDRESS<<1, buffer, 6); sht4x_enable_interrupts(); if (result != 0) { return SHT4X_ERROR;