Skip to content

Commit c9f15d6

Browse files
authored
Merge pull request #141 from tmobile/tmo-CFSPDK-1208-Fix-build-warning
Fix ADC build warning
2 parents 9aed673 + 9f6f5e8 commit c9f15d6

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

samples/tmo_shell/src/tmo_adc.c

+2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ K_SEM_DEFINE(adc_sem, 0, 1);
2525
static ADC_InitSingle_TypeDef initSingle_bv = ADC_INITSINGLE_DEFAULT;
2626
static ADC_InitSingle_TypeDef initSingle_hwid = ADC_INITSINGLE_DEFAULT;
2727

28+
#ifdef HWID_APORT
2829
/**
2930
* @brief Set the VBAT_SNS_EN Pin High to enable ADC readings
3031
*
@@ -39,6 +40,7 @@ static void set_vbat_sens_en(bool enable)
3940
GPIO_PinModeSet(VBAT_EN_PORT, VBAT_EN_PIN, gpioModePushPull, enable);
4041
#endif /* VBAT_EN_PORT */
4142
}
43+
#endif /* HWID_APORT */
4244

4345
/**
4446
* @brief Initialize the Gecko ADC

samples/tmo_shell/src/tmo_sntp.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ static void date_print(const struct shell *shell, struct tm *tm)
8383
static int time_date_set(const struct shell *shell, uint32_t epoch_sec)
8484
{
8585
struct tm tm;
86-
struct timespec tp;
86+
struct timespec tp = {0};
8787
tp.tv_sec = (uint32_t)epoch_sec;
8888

8989
gmtime_r(&tp.tv_sec, &tm);
@@ -203,7 +203,7 @@ int tmo_update_time(const struct shell *shell, char *host, int iface_idx)
203203
#ifdef DEBUG
204204
shell_print(shell, "epoch %lld", txTm);
205205
#endif
206-
time_date_set(shell,txTm);
206+
time_date_set(shell, txTm);
207207
zsock_close(sd);
208208
return 0;
209209
}

0 commit comments

Comments
 (0)