Skip to content

Commit

Permalink
lps22hh: fix
Browse files Browse the repository at this point in the history
Function
fix         _from_lsb_to_hpa
  • Loading branch information
albezanc committed May 16, 2019
1 parent e69570c commit a820a41
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lps22hh_STdC/driver/lps22hh_reg.c
Expand Up @@ -100,7 +100,7 @@ int32_t lps22hh_write_reg(lps22hh_ctx_t* ctx, uint8_t reg, uint8_t* data,
* @{
*
*/
float_t lps22hh_from_lsb_to_hpa(int16_t lsb)
float_t lps22hh_from_lsb_to_hpa(int32_t lsb)
{
return ( (float_t) lsb / 4096.0f );
}
Expand Down
2 changes: 1 addition & 1 deletion lps22hh_STdC/driver/lps22hh_reg.h
Expand Up @@ -317,7 +317,7 @@ int32_t lps22hh_read_reg(lps22hh_ctx_t *ctx, uint8_t reg, uint8_t* data,
int32_t lps22hh_write_reg(lps22hh_ctx_t *ctx, uint8_t reg, uint8_t* data,
uint16_t len);

extern float lps22hh_from_lsb_to_hpa(int16_t lsb);
extern float lps22hh_from_lsb_to_hpa(int32_t lsb);
extern float lps22hh_from_lsb_to_celsius(int16_t lsb);

int32_t lps22hh_autozero_rst_set(lps22hh_ctx_t *ctx, uint8_t val);
Expand Down
4 changes: 2 additions & 2 deletions lps22hh_STdC/example/read_data_simple.c
Expand Up @@ -37,7 +37,7 @@
/* Includes ------------------------------------------------------------------*/
#include "lps22hh_reg.h"
#include <string.h>

#include <stdio.h>
//#define MKI109V2
#define NUCLEO_STM32F411RE

Expand Down Expand Up @@ -173,7 +173,7 @@ void example_main(void)
lps22hh_ctx_t dev_ctx;
dev_ctx.write_reg = platform_write;
dev_ctx.read_reg = platform_read;
dev_ctx.handle = &hspi2;
dev_ctx.handle = &hi2c1;
/*
* Check device ID
*/
Expand Down

0 comments on commit a820a41

Please sign in to comment.