23 lines
345 B
C
23 lines
345 B
C
#include "hal_temp.h"
|
|
#include <stddef.h>
|
|
|
|
int stub_temp_fail;
|
|
float stub_temp_c = 20.0f;
|
|
|
|
void hal_temp_init(void)
|
|
{
|
|
stub_temp_fail = 0;
|
|
stub_temp_c = 20.0f;
|
|
}
|
|
|
|
esp_err_t hal_temp_read_c(float *out)
|
|
{
|
|
if (stub_temp_fail) {
|
|
return ESP_FAIL;
|
|
}
|
|
if (out != NULL) {
|
|
*out = stub_temp_c;
|
|
}
|
|
return ESP_OK;
|
|
}
|