Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 0 additions & 1 deletion Documentation/applications/netutils/ntpclient/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,6 @@ The NTP client requires:
- **CONFIG_NET_UDP**: UDP protocol support
- **CONFIG_NET_SOCKOPTS**: Socket options support
- **CONFIG_LIBC_NETDB**: DNS resolution (recommended)
- **CONFIG_HAVE_LONG_LONG**: 64-bit integer support

For best results, ensure:
- Stable network connectivity
Expand Down
1 change: 0 additions & 1 deletion Documentation/guides/rust.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ Please ensure that you have a working NuttX build environment, and with the foll

Please enable the following configurations in your NuttX configuration:

- CONFIG_SYSTEM_TIME64
- CONFIG_FS_LARGEFILE
- CONFIG_TLS_NELEM = 16
- CONFIG_DEV_URANDOM
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/src/cxd56xx/cxd56_rtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ time_t up_rtc_time(void)
count += g_rtc_save->offset;
count >>= 15; /* convert to 1sec resolution */

return (time_t)count / CONFIG_RTC_FREQUENCY;
return count / CONFIG_RTC_FREQUENCY;
}
#endif

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/src/efm32/efm32_rtc_burtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ int up_rtc_initialize(void)
#ifndef CONFIG_RTC_HIRES
time_t up_rtc_time(void)
{
return (time_t)efm32_get_burtc_tick() / CONFIG_RTC_FREQUENCY;
return efm32_get_burtc_tick() / CONFIG_RTC_FREQUENCY;
}
#endif

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/src/imxrt/imxrt_rtc_lowerhalf.c
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ static int imxrt_rdalarm(struct rtc_lowerhalf_s *lower,

/* Get the current alarm setting in seconds */

alarm = (time_t)imxrt_hprtc_getalarm();
alarm = imxrt_hprtc_getalarm();

/* Convert the one second epoch time to a struct tm */

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/src/lc823450/lc823450_rtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ static void tm_divider(struct tm *tm, int divn, int divm)
{
time_t tt;
tt = timegm(tm);
tt = (time_t) ((uint64_t)tt * divn / divm);
tt = tt * divn / divm;
gmtime_r(&tt, tm);
}
#endif /* CONFIG_RTC_DIV */
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/src/lc823450/lc823450_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -724,8 +724,8 @@ int up_rtc_gettime(struct timespec *tp)

/* And return the result to the caller. */

tp->tv_sec = (time_t)secs;
tp->tv_nsec = (long)nsecs;
tp->tv_sec = secs;
tp->tv_nsec = nsecs;

tmrinfo("Returning tp=(%d,%d)\n", (int)tp->tv_sec, (int)tp->tv_nsec);
return OK;
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/src/max326xx/common/max326_rtc_lowerhalf.c
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ static int max326_rdalarm(struct rtc_lowerhalf_s *lower,
{
/* Extract integer seconds from the b32_t value */

time_t sec = (time_t)(b32toi(ftime));
time_t sec = b32toi(ftime);

/* Convert to struct rtc_time (aka struct tm) */

Expand Down
4 changes: 2 additions & 2 deletions arch/arm/src/sam34/sam4cm_oneshot.c
Original file line number Diff line number Diff line change
Expand Up @@ -496,8 +496,8 @@ int sam_oneshot_cancel(struct sam_oneshot_s *oneshot,
sec = usec / USEC_PER_SEC;
nsec = ((usec) - (sec * USEC_PER_SEC)) * NSEC_PER_USEC;

ts->tv_sec = (time_t)sec;
ts->tv_nsec = (unsigned long)nsec;
ts->tv_sec = sec;
ts->tv_nsec = nsec;
}

tmrinfo("remaining (%lu, %lu)\n",
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/src/sam34/sam4cm_oneshot_lowerhalf.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ static int sam_max_delay(struct oneshot_lowerhalf_s *lower,
uint64_t sec = usecs / 1000000;
usecs -= 1000000 * sec;

ts->tv_sec = (time_t)sec;
ts->tv_nsec = (long)(usecs * 1000);
ts->tv_sec = sec;
ts->tv_nsec = usecs * 1000;
}

return ret;
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/src/sama5/sam_oneshot.c
Original file line number Diff line number Diff line change
Expand Up @@ -507,8 +507,8 @@ int sam_oneshot_cancel(struct sam_oneshot_s *oneshot,
sec = usec / USEC_PER_SEC;
nsec = ((usec) - (sec * USEC_PER_SEC)) * NSEC_PER_USEC;

ts->tv_sec = (time_t)sec;
ts->tv_nsec = (unsigned long)nsec;
ts->tv_sec = sec;
ts->tv_nsec = nsec;
}

tmrinfo("remaining (%lu, %lu)\n",
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/src/sama5/sam_oneshot_lowerhalf.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ static int sam_max_delay(struct oneshot_lowerhalf_s *lower,
uint64_t sec = usecs / 1000000;
usecs -= 1000000 * sec;

ts->tv_sec = (time_t)sec;
ts->tv_nsec = (long)(usecs * 1000);
ts->tv_sec = sec;
ts->tv_nsec = usecs * 1000;
}

return ret;
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/src/samd5e5/sam_oneshot.c
Original file line number Diff line number Diff line change
Expand Up @@ -442,8 +442,8 @@ int sam_oneshot_cancel(struct sam_oneshot_s *oneshot,
sec = usec / USEC_PER_SEC;
nsec = ((usec) - (sec * USEC_PER_SEC)) * NSEC_PER_USEC;

ts->tv_sec = (time_t)sec;
ts->tv_nsec = (unsigned long)nsec;
ts->tv_sec = sec;
ts->tv_nsec = nsec;
}

tmrinfo("remaining (%lu, %lu)\n",
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/src/samd5e5/sam_oneshot_lowerhalf.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ static int sam_max_delay(struct oneshot_lowerhalf_s *lower,
uint64_t sec = usecs / 1000000;
usecs -= 1000000 * sec;

ts->tv_sec = (time_t)sec;
ts->tv_nsec = (long)(usecs * 1000);
ts->tv_sec = sec;
ts->tv_nsec = usecs * 1000;
}

return ret;
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/src/samv7/sam_oneshot.c
Original file line number Diff line number Diff line change
Expand Up @@ -506,8 +506,8 @@ int sam_oneshot_cancel(struct sam_oneshot_s *oneshot,
sec = usec / USEC_PER_SEC;
nsec = ((usec) - (sec * USEC_PER_SEC)) * NSEC_PER_USEC;

ts->tv_sec = (time_t)sec;
ts->tv_nsec = (unsigned long)nsec;
ts->tv_sec = sec;
ts->tv_nsec = nsec;
}

tmrinfo("remaining (%lu, %lu)\n",
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/src/samv7/sam_oneshot_lowerhalf.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ static int sam_max_delay(struct oneshot_lowerhalf_s *lower,
uint64_t sec = usecs / 1000000;
usecs -= 1000000 * sec;

ts->tv_sec = (time_t)sec;
ts->tv_nsec = (long)(usecs * 1000);
ts->tv_sec = sec;
ts->tv_nsec = usecs * 1000;
}

return ret;
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/src/stm32/stm32_oneshot.c
Original file line number Diff line number Diff line change
Expand Up @@ -445,8 +445,8 @@ int stm32_oneshot_cancel(struct stm32_oneshot_s *oneshot,
sec = usec / USEC_PER_SEC;
nsec = ((usec) - (sec * USEC_PER_SEC)) * NSEC_PER_USEC;

ts->tv_sec = (time_t)sec;
ts->tv_nsec = (unsigned long)nsec;
ts->tv_sec = sec;
ts->tv_nsec = nsec;
}

tmrinfo("remaining (%lu, %lu)\n",
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/src/stm32/stm32_oneshot_lowerhalf.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ static int stm32_max_delay(struct oneshot_lowerhalf_s *lower,
uint64_t sec = usecs / 1000000;
usecs -= 1000000 * sec;

ts->tv_sec = (time_t)sec;
ts->tv_nsec = (long)(usecs * 1000);
ts->tv_sec = sec;
ts->tv_nsec = usecs * 1000;
}

return ret;
Expand Down
6 changes: 3 additions & 3 deletions arch/arm/src/stm32/stm32_tickless.c
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@ int up_timer_gettime(struct timespec *ts)

int up_timer_gettick(clock_t *ticks)
{
*ticks = (clock_t)STM32_TIM_GETCOUNTER(g_tickless.tch);
*ticks = STM32_TIM_GETCOUNTER(g_tickless.tch);
return OK;
}

Expand Down Expand Up @@ -869,8 +869,8 @@ int up_timer_cancel(struct timespec *ts)
sec = usec / USEC_PER_SEC;
nsec = ((usec) - (sec * USEC_PER_SEC)) * NSEC_PER_USEC;

ts->tv_sec = (time_t)sec;
ts->tv_nsec = (unsigned long)nsec;
ts->tv_sec = sec;
ts->tv_nsec = nsec;

tmrinfo("remaining (%lu, %lu)\n",
(unsigned long)ts->tv_sec, (unsigned long)ts->tv_nsec);
Expand Down
6 changes: 3 additions & 3 deletions arch/arm/src/stm32f7/stm32_tickless.c
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@ int up_timer_gettime(struct timespec *ts)

int up_timer_gettick(clock_t *ticks)
{
*ticks = (clock_t)STM32_TIM_GETCOUNTER(g_tickless.tch);
*ticks = STM32_TIM_GETCOUNTER(g_tickless.tch);
return OK;
}

Expand Down Expand Up @@ -911,8 +911,8 @@ int up_timer_cancel(struct timespec *ts)
sec = usec / USEC_PER_SEC;
nsec = ((usec) - (sec * USEC_PER_SEC)) * NSEC_PER_USEC;

ts->tv_sec = (time_t)sec;
ts->tv_nsec = (unsigned long)nsec;
ts->tv_sec = sec;
ts->tv_nsec = nsec;

tmrinfo("remaining (%lu, %lu)\n",
(unsigned long)ts->tv_sec, (unsigned long)ts->tv_nsec);
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/src/stm32h7/stm32_oneshot_lowerhalf.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ static int stm32_max_delay(struct oneshot_lowerhalf_s *lower,
uint64_t sec = usecs / 1000000;
usecs -= 1000000 * sec;

ts->tv_sec = (time_t)sec;
ts->tv_nsec = (long)(usecs * 1000);
ts->tv_sec = sec;
ts->tv_nsec = usecs * 1000;
}

return ret;
Expand Down
6 changes: 3 additions & 3 deletions arch/arm/src/stm32h7/stm32_tickless.c
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,7 @@ int up_timer_gettime(struct timespec *ts)

int up_timer_gettick(clock_t *ticks)
{
*ticks = (clock_t)STM32_TIM_GETCOUNTER(g_tickless.tch);
*ticks = STM32_TIM_GETCOUNTER(g_tickless.tch);
return OK;
}

Expand Down Expand Up @@ -885,8 +885,8 @@ int up_timer_cancel(struct timespec *ts)
sec = usec / USEC_PER_SEC;
nsec = ((usec) - (sec * USEC_PER_SEC)) * NSEC_PER_USEC;

ts->tv_sec = (time_t)sec;
ts->tv_nsec = (unsigned long)nsec;
ts->tv_sec = sec;
ts->tv_nsec = nsec;

tmrinfo("remaining (%lu, %lu)\n",
(unsigned long)ts->tv_sec, (unsigned long)ts->tv_nsec);
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/src/stm32l4/stm32l4_oneshot.c
Original file line number Diff line number Diff line change
Expand Up @@ -447,8 +447,8 @@ int stm32l4_oneshot_cancel(struct stm32l4_oneshot_s *oneshot,
sec = usec / USEC_PER_SEC;
nsec = ((usec) - (sec * USEC_PER_SEC)) * NSEC_PER_USEC;

ts->tv_sec = (time_t)sec;
ts->tv_nsec = (unsigned long)nsec;
ts->tv_sec = sec;
ts->tv_nsec = nsec;
}

tmrinfo("remaining (%lu, %lu)\n",
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/src/stm32l4/stm32l4_oneshot_lowerhalf.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ static int stm32l4_max_delay(struct oneshot_lowerhalf_s *lower,
uint64_t sec = usecs / 1000000;
usecs -= 1000000 * sec;

ts->tv_sec = (time_t)sec;
ts->tv_nsec = (long)(usecs * 1000);
ts->tv_sec = sec;
ts->tv_nsec = usecs * 1000;
}

return ret;
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/src/stm32wb/stm32wb_oneshot.c
Original file line number Diff line number Diff line change
Expand Up @@ -446,8 +446,8 @@ int stm32wb_oneshot_cancel(struct stm32wb_oneshot_s *oneshot,
sec = usec / USEC_PER_SEC;
nsec = (usec - (sec * USEC_PER_SEC)) * NSEC_PER_USEC;

ts->tv_sec = (time_t)sec;
ts->tv_nsec = (unsigned long)nsec;
ts->tv_sec = sec;
ts->tv_nsec = nsec;
}

tmrinfo("remaining (%lu, %lu)\n",
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/src/stm32wb/stm32wb_oneshot_lowerhalf.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ static int stm32wb_max_delay(struct oneshot_lowerhalf_s *lower,
uint64_t sec = usecs / 1000000;
usecs -= 1000000 * sec;

ts->tv_sec = (time_t)sec;
ts->tv_nsec = (long)(usecs * 1000);
ts->tv_sec = sec;
ts->tv_nsec = usecs * 1000;
}

return ret;
Expand Down
6 changes: 3 additions & 3 deletions arch/arm/src/stm32wb/stm32wb_tickless.c
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ int up_timer_gettime(struct timespec *ts)

int up_timer_gettick(clock_t *ticks)
{
*ticks = (clock_t)STM32WB_TIM_GETCOUNTER(g_tickless.tch);
*ticks = STM32WB_TIM_GETCOUNTER(g_tickless.tch);
return OK;
}

Expand Down Expand Up @@ -735,8 +735,8 @@ int up_timer_cancel(struct timespec *ts)
sec = usec / USEC_PER_SEC;
nsec = (usec - (sec * USEC_PER_SEC)) * NSEC_PER_USEC;

ts->tv_sec = (time_t)sec;
ts->tv_nsec = (unsigned long)nsec;
ts->tv_sec = sec;
ts->tv_nsec = nsec;

tmrinfo("remaining (%lu, %lu)\n",
(unsigned long)ts->tv_sec, (unsigned long)ts->tv_nsec);
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/src/xmc4/xmc4_tickless.c
Original file line number Diff line number Diff line change
Expand Up @@ -563,8 +563,8 @@ int up_timer_cancel(struct timespec *ts)

sec = usec / USEC_PER_SEC;
nsec = ((usec) - (sec * USEC_PER_SEC)) * NSEC_PER_USEC;
ts->tv_sec = (time_t)sec;
ts->tv_nsec = (unsigned long)nsec;
ts->tv_sec = sec;
ts->tv_nsec = nsec;

tmrinfo("remaining count : %lu (%lu, %lu)\n", count,
(unsigned long)ts->tv_sec, (unsigned long)ts->tv_nsec);
Expand Down
3 changes: 1 addition & 2 deletions arch/avr/src/avrdx/avrdx_timerisr_tickless_alarm.c
Original file line number Diff line number Diff line change
Expand Up @@ -301,8 +301,7 @@ static void avrdx_check_alarm_expired(uint8_t context)

/* Note about data types - struct timespec is defined
* in include/time.h, tv_sec is of type time_t which is defined
* in include/sys/types.h as uint32_t or uint64_t based
* on CONFIG_SYSTEM_TIME64
* in include/sys/types.h as uint64_t.
*
* tv_nsec is defined as long, signed value
*/
Expand Down
4 changes: 2 additions & 2 deletions arch/mips/src/pic32mz/pic32mz_oneshot.c
Original file line number Diff line number Diff line change
Expand Up @@ -433,8 +433,8 @@ int pic32mz_oneshot_cancel(struct pic32mz_oneshot_s *oneshot,
sec = usec / USEC_PER_SEC;
nsec = ((usec) - (sec * USEC_PER_SEC)) * NSEC_PER_USEC;

ts->tv_sec = (time_t)sec;
ts->tv_nsec = (unsigned long)nsec;
ts->tv_sec = sec;
ts->tv_nsec = nsec;
}

tmrinfo("remaining (%lu, %lu)\n",
Expand Down
4 changes: 2 additions & 2 deletions arch/mips/src/pic32mz/pic32mz_oneshot_lowerhalf.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ static int pic32mz_max_delay(struct oneshot_lowerhalf_s *lower,
uint64_t sec = usecs / 1000000;
usecs -= 1000000 * sec;

ts->tv_sec = (time_t)sec;
ts->tv_nsec = (long)(usecs * 1000);
ts->tv_sec = sec;
ts->tv_nsec = usecs * 1000;
}

return ret;
Expand Down
2 changes: 1 addition & 1 deletion arch/risc-v/src/common/espressif/esp_i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -1052,7 +1052,7 @@ static int esp_i2c_polling_waitdone(struct esp_i2c_priv_s *priv)
* and an error didn't occur within the timeout
*/

while ((sclock_t)(current - timeout) < 0 && (priv->error == 0))
while (current - timeout < 0 && priv->error == 0)
{
/* Check if any interrupt triggered, clear them
* process the operation.
Expand Down
2 changes: 1 addition & 1 deletion arch/risc-v/src/common/espressif/esp_i2c_slave.c
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,7 @@ static int esp_i2c_slave_polling_waitdone(struct esp_i2c_priv_s *priv)
current = clock_systime_ticks();
timeout = current + SEC2TICK(I2C_SLAVE_POLL_RATE);

while ((sclock_t)(current - timeout) < 0)
while (current - timeout < 0)
{
/* Check if any interrupt triggered, clear them
* process the operation.
Expand Down
2 changes: 1 addition & 1 deletion arch/risc-v/src/common/espressif/esp_libc_stubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
return nx_stat(pathname, statbuf, 1);
}

clock_t _times_r(struct _reent *r, struct tms *buf)
unsigned long _times_r(struct _reent *r, struct tms *buf)
{
return times(buf);
}
Expand Down Expand Up @@ -374,7 +374,7 @@
._abort = &_abort,
._system_r = &_system_r,
._rename_r = &_rename_r,
._times_r = &_times_r,

Check failure on line 377 in arch/risc-v/src/common/espressif/esp_libc_stubs.c

View workflow job for this annotation

GitHub Actions / Linux (risc-v-02)

initialization of 'clock_t (*)(struct _reent *, struct tms *)' {aka 'long long int (*)(struct _reent *, struct tms *)'} from incompatible pointer type 'long unsigned int (*)(struct _reent *, struct tms *)' [-Wincompatible-pointer-types]

Check failure on line 377 in arch/risc-v/src/common/espressif/esp_libc_stubs.c

View workflow job for this annotation

GitHub Actions / Linux (risc-v-02)

initialization of 'clock_t (*)(struct _reent *, struct tms *)' {aka 'long long int (*)(struct _reent *, struct tms *)'} from incompatible pointer type 'long unsigned int (*)(struct _reent *, struct tms *)' [-Wincompatible-pointer-types]

Check failure on line 377 in arch/risc-v/src/common/espressif/esp_libc_stubs.c

View workflow job for this annotation

GitHub Actions / Linux (risc-v-02)

initialization of 'clock_t (*)(struct _reent *, struct tms *)' {aka 'long long int (*)(struct _reent *, struct tms *)'} from incompatible pointer type 'long unsigned int (*)(struct _reent *, struct tms *)' [-Wincompatible-pointer-types]

Check failure on line 377 in arch/risc-v/src/common/espressif/esp_libc_stubs.c

View workflow job for this annotation

GitHub Actions / Linux (risc-v-02)

initialization of 'clock_t (*)(struct _reent *, struct tms *)' {aka 'long long int (*)(struct _reent *, struct tms *)'} from incompatible pointer type 'long unsigned int (*)(struct _reent *, struct tms *)' [-Wincompatible-pointer-types]

Check failure on line 377 in arch/risc-v/src/common/espressif/esp_libc_stubs.c

View workflow job for this annotation

GitHub Actions / Linux (risc-v-02)

initialization of 'clock_t (*)(struct _reent *, struct tms *)' {aka 'long long int (*)(struct _reent *, struct tms *)'} from incompatible pointer type 'long unsigned int (*)(struct _reent *, struct tms *)' [-Wincompatible-pointer-types]
._gettimeofday_r = &_gettimeofday_r,
._raise_r = &_raise_r,
._unlink_r = &_unlink_r,
Expand Down
2 changes: 1 addition & 1 deletion arch/risc-v/src/common/espressif/esp_rtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,7 @@ time_t up_rtc_time(void)

spin_unlock_irqrestore(&g_rtc_lowerhalf.lock, flags);

return (time_t)(time_us / USEC_PER_SEC);
return time_us / USEC_PER_SEC;
}
#endif /* !CONFIG_RTC_HIRES */

Expand Down
Loading
Loading