/loramac-node-3.4.0/src/system/ |
D | systime.c | 122 uint32_t seconds; in SysTimeGet() local 127 RtcBkupRead( &seconds, &subSeconds ); in SysTimeGet() 129 SysTime_t deltaTime = { .Seconds = seconds, .SubSeconds = ( int16_t )subSeconds }; in SysTimeGet() 147 uint32_t seconds; in SysTimeToMs() local 150 RtcBkupRead( &seconds, &subSeconds ); in SysTimeToMs() 152 SysTime_t deltaTime = { .Seconds = seconds, .SubSeconds = ( int16_t )subSeconds }; in SysTimeToMs() 161 uint32_t seconds = timeMs / 1000; in SysTimeFromMs() local 162 uint32_t subSeconds = timeMs - seconds * 1000; in SysTimeFromMs() 163 SysTime_t sysTime = { .Seconds = seconds, .SubSeconds = ( int16_t )subSeconds }; in SysTimeFromMs() 165 RtcBkupRead( &seconds, &subSeconds ); in SysTimeFromMs() [all …]
|
/loramac-node-3.4.0/src/boards/SKiM980A/ |
D | rtc-board.c | 248 uint32_t seconds = tick >> N_PREDIV_S; in RtcTick2Ms() local 251 return ( ( seconds * 1000 ) + ( ( tick * 1000 ) >> N_PREDIV_S ) ); in RtcTick2Ms() 435 uint32_t seconds; in RtcGetCalendarValue() local 446 seconds = DIVC( ( DAYS_IN_YEAR * 3 + DAYS_IN_LEAP_YEAR ) * date->Year , 4 ); in RtcGetCalendarValue() 450 …seconds += ( DIVC( ( date->Month-1 ) * ( 30 + 31 ), 2 ) - ( ( ( correction >> ( ( date->Month - 1 … in RtcGetCalendarValue() 452 seconds += ( date->Date -1 ); in RtcGetCalendarValue() 455 seconds *= SECONDS_IN_1DAY; in RtcGetCalendarValue() 457 seconds += ( ( uint32_t )time->Seconds + in RtcGetCalendarValue() 461 calendarValue = ( ( ( uint64_t )seconds ) << N_PREDIV_S ) + ( PREDIV_S - time->SubSeconds ); in RtcGetCalendarValue() 474 uint32_t seconds = ( uint32_t )( calendarValue >> N_PREDIV_S ); in RtcGetCalendarTime() local [all …]
|
/loramac-node-3.4.0/src/boards/NucleoL152/ |
D | rtc-board.c | 248 uint32_t seconds = tick >> N_PREDIV_S; in RtcTick2Ms() local 251 return ( ( seconds * 1000 ) + ( ( tick * 1000 ) >> N_PREDIV_S ) ); in RtcTick2Ms() 435 uint32_t seconds; in RtcGetCalendarValue() local 446 seconds = DIVC( ( DAYS_IN_YEAR * 3 + DAYS_IN_LEAP_YEAR ) * date->Year , 4 ); in RtcGetCalendarValue() 450 …seconds += ( DIVC( ( date->Month-1 ) * ( 30 + 31 ), 2 ) - ( ( ( correction >> ( ( date->Month - 1 … in RtcGetCalendarValue() 452 seconds += ( date->Date -1 ); in RtcGetCalendarValue() 455 seconds *= SECONDS_IN_1DAY; in RtcGetCalendarValue() 457 seconds += ( ( uint32_t )time->Seconds + in RtcGetCalendarValue() 461 calendarValue = ( ( ( uint64_t )seconds ) << N_PREDIV_S ) + ( PREDIV_S - time->SubSeconds ); in RtcGetCalendarValue() 474 uint32_t seconds = ( uint32_t )( calendarValue >> N_PREDIV_S ); in RtcGetCalendarTime() local [all …]
|
/loramac-node-3.4.0/src/boards/NucleoL073/ |
D | rtc-board.c | 249 uint32_t seconds = tick >> N_PREDIV_S; in RtcTick2Ms() local 252 return ( ( seconds * 1000 ) + ( ( tick * 1000 ) >> N_PREDIV_S ) ); in RtcTick2Ms() 436 uint32_t seconds; in RtcGetCalendarValue() local 447 seconds = DIVC( ( DAYS_IN_YEAR * 3 + DAYS_IN_LEAP_YEAR ) * date->Year , 4 ); in RtcGetCalendarValue() 451 …seconds += ( DIVC( ( date->Month-1 ) * ( 30 + 31 ), 2 ) - ( ( ( correction >> ( ( date->Month - 1 … in RtcGetCalendarValue() 453 seconds += ( date->Date -1 ); in RtcGetCalendarValue() 456 seconds *= SECONDS_IN_1DAY; in RtcGetCalendarValue() 458 seconds += ( ( uint32_t )time->Seconds + in RtcGetCalendarValue() 462 calendarValue = ( ( ( uint64_t )seconds ) << N_PREDIV_S ) + ( PREDIV_S - time->SubSeconds ); in RtcGetCalendarValue() 475 uint32_t seconds = ( uint32_t )( calendarValue >> N_PREDIV_S ); in RtcGetCalendarTime() local [all …]
|
/loramac-node-3.4.0/src/boards/SKiM880B/ |
D | rtc-board.c | 248 uint32_t seconds = tick >> N_PREDIV_S; in RtcTick2Ms() local 251 return ( ( seconds * 1000 ) + ( ( tick * 1000 ) >> N_PREDIV_S ) ); in RtcTick2Ms() 435 uint32_t seconds; in RtcGetCalendarValue() local 446 seconds = DIVC( ( DAYS_IN_YEAR * 3 + DAYS_IN_LEAP_YEAR ) * date->Year , 4 ); in RtcGetCalendarValue() 450 …seconds += ( DIVC( ( date->Month-1 ) * ( 30 + 31 ), 2 ) - ( ( ( correction >> ( ( date->Month - 1 … in RtcGetCalendarValue() 452 seconds += ( date->Date -1 ); in RtcGetCalendarValue() 455 seconds *= SECONDS_IN_1DAY; in RtcGetCalendarValue() 457 seconds += ( ( uint32_t )time->Seconds + in RtcGetCalendarValue() 461 calendarValue = ( ( ( uint64_t )seconds ) << N_PREDIV_S ) + ( PREDIV_S - time->SubSeconds ); in RtcGetCalendarValue() 474 uint32_t seconds = ( uint32_t )( calendarValue >> N_PREDIV_S ); in RtcGetCalendarTime() local [all …]
|
/loramac-node-3.4.0/src/boards/SKiM881AXL/ |
D | rtc-board.c | 249 uint32_t seconds = tick >> N_PREDIV_S; in RtcTick2Ms() local 252 return ( ( seconds * 1000 ) + ( ( tick * 1000 ) >> N_PREDIV_S ) ); in RtcTick2Ms() 436 uint32_t seconds; in RtcGetCalendarValue() local 447 seconds = DIVC( ( DAYS_IN_YEAR * 3 + DAYS_IN_LEAP_YEAR ) * date->Year , 4 ); in RtcGetCalendarValue() 451 …seconds += ( DIVC( ( date->Month-1 ) * ( 30 + 31 ), 2 ) - ( ( ( correction >> ( ( date->Month - 1 … in RtcGetCalendarValue() 453 seconds += ( date->Date -1 ); in RtcGetCalendarValue() 456 seconds *= SECONDS_IN_1DAY; in RtcGetCalendarValue() 458 seconds += ( ( uint32_t )time->Seconds + in RtcGetCalendarValue() 462 calendarValue = ( ( ( uint64_t )seconds ) << N_PREDIV_S ) + ( PREDIV_S - time->SubSeconds ); in RtcGetCalendarValue() 475 uint32_t seconds = ( uint32_t )( calendarValue >> N_PREDIV_S ); in RtcGetCalendarTime() local [all …]
|
/loramac-node-3.4.0/src/boards/NucleoL476/ |
D | rtc-board.c | 248 uint32_t seconds = tick >> N_PREDIV_S; in RtcTick2Ms() local 251 return ( ( seconds * 1000 ) + ( ( tick * 1000 ) >> N_PREDIV_S ) ); in RtcTick2Ms() 435 uint32_t seconds; in RtcGetCalendarValue() local 446 seconds = DIVC( ( DAYS_IN_YEAR * 3 + DAYS_IN_LEAP_YEAR ) * date->Year , 4 ); in RtcGetCalendarValue() 450 …seconds += ( DIVC( ( date->Month-1 ) * ( 30 + 31 ), 2 ) - ( ( ( correction >> ( ( date->Month - 1 … in RtcGetCalendarValue() 452 seconds += ( date->Date -1 ); in RtcGetCalendarValue() 455 seconds *= SECONDS_IN_1DAY; in RtcGetCalendarValue() 457 seconds += ( ( uint32_t )time->Seconds + in RtcGetCalendarValue() 461 calendarValue = ( ( ( uint64_t )seconds ) << N_PREDIV_S ) + ( PREDIV_S - time->SubSeconds ); in RtcGetCalendarValue() 474 uint32_t seconds = ( uint32_t )( calendarValue >> N_PREDIV_S ); in RtcGetCalendarTime() local [all …]
|
/loramac-node-3.4.0/src/boards/NAMote72/ |
D | rtc-board.c | 248 uint32_t seconds = tick >> N_PREDIV_S; in RtcTick2Ms() local 251 return ( ( seconds * 1000 ) + ( ( tick * 1000 ) >> N_PREDIV_S ) ); in RtcTick2Ms() 435 uint32_t seconds; in RtcGetCalendarValue() local 446 seconds = DIVC( ( DAYS_IN_YEAR * 3 + DAYS_IN_LEAP_YEAR ) * date->Year , 4 ); in RtcGetCalendarValue() 450 …seconds += ( DIVC( ( date->Month-1 ) * ( 30 + 31 ), 2 ) - ( ( ( correction >> ( ( date->Month - 1 … in RtcGetCalendarValue() 452 seconds += ( date->Date -1 ); in RtcGetCalendarValue() 455 seconds *= SECONDS_IN_1DAY; in RtcGetCalendarValue() 457 seconds += ( ( uint32_t )time->Seconds + in RtcGetCalendarValue() 461 calendarValue = ( ( ( uint64_t )seconds ) << N_PREDIV_S ) + ( PREDIV_S - time->SubSeconds ); in RtcGetCalendarValue() 474 uint32_t seconds = ( uint32_t )( calendarValue >> N_PREDIV_S ); in RtcGetCalendarTime() local [all …]
|
/loramac-node-3.4.0/src/boards/B-L072Z-LRWAN1/ |
D | rtc-board.c | 249 uint32_t seconds = tick >> N_PREDIV_S; in RtcTick2Ms() local 252 return ( ( seconds * 1000 ) + ( ( tick * 1000 ) >> N_PREDIV_S ) ); in RtcTick2Ms() 436 uint32_t seconds; in RtcGetCalendarValue() local 447 seconds = DIVC( ( DAYS_IN_YEAR * 3 + DAYS_IN_LEAP_YEAR ) * date->Year , 4 ); in RtcGetCalendarValue() 451 …seconds += ( DIVC( ( date->Month-1 ) * ( 30 + 31 ), 2 ) - ( ( ( correction >> ( ( date->Month - 1 … in RtcGetCalendarValue() 453 seconds += ( date->Date -1 ); in RtcGetCalendarValue() 456 seconds *= SECONDS_IN_1DAY; in RtcGetCalendarValue() 458 seconds += ( ( uint32_t )time->Seconds + in RtcGetCalendarValue() 462 calendarValue = ( ( ( uint64_t )seconds ) << N_PREDIV_S ) + ( PREDIV_S - time->SubSeconds ); in RtcGetCalendarValue() 475 uint32_t seconds = ( uint32_t )( calendarValue >> N_PREDIV_S ); in RtcGetCalendarTime() local [all …]
|
/loramac-node-3.4.0/src/boards/SAMR34/ |
D | rtc-board.c | 138 uint32_t seconds = tick >> 10; in RtcTick2Ms() local 141 return ( ( seconds * 1000 ) + ( ( tick * 1000 ) >> 10 ) ); in RtcTick2Ms() 220 uint32_t seconds = ( uint32_t )calendarValue >> 10; in RtcGetCalendarTime() local 226 return seconds; in RtcGetCalendarTime()
|