support both struct timespec and struct tm variants of the aon timer APIs #2079

Merged
kilograham merged 7 commits from aon_timer_clib into develop 2024-11-22 12:11:02 -06:00
kilograham commented 2024-11-20 20:24:53 -06:00 (Migrated from github.com)

… since use of one type on RP2040 and the other on RP2350 require pulling in C library code.

Also provide weak pico_ wrappers for localtime_r and mktime so that the user can override the conversion functions

… since use of one type on RP2040 and the other on RP2350 require pulling in C library code. Also provide weak `pico_` wrappers for `localtime_r` and `mktime` so that the user can override the conversion functions
kilograham commented 2024-11-20 20:33:15 -06:00 (Migrated from github.com)

fixes #1810

fixes #1810
peterharperuk (Migrated from github.com) reviewed 2024-11-21 14:09:10 -06:00
@ -4,0 +8,4 @@
#endif
__datetime_weak struct tm * pico_localtime_r(const time_t *time, struct tm *tm) {
return localtime_r(time, tm);
peterharperuk (Migrated from github.com) commented 2024-11-21 14:09:10 -06:00

This is in the right place this time? It looks like you moved it back.

This is in the right place this time? It looks like you moved it back.
peterharperuk (Migrated from github.com) reviewed 2024-11-21 14:21:21 -06:00
@ -23,6 +23,38 @@
* \if rp2350_specific
peterharperuk (Migrated from github.com) commented 2024-11-21 14:21:21 -06:00

I don't really understand what it means by "non date/time methods" here

I don't really understand what it means by "non date/time methods" here
peterharperuk (Migrated from github.com) reviewed 2024-11-21 14:26:18 -06:00
@ -23,6 +23,38 @@
* \if rp2350_specific
peterharperuk (Migrated from github.com) commented 2024-11-21 14:26:17 -06:00

maybe a list of the methods that are affected by the clib overhead in 2040 and 2350 (a different set?) would be useful?

maybe a list of the methods that are affected by the clib overhead in 2040 and 2350 (a different set?) would be useful?
peterharperuk (Migrated from github.com) reviewed 2024-11-21 15:15:30 -06:00
@ -23,56 +24,92 @@ static void powman_timer_irq_handler(void) {
irq_remove_handler(irq_num, powman_timer_irq_handler);
if (aon_timer_alarm_handler) aon_timer_alarm_handler();
}
peterharperuk (Migrated from github.com) commented 2024-11-21 15:15:29 -06:00

This isn't working. Don't you have to convert the ts to a tm AFTER the call to aon_timer_get_time?

This isn't working. Don't you have to convert the ts to a tm AFTER the call to aon_timer_get_time?
kilograham (Migrated from github.com) reviewed 2024-11-21 17:52:48 -06:00
@ -23,6 +23,38 @@
* \if rp2350_specific
kilograham (Migrated from github.com) commented 2024-11-21 17:52:47 -06:00

can you suggest a clarification - this refers very much to the previous paragraph (i could add "calendar" here)

I suppose we could list them all

can you suggest a clarification - this refers very much to the previous paragraph (i could add "calendar" here) I suppose we could list them all
kilograham (Migrated from github.com) reviewed 2024-11-21 17:53:10 -06:00
@ -23,56 +24,92 @@ static void powman_timer_irq_handler(void) {
irq_remove_handler(irq_num, powman_timer_irq_handler);
if (aon_timer_alarm_handler) aon_timer_alarm_handler();
}
kilograham (Migrated from github.com) commented 2024-11-21 17:53:10 -06:00

ha oops

ha oops
peterharperuk (Migrated from github.com) reviewed 2024-11-22 09:18:16 -06:00
peterharperuk (Migrated from github.com) left a comment
No description provided.
Seems to be working ok and I can't spot any issues. Docs are much clearer now!
peterharperuk (Migrated from github.com) approved these changes 2024-11-22 11:56:32 -06:00
Sign in to join this conversation.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-raspberrypi/pico-sdk!2079
No description provided.