samples: drivers: espi: Remove magic number
Define macro for number of times the temperatures will be retrieved. Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
This commit is contained in:
parent
2a56743def
commit
9c6e81665b
1 changed files with 2 additions and 1 deletions
|
@ -25,6 +25,7 @@ LOG_MODULE_DECLARE(espi, CONFIG_ESPI_LOG_LEVEL);
|
|||
|
||||
/* Maximum bytes for OOB transactions */
|
||||
#define MAX_RESP_SIZE 20u
|
||||
#define MIN_GET_TEMP_CYCLES 5u
|
||||
|
||||
/* eSPI flash parameters */
|
||||
#define MAX_TEST_BUF_SIZE 1024u
|
||||
|
@ -673,7 +674,7 @@ int espi_test(void)
|
|||
/* Attempt to use OOB channel to read temperature, regardless of
|
||||
* if is enabled or not.
|
||||
*/
|
||||
for (int i = 0; i < 5; i++) {
|
||||
for (int i = 0; i < MIN_GET_TEMP_CYCLES; i++) {
|
||||
int temp;
|
||||
|
||||
ret = get_pch_temp(espi_dev, &temp);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue