summaryrefslogtreecommitdiffstats
path: root/watch-library/hardware
diff options
context:
space:
mode:
authorJoey Castillo <joeycastillo@utexas.edu>2022-01-26 20:16:52 -0500
committerJoey Castillo <joeycastillo@utexas.edu>2022-01-26 20:16:52 -0500
commitd65103b03b8bca4b8880882c95d6e99febeabc2a (patch)
tree2cedfcf7bd8d427a38c030ab140383179a4040a5 /watch-library/hardware
parent0c78fdf5350b3e3d6e8335fc83fb942763c447ad (diff)
downloadSensor-Watch-d65103b03b8bca4b8880882c95d6e99febeabc2a.tar.gz
Sensor-Watch-d65103b03b8bca4b8880882c95d6e99febeabc2a.tar.bz2
Sensor-Watch-d65103b03b8bca4b8880882c95d6e99febeabc2a.zip
silence compiler warnings
Diffstat (limited to 'watch-library/hardware')
-rw-r--r--watch-library/hardware/watch/watch_private.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/watch-library/hardware/watch/watch_private.c b/watch-library/hardware/watch/watch_private.c
index ae2589e7..5ec1de21 100644
--- a/watch-library/hardware/watch/watch_private.c
+++ b/watch-library/hardware/watch/watch_private.c
@@ -71,6 +71,8 @@ static inline void _watch_wait_for_entropy() {
}
// this function is called by arc4random to get entropy for random number generation.
+int getentropy(void *buf, size_t buflen);
+
// let's use the SAM L22's true random number generator to seed the PRNG!
int getentropy(void *buf, size_t buflen) {
hri_mclk_set_APBCMASK_TRNG_bit(MCLK);
@@ -98,17 +100,6 @@ int getentropy(void *buf, size_t buflen) {
return 0;
}
-int _gettimeofday(struct timeval *tv, void *tzvp) {
- (void)tzvp;
- watch_date_time date_time = watch_rtc_get_date_time();
-
- // FIXME: this assumes the system time is UTC! Will break for any other time zone.
- tv->tv_sec = watch_utility_date_time_to_unix_time(date_time, 0);
- tv->tv_usec = 0;
-
- return 0;
-}
-
void _watch_enable_tcc(void) {
// clock TCC0 with the main clock (8 MHz) and enable the peripheral clock.
hri_gclk_write_PCHCTRL_reg(GCLK, TCC0_GCLK_ID, GCLK_PCHCTRL_GEN_GCLK0_Val | GCLK_PCHCTRL_CHEN);