Skip to content

Commit

Permalink
Fix ADC build warning
Browse files Browse the repository at this point in the history
This fixes an ADC build warning

Signed-off-by: John Lange <John.Lange2@T-Mobile.com>
  • Loading branch information
johnlange2 authored and jtbaumann committed Mar 28, 2023
1 parent c4778af commit 14b7acb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions samples/tmo_shell/src/tmo_adc.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ K_SEM_DEFINE(adc_sem, 0, 1);
static ADC_InitSingle_TypeDef initSingle_bv = ADC_INITSINGLE_DEFAULT;
static ADC_InitSingle_TypeDef initSingle_hwid = ADC_INITSINGLE_DEFAULT;

#ifdef HWID_APORT
/**
* @brief Set the VBAT_SNS_EN Pin High to enable ADC readings
*
Expand All @@ -39,6 +40,7 @@ static void set_vbat_sens_en(bool enable)
GPIO_PinModeSet(VBAT_EN_PORT, VBAT_EN_PIN, gpioModePushPull, enable);
#endif /* VBAT_EN_PORT */
}
#endif /* HWID_APORT */

/**
* @brief Initialize the Gecko ADC
Expand Down
4 changes: 2 additions & 2 deletions samples/tmo_shell/src/tmo_sntp.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ static void date_print(const struct shell *shell, struct tm *tm)
static int time_date_set(const struct shell *shell, uint32_t epoch_sec)
{
struct tm tm;
struct timespec tp;
struct timespec tp = {0};
tp.tv_sec = (uint32_t)epoch_sec;

gmtime_r(&tp.tv_sec, &tm);
Expand Down Expand Up @@ -203,7 +203,7 @@ int tmo_update_time(const struct shell *shell, char *host, int iface_idx)
#ifdef DEBUG
shell_print(shell, "epoch %lld", txTm);
#endif
time_date_set(shell,txTm);
time_date_set(shell, txTm);
zsock_close(sd);
return 0;
}

0 comments on commit 14b7acb

Please sign in to comment.