add i2c_config

This commit is contained in:
2024-09-27 00:12:13 +08:00
parent 9d7d0935ba
commit 9ce4cd2e44
7 changed files with 188 additions and 52 deletions

View File

@@ -5,4 +5,7 @@
#ifndef MLX90614_H
#define MLX90614_H
void i2c_config(void);
int read_ir_mlx90614(void);
#endif //MLX90614_H

View File

@@ -24,6 +24,6 @@ void delay_ms(uint32_t count);
/* delay a time in microseconds */
void delay_us(uint32_t count);
void delay_nop(void);
void delay_5_nop(void);
#endif /* SYS_TICK_H */

View File

@@ -11,11 +11,11 @@
// #define POWER_SUPPLY_24V
#ifdef POWER_SUPPLY_12V
#define TIME_CORRECTION_US 250
#define CAPTURE_VALUE_MAX 515
#define TIME_CORRECTION_US 250
#define CAPTURE_VALUE_MAX 515
#elif defined(POWER_SUPPLY_24V)
#define TIME_CORRECTION_US 230
#define CAPTURE_VALUE_MAX 550
#define TIME_CORRECTION_US 230
#define CAPTURE_VALUE_MAX 550
#else
#error "Please define either POWER_SUPPLY_12V or POWER_SUPPLY_24V"
#endif