Add optional trigger support to sample. If the selected temperature sensor supports triggering using the AMBIENT_TEMP channel, then temperature thresholds will be set for +0.5 and +1.5 degrees celsius above ambient temperature. Sample overlays are provided for the FRDM_K22F board to demonstrate enabling this feature. Signed-off-by: Daniel DeGrasse <daniel@degrasse.com>
25 lines
455 B
Plaintext
25 lines
455 B
Plaintext
/*
|
|
* Copyright 2023 Daniel DeGrasse <daniel@degrasse.com>
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
/ {
|
|
aliases {
|
|
ambient-temp0 = &temp_sensor;
|
|
};
|
|
};
|
|
|
|
/*
|
|
* Note- TCN75A is not present on the FRDM-K22F eval board, and must be
|
|
* wired to i2c0 and PTC2 externally
|
|
*/
|
|
&i2c0 {
|
|
temp_sensor: tcn75a@48 {
|
|
reg = <0x48>;
|
|
compatible = "microchip,tcn75a";
|
|
alert-gpios = <&gpioc 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
|
|
resolution = "10-bit";
|
|
};
|
|
};
|