42#define CHIP_NAME "Maxim Integrated MAX6675"
43#define MANUFACTURER_NAME "Maxim Integrated"
44#define SUPPLY_VOLTAGE_MIN 3.0f
45#define SUPPLY_VOLTAGE_MAX 5.5f
46#define MAX_CURRENT 1.5f
47#define TEMPERATURE_MIN -20.0f
48#define TEMPERATURE_MAX 85.0f
49#define DRIVER_VERSION 1000
70 *data = (((uint16_t)buf[0]) << 8) | buf[1];
100 handle->
debug_print(
"max6675: spi_init is null.\n");
106 handle->
debug_print(
"max6675: spi_deinit is null.\n");
112 handle->
debug_print(
"max6675: spi_read_cmd is null.\n");
118 handle->
debug_print(
"max6675: delay_ms is null.\n");
125 handle->
debug_print(
"max6675: spi init failed.\n");
129 if (a_max6675_spi_read(handle, &data) != 0)
131 handle->
debug_print(
"max6675: read data failed.\n");
167 handle->
debug_print(
"max6675: spi deinit failed.\n");
203 res = a_max6675_spi_read(handle, &data);
206 handle->
debug_print(
"max6675: read data failed.\n");
210 if ((data & (1 << 2)) != 0)
212 handle->
debug_print(
"max6675: thermocouple input is open.\n");
217 *temp = (float)(*raw) * 0.25f;
244 return a_max6675_spi_read(handle, data);
#define SUPPLY_VOLTAGE_MAX
#define MANUFACTURER_NAME
#define SUPPLY_VOLTAGE_MIN
#define CHIP_NAME
chip information definition
driver max6675 header file
uint8_t max6675_read(max6675_handle_t *handle, uint16_t *raw, float *temp)
read the temperature
uint8_t max6675_info(max6675_info_t *info)
get chip's information
struct max6675_info_s max6675_info_t
max6675 information structure definition
uint8_t max6675_init(max6675_handle_t *handle)
initialize the chip
struct max6675_handle_s max6675_handle_t
max6675 handle structure definition
uint8_t max6675_deinit(max6675_handle_t *handle)
close the chip
uint8_t max6675_get_reg(max6675_handle_t *handle, uint16_t *data)
get the chip register
uint8_t(* spi_init)(void)
void(* delay_ms)(uint32_t ms)
uint8_t(* spi_read_cmd)(uint8_t *buf, uint16_t len)
void(* debug_print)(const char *const fmt,...)
uint8_t(* spi_deinit)(void)
float supply_voltage_max_v
char manufacturer_name[32]
float supply_voltage_min_v