12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570 |
- /**
- ******************************************************************************
- * @file stm32g4xx_ll_rtc.h
- * @author MCD Application Team
- * @brief Header file of RTC LL module.
- ******************************************************************************
- * @attention
- *
- * Copyright (c) 2019 STMicroelectronics.
- * All rights reserved.
- *
- * This software is licensed under terms that can be found in the LICENSE file
- * in the root directory of this software component.
- * If no LICENSE file comes with this software, it is provided AS-IS.
- *
- ******************************************************************************
- */
- /* Define to prevent recursive inclusion -------------------------------------*/
- #ifndef STM32G4xx_LL_RTC_H
- #define STM32G4xx_LL_RTC_H
- #ifdef __cplusplus
- extern "C" {
- #endif
- /* Includes ------------------------------------------------------------------*/
- #include "stm32g4xx.h"
- /** @addtogroup STM32G4xx_LL_Driver
- * @{
- */
- #if defined(RTC)
- /** @defgroup RTC_LL RTC
- * @{
- */
- /* Private types -------------------------------------------------------------*/
- /* Private variables ---------------------------------------------------------*/
- /* Private constants ---------------------------------------------------------*/
- /** @defgroup RTC_LL_Private_Constants RTC Private Constants
- * @{
- */
- /* Masks Definition */
- #define RTC_LL_INIT_MASK 0xFFFFFFFFU
- #define RTC_LL_RSF_MASK 0xFFFFFF5FU
- /* Write protection defines */
- #define RTC_WRITE_PROTECTION_DISABLE (uint8_t)0xFF
- #define RTC_WRITE_PROTECTION_ENABLE_1 (uint8_t)0xCA
- #define RTC_WRITE_PROTECTION_ENABLE_2 (uint8_t)0x53
- /* Defines used to combine date & time */
- #define RTC_OFFSET_WEEKDAY 24U
- #define RTC_OFFSET_DAY 16U
- #define RTC_OFFSET_MONTH 8U
- #define RTC_OFFSET_HOUR 16U
- #define RTC_OFFSET_MINUTE 8U
- /**
- * @}
- */
- /* Private macros ------------------------------------------------------------*/
- #if defined(USE_FULL_LL_DRIVER)
- /** @defgroup RTC_LL_Private_Macros RTC Private Macros
- * @{
- */
- /**
- * @}
- */
- #endif /*USE_FULL_LL_DRIVER*/
- #if !defined (UNUSED)
- #define UNUSED(x) ((void)(x))
- #endif
- /* Exported types ------------------------------------------------------------*/
- #if defined(USE_FULL_LL_DRIVER)
- /** @defgroup RTC_LL_ES_INIT RTC Exported Init structure
- * @{
- */
- /**
- * @brief RTC Init structures definition
- */
- typedef struct
- {
- uint32_t HourFormat; /*!< Specifies the RTC Hours Format.
- This parameter can be a value of @ref RTC_LL_EC_HOURFORMAT
- This feature can be modified afterwards using unitary function
- @ref LL_RTC_SetHourFormat(). */
- uint32_t AsynchPrescaler; /*!< Specifies the RTC Asynchronous Predivider value.
- This parameter must be a number between Min_Data = 0x00 and Max_Data = 0x7F
- This feature can be modified afterwards using unitary function
- @ref LL_RTC_SetAsynchPrescaler(). */
- uint32_t SynchPrescaler; /*!< Specifies the RTC Synchronous Predivider value.
- This parameter must be a number between Min_Data = 0x00 and Max_Data = 0x7FFF
- This feature can be modified afterwards using unitary function
- @ref LL_RTC_SetSynchPrescaler(). */
- } LL_RTC_InitTypeDef;
- /**
- * @brief RTC Time structure definition
- */
- typedef struct
- {
- uint32_t TimeFormat; /*!< Specifies the RTC AM/PM Time.
- This parameter can be a value of @ref RTC_LL_EC_TIME_FORMAT
- This feature can be modified afterwards using unitary function @ref LL_RTC_TIME_SetFormat(). */
- uint8_t Hours; /*!< Specifies the RTC Time Hours.
- This parameter must be a number between Min_Data = 0 and Max_Data = 12 if the @ref LL_RTC_TIME_FORMAT_PM is selected.
- This parameter must be a number between Min_Data = 0 and Max_Data = 23 if the @ref LL_RTC_TIME_FORMAT_AM_OR_24 is selected.
- This feature can be modified afterwards using unitary function @ref LL_RTC_TIME_SetHour(). */
- uint8_t Minutes; /*!< Specifies the RTC Time Minutes.
- This parameter must be a number between Min_Data = 0 and Max_Data = 59
- This feature can be modified afterwards using unitary function @ref LL_RTC_TIME_SetMinute(). */
- uint8_t Seconds; /*!< Specifies the RTC Time Seconds.
- This parameter must be a number between Min_Data = 0 and Max_Data = 59
- This feature can be modified afterwards using unitary function @ref LL_RTC_TIME_SetSecond(). */
- } LL_RTC_TimeTypeDef;
- /**
- * @brief RTC Date structure definition
- */
- typedef struct
- {
- uint8_t WeekDay; /*!< Specifies the RTC Date WeekDay.
- This parameter can be a value of @ref RTC_LL_EC_WEEKDAY
- This feature can be modified afterwards using unitary function @ref LL_RTC_DATE_SetWeekDay(). */
- uint8_t Month; /*!< Specifies the RTC Date Month.
- This parameter can be a value of @ref RTC_LL_EC_MONTH
- This feature can be modified afterwards using unitary function @ref LL_RTC_DATE_SetMonth(). */
- uint8_t Day; /*!< Specifies the RTC Date Day.
- This parameter must be a number between Min_Data = 1 and Max_Data = 31
- This feature can be modified afterwards using unitary function @ref LL_RTC_DATE_SetDay(). */
- uint8_t Year; /*!< Specifies the RTC Date Year.
- This parameter must be a number between Min_Data = 0 and Max_Data = 99
- This feature can be modified afterwards using unitary function @ref LL_RTC_DATE_SetYear(). */
- } LL_RTC_DateTypeDef;
- /**
- * @brief RTC Alarm structure definition
- */
- typedef struct
- {
- LL_RTC_TimeTypeDef AlarmTime; /*!< Specifies the RTC Alarm Time members. */
- uint32_t AlarmMask; /*!< Specifies the RTC Alarm Masks.
- This parameter can be a value of @ref RTC_LL_EC_ALMA_MASK for ALARM A or @ref RTC_LL_EC_ALMB_MASK for ALARM B.
- This feature can be modified afterwards using unitary function @ref LL_RTC_ALMA_SetMask() for ALARM A
- or @ref LL_RTC_ALMB_SetMask() for ALARM B
- */
- uint32_t AlarmDateWeekDaySel; /*!< Specifies the RTC Alarm is on day or WeekDay.
- This parameter can be a value of @ref RTC_LL_EC_ALMA_WEEKDAY_SELECTION for ALARM A or @ref RTC_LL_EC_ALMB_WEEKDAY_SELECTION for ALARM B
- This feature can be modified afterwards using unitary function @ref LL_RTC_ALMA_EnableWeekday() or @ref LL_RTC_ALMA_DisableWeekday()
- for ALARM A or @ref LL_RTC_ALMB_EnableWeekday() or @ref LL_RTC_ALMB_DisableWeekday() for ALARM B
- */
- uint8_t AlarmDateWeekDay; /*!< Specifies the RTC Alarm Day/WeekDay.
- If AlarmDateWeekDaySel set to day, this parameter must be a number between Min_Data = 1 and Max_Data = 31.
- This feature can be modified afterwards using unitary function @ref LL_RTC_ALMA_SetDay()
- for ALARM A or @ref LL_RTC_ALMB_SetDay() for ALARM B.
- If AlarmDateWeekDaySel set to Weekday, this parameter can be a value of @ref RTC_LL_EC_WEEKDAY.
- This feature can be modified afterwards using unitary function @ref LL_RTC_ALMA_SetWeekDay()
- for ALARM A or @ref LL_RTC_ALMB_SetWeekDay() for ALARM B.
- */
- } LL_RTC_AlarmTypeDef;
- /**
- * @}
- */
- #endif /* USE_FULL_LL_DRIVER */
- /* Exported constants --------------------------------------------------------*/
- /** @defgroup RTC_LL_Exported_Constants RTC Exported Constants
- * @{
- */
- #if defined(USE_FULL_LL_DRIVER)
- /** @defgroup RTC_LL_EC_FORMAT FORMAT
- * @{
- */
- #define LL_RTC_FORMAT_BIN 0x00000000U /*!< Binary data format */
- #define LL_RTC_FORMAT_BCD 0x00000001U /*!< BCD data format */
- /**
- * @}
- */
- /** @defgroup RTC_LL_EC_ALMA_WEEKDAY_SELECTION RTC Alarm A Date WeekDay
- * @{
- */
- #define LL_RTC_ALMA_DATEWEEKDAYSEL_DATE 0x00000000U /*!< Alarm A Date is selected */
- #define LL_RTC_ALMA_DATEWEEKDAYSEL_WEEKDAY RTC_ALRMAR_WDSEL /*!< Alarm A WeekDay is selected */
- /**
- * @}
- */
- /** @defgroup RTC_LL_EC_ALMB_WEEKDAY_SELECTION RTC Alarm B Date WeekDay
- * @{
- */
- #define LL_RTC_ALMB_DATEWEEKDAYSEL_DATE 0x00000000U /*!< Alarm B Date is selected */
- #define LL_RTC_ALMB_DATEWEEKDAYSEL_WEEKDAY RTC_ALRMBR_WDSEL /*!< Alarm B WeekDay is selected */
- /**
- * @}
- */
- #endif /* USE_FULL_LL_DRIVER */
- /** @defgroup RTC_LL_EC_GET_FLAG Get Flags Defines
- * @brief Flags defines which can be used with LL_RTC_ReadReg function
- * @{
- */
- #define LL_RTC_SCR_ITSF RTC_SCR_CITSF
- #define LL_RTC_SCR_TSOVF RTC_SCR_CTSOVF
- #define LL_RTC_SCR_TSF RTC_SCR_CTSF
- #define LL_RTC_SCR_WUTF RTC_SCR_CWUTF
- #define LL_RTC_SCR_ALRBF RTC_SCR_CALRBF
- #define LL_RTC_CSR_ALRAF RTC_SCR_CALRAF
- #define LL_RTC_ICSR_RECALPF RTC_ICSR_RECALPF
- #define LL_RTC_ICSR_INITF RTC_ICSR_INITF
- #define LL_RTC_ICSR_RSF RTC_ICSR_RSF
- #define LL_RTC_ICSR_INITS RTC_ICSR_INITS
- #define LL_RTC_ICSR_SHPF RTC_ICSR_SHPF
- #define LL_RTC_ICSR_WUTWF RTC_ICSR_WUTWF
- #define LL_RTC_ICSR_ALRBWF RTC_ICSR_ALRBWF
- #define LL_RTC_ICSR_ALRAWF RTC_ICSR_ALRAWF
- /**
- * @}
- */
- /** @defgroup RTC_LL_EC_IT IT Defines
- * @brief IT defines which can be used with LL_RTC_ReadReg and LL_RTC_WriteReg functions
- * @{
- */
- #define LL_RTC_CR_TSIE RTC_CR_TSIE
- #define LL_RTC_CR_WUTIE RTC_CR_WUTIE
- #define LL_RTC_CR_ALRBIE RTC_CR_ALRBIE
- #define LL_RTC_CR_ALRAIE RTC_CR_ALRAIE
- /**
- * @}
- */
- /** @defgroup RTC_LL_EC_WEEKDAY WEEK DAY
- * @{
- */
- #define LL_RTC_WEEKDAY_MONDAY (uint8_t)0x01 /*!< Monday */
- #define LL_RTC_WEEKDAY_TUESDAY (uint8_t)0x02 /*!< Tuesday */
- #define LL_RTC_WEEKDAY_WEDNESDAY (uint8_t)0x03 /*!< Wednesday */
- #define LL_RTC_WEEKDAY_THURSDAY (uint8_t)0x04 /*!< Thrusday */
- #define LL_RTC_WEEKDAY_FRIDAY (uint8_t)0x05 /*!< Friday */
- #define LL_RTC_WEEKDAY_SATURDAY (uint8_t)0x06 /*!< Saturday */
- #define LL_RTC_WEEKDAY_SUNDAY (uint8_t)0x07 /*!< Sunday */
- /**
- * @}
- */
- /** @defgroup RTC_LL_EC_MONTH MONTH
- * @{
- */
- #define LL_RTC_MONTH_JANUARY (uint8_t)0x01 /*!< January */
- #define LL_RTC_MONTH_FEBRUARY (uint8_t)0x02 /*!< February */
- #define LL_RTC_MONTH_MARCH (uint8_t)0x03 /*!< March */
- #define LL_RTC_MONTH_APRIL (uint8_t)0x04 /*!< April */
- #define LL_RTC_MONTH_MAY (uint8_t)0x05 /*!< May */
- #define LL_RTC_MONTH_JUNE (uint8_t)0x06 /*!< June */
- #define LL_RTC_MONTH_JULY (uint8_t)0x07 /*!< July */
- #define LL_RTC_MONTH_AUGUST (uint8_t)0x08 /*!< August */
- #define LL_RTC_MONTH_SEPTEMBER (uint8_t)0x09 /*!< September */
- #define LL_RTC_MONTH_OCTOBER (uint8_t)0x10 /*!< October */
- #define LL_RTC_MONTH_NOVEMBER (uint8_t)0x11 /*!< November */
- #define LL_RTC_MONTH_DECEMBER (uint8_t)0x12 /*!< December */
- /**
- * @}
- */
- /** @defgroup RTC_LL_EC_HOURFORMAT HOUR FORMAT
- * @{
- */
- #define LL_RTC_HOURFORMAT_24HOUR 0x00000000U /*!< 24 hour/day format */
- #define LL_RTC_HOURFORMAT_AMPM RTC_CR_FMT /*!< AM/PM hour format */
- /**
- * @}
- */
- /** @defgroup RTC_LL_EC_ALARMOUT ALARM OUTPUT
- * @{
- */
- #define LL_RTC_ALARMOUT_DISABLE 0x00000000U /*!< Output disabled */
- #define LL_RTC_ALARMOUT_ALMA RTC_CR_OSEL_0 /*!< Alarm A output enabled */
- #define LL_RTC_ALARMOUT_ALMB RTC_CR_OSEL_1 /*!< Alarm B output enabled */
- #define LL_RTC_ALARMOUT_WAKEUP RTC_CR_OSEL /*!< Wakeup output enabled */
- /**
- * @}
- */
- /** @defgroup RTC_LL_EC_ALARM_OUTPUTTYPE ALARM OUTPUT TYPE
- * @{
- */
- #define LL_RTC_ALARM_OUTPUTTYPE_OPENDRAIN RTC_CR_TAMPALRM_TYPE /*!< RTC_ALARM is open-drain output */
- #define LL_RTC_ALARM_OUTPUTTYPE_PUSHPULL 0x00000000U /*!< RTC_ALARM is push-pull output */
- /**
- * @}
- */
- /** @defgroup RTC_LL_EC_OUTPUTPOLARITY_PIN OUTPUT POLARITY PIN
- * @{
- */
- #define LL_RTC_OUTPUTPOLARITY_PIN_HIGH 0x00000000U /*!< Pin is high when ALRAF/ALRBF/WUTF is asserted (depending on OSEL)*/
- #define LL_RTC_OUTPUTPOLARITY_PIN_LOW RTC_CR_POL /*!< Pin is low when ALRAF/ALRBF/WUTF is asserted (depending on OSEL) */
- /**
- * @}
- */
- /** @defgroup RTC_LL_EC_TIME_FORMAT TIME FORMAT
- * @{
- */
- #define LL_RTC_TIME_FORMAT_AM_OR_24 0x00000000U /*!< AM or 24-hour format */
- #define LL_RTC_TIME_FORMAT_PM RTC_TR_PM /*!< PM */
- /**
- * @}
- */
- /** @defgroup RTC_LL_EC_SHIFT_SECOND SHIFT SECOND
- * @{
- */
- #define LL_RTC_SHIFT_SECOND_DELAY 0x00000000U /* Delay (seconds) = SUBFS / (PREDIV_S + 1) */
- #define LL_RTC_SHIFT_SECOND_ADVANCE RTC_SHIFTR_ADD1S /* Advance (seconds) = (1 - (SUBFS / (PREDIV_S + 1))) */
- /**
- * @}
- */
- /** @defgroup RTC_LL_EC_ALMA_MASK ALARMA MASK
- * @{
- */
- #define LL_RTC_ALMA_MASK_NONE 0x00000000U /*!< No masks applied on Alarm A*/
- #define LL_RTC_ALMA_MASK_DATEWEEKDAY RTC_ALRMAR_MSK4 /*!< Date/day do not care in Alarm A comparison */
- #define LL_RTC_ALMA_MASK_HOURS RTC_ALRMAR_MSK3 /*!< Hours do not care in Alarm A comparison */
- #define LL_RTC_ALMA_MASK_MINUTES RTC_ALRMAR_MSK2 /*!< Minutes do not care in Alarm A comparison */
- #define LL_RTC_ALMA_MASK_SECONDS RTC_ALRMAR_MSK1 /*!< Seconds do not care in Alarm A comparison */
- #define LL_RTC_ALMA_MASK_ALL (RTC_ALRMAR_MSK4 | RTC_ALRMAR_MSK3 | RTC_ALRMAR_MSK2 | RTC_ALRMAR_MSK1) /*!< Masks all */
- /**
- * @}
- */
- /** @defgroup RTC_LL_EC_ALMA_TIME_FORMAT ALARMA TIME FORMAT
- * @{
- */
- #define LL_RTC_ALMA_TIME_FORMAT_AM 0x00000000U /*!< AM or 24-hour format */
- #define LL_RTC_ALMA_TIME_FORMAT_PM RTC_ALRMAR_PM /*!< PM */
- /**
- * @}
- */
- /** @defgroup RTC_LL_EC_ALMB_MASK ALARMB MASK
- * @{
- */
- #define LL_RTC_ALMB_MASK_NONE 0x00000000U /*!< No masks applied on Alarm B*/
- #define LL_RTC_ALMB_MASK_DATEWEEKDAY RTC_ALRMBR_MSK4 /*!< Date/day do not care in Alarm B comparison */
- #define LL_RTC_ALMB_MASK_HOURS RTC_ALRMBR_MSK3 /*!< Hours do not care in Alarm B comparison */
- #define LL_RTC_ALMB_MASK_MINUTES RTC_ALRMBR_MSK2 /*!< Minutes do not care in Alarm B comparison */
- #define LL_RTC_ALMB_MASK_SECONDS RTC_ALRMBR_MSK1 /*!< Seconds do not care in Alarm B comparison */
- #define LL_RTC_ALMB_MASK_ALL (RTC_ALRMBR_MSK4 | RTC_ALRMBR_MSK3 | RTC_ALRMBR_MSK2 | RTC_ALRMBR_MSK1) /*!< Masks all */
- /**
- * @}
- */
- /** @defgroup RTC_LL_EC_ALMB_TIME_FORMAT ALARMB TIME FORMAT
- * @{
- */
- #define LL_RTC_ALMB_TIME_FORMAT_AM 0x00000000U /*!< AM or 24-hour format */
- #define LL_RTC_ALMB_TIME_FORMAT_PM RTC_ALRMBR_PM /*!< PM */
- /**
- * @}
- */
- /** @defgroup RTC_LL_EC_TIMESTAMP_EDGE TIMESTAMP EDGE
- * @{
- */
- #define LL_RTC_TIMESTAMP_EDGE_RISING 0x00000000U /*!< RTC_TS input rising edge generates a time-stamp event */
- #define LL_RTC_TIMESTAMP_EDGE_FALLING RTC_CR_TSEDGE /*!< RTC_TS input falling edge generates a time-stamp even */
- /**
- * @}
- */
- /** @defgroup RTC_LL_EC_TS_TIME_FORMAT TIMESTAMP TIME FORMAT
- * @{
- */
- #define LL_RTC_TS_TIME_FORMAT_AM 0x00000000U /*!< AM or 24-hour format */
- #define LL_RTC_TS_TIME_FORMAT_PM RTC_TSTR_PM /*!< PM */
- /**
- * @}
- */
- /** @defgroup RTC_LL_EC_TAMPER TAMPER
- * @{
- */
- #define LL_RTC_TAMPER_1 TAMP_CR1_TAMP1E /*!< Tamper 1 input detection */
- #define LL_RTC_TAMPER_2 TAMP_CR1_TAMP2E /*!< Tamper 2 input detection */
- #if (RTC_TAMP_NB == 3)
- #define LL_RTC_TAMPER_3 TAMP_CR1_TAMP3E /*!< Tamper 3 input detection */
- #elif (RTC_TAMP_NB == 8)
- #define LL_RTC_TAMPER_3 TAMP_CR1_TAMP3E /*!< Tamper 3 input detection */
- #define LL_RTC_TAMPER_3 TAMP_CR1_TAMP3E /*!< Tamper 3 input detection */
- #define LL_RTC_TAMPER_4 TAMP_CR1_TAMP4E /*!< Tamper 4 input detection */
- #define LL_RTC_TAMPER_5 TAMP_CR1_TAMP5E /*!< Tamper 5 input detection */
- #define LL_RTC_TAMPER_6 TAMP_CR1_TAMP6E /*!< Tamper 6 input detection */
- #define LL_RTC_TAMPER_7 TAMP_CR1_TAMP7E /*!< Tamper 7 input detection */
- #define LL_RTC_TAMPER_8 TAMP_CR1_TAMP8E /*!< Tamper 8 input detection */
- #else
- #warning "RTC_TAMP_NB is not correct"
- #endif /* (RTC_TAMP_NB) */
- /**
- * @}
- */
- /** @defgroup RTC_LL_EC_TAMPER_MASK TAMPER MASK
- * @{
- */
- #define LL_RTC_TAMPER_MASK_TAMPER1 TAMP_CR2_TAMP1MSK /*!< Tamper 1 event generates a trigger event. TAMP1F is masked and internally cleared by hardware.The backup registers are not erased */
- #define LL_RTC_TAMPER_MASK_TAMPER2 TAMP_CR2_TAMP2MSK /*!< Tamper 2 event generates a trigger event. TAMP2F is masked and internally cleared by hardware. The backup registers are not erased. */
- #if (RTC_TAMP_NB == 3)
- #define LL_RTC_TAMPER_MASK_TAMPER3 TAMP_CR2_TAMP3MSK /*!< Tamper 3 event generates a trigger event. TAMP2F is masked and internally cleared by hardware. The backup registers are not erased. */
- #elif (RTC_TAMP_NB == 8)
- #define LL_RTC_TAMPER_MASK_TAMPER3 TAMP_CR2_TAMP3MSK /*!< Tamper 3 event generates a trigger event. TAMP2F is masked and internally cleared by hardware. The backup registers are not erased. */
- #define LL_RTC_TAMPER_MASK_TAMPER4 TAMP_CR2_TAMP4MSK /*!< Tamper 4 event generates a trigger event. TAMP1F is masked and internally cleared by hardware.The backup registers are not erased */
- #define LL_RTC_TAMPER_MASK_TAMPER5 TAMP_CR2_TAMP5MSK /*!< Tamper 5 event generates a trigger event. TAMP2F is masked and internally cleared by hardware. The backup registers are not erased. */
- #define LL_RTC_TAMPER_MASK_TAMPER6 TAMP_CR2_TAMP6MSK /*!< Tamper 6 event generates a trigger event. TAMP1F is masked and internally cleared by hardware.The backup registers are not erased */
- #define LL_RTC_TAMPER_MASK_TAMPER7 TAMP_CR2_TAMP7MSK /*!< Tamper 7 event generates a trigger event. TAMP2F is masked and internally cleared by hardware. The backup registers are not erased. */
- #define LL_RTC_TAMPER_MASK_TAMPER8 TAMP_CR2_TAMP8MSK /*!< Tamper 8 event generates a trigger event. TAMP2F is masked and internally cleared by hardware. The backup registers are not erased. */
- #else
- #warning "RTC_TAMP_NB is not correct"
- #endif /* (RTC_TAMP_NB) */
- /**
- * @}
- */
- /** @defgroup RTC_LL_EC_TAMPER_NOERASE TAMPER NO ERASE
- * @{
- */
- #define LL_RTC_TAMPER_NOERASE_TAMPER1 TAMP_CR2_TAMP1NOERASE /*!< Tamper 1 event does not erase the backup registers. */
- #define LL_RTC_TAMPER_NOERASE_TAMPER2 TAMP_CR2_TAMP2NOERASE /*!< Tamper 2 event does not erase the backup registers. */
- #if (RTC_TAMP_NB == 3)
- #define LL_RTC_TAMPER_NOERASE_TAMPER3 TAMP_CR2_TAMP3NOERASE /*!< Tamper 3 event does not erase the backup registers. */
- #elif (RTC_TAMP_NB == 8)
- #define LL_RTC_TAMPER_NOERASE_TAMPER3 TAMP_CR2_TAMP3NOERASE /*!< Tamper 3 event does not erase the backup registers. */
- #define LL_RTC_TAMPER_NOERASE_TAMPER4 TAMP_CR2_TAMP4NOERASE /*!< Tamper 4 event does not erase the backup registers. */
- #define LL_RTC_TAMPER_NOERASE_TAMPER5 TAMP_CR2_TAMP5NOERASE /*!< Tamper 5 event does not erase the backup registers. */
- #define LL_RTC_TAMPER_NOERASE_TAMPER6 TAMP_CR2_TAMP6NOERASE /*!< Tamper 6 event does not erase the backup registers. */
- #define LL_RTC_TAMPER_NOERASE_TAMPER7 TAMP_CR2_TAMP7NOERASE /*!< Tamper 7 event does not erase the backup registers. */
- #define LL_RTC_TAMPER_NOERASE_TAMPER8 TAMP_CR2_TAMP8NOERASE /*!< Tamper 8 event does not erase the backup registers. */
- #else
- #warning "RTC_TAMP_NB is not correct"
- #endif /* (RTC_TAMP_NB) */
- /**
- * @}
- */
- /** @defgroup RTC_LL_EC_TAMPER_DURATION TAMPER DURATION
- * @{
- */
- #define LL_RTC_TAMPER_DURATION_1RTCCLK 0x00000000U /*!< Tamper pins are pre-charged before sampling during 1 RTCCLK cycle */
- #define LL_RTC_TAMPER_DURATION_2RTCCLK TAMP_FLTCR_TAMPPRCH_0 /*!< Tamper pins are pre-charged before sampling during 2 RTCCLK cycles */
- #define LL_RTC_TAMPER_DURATION_4RTCCLK TAMP_FLTCR_TAMPPRCH_1 /*!< Tamper pins are pre-charged before sampling during 4 RTCCLK cycles */
- #define LL_RTC_TAMPER_DURATION_8RTCCLK TAMP_FLTCR_TAMPPRCH /*!< Tamper pins are pre-charged before sampling during 8 RTCCLK cycles */
- /**
- * @}
- */
- /** @defgroup RTC_LL_EC_TAMPER_FILTER TAMPER FILTER
- * @{
- */
- #define LL_RTC_TAMPER_FILTER_DISABLE 0x00000000U /*!< Tamper filter is disabled */
- #define LL_RTC_TAMPER_FILTER_2SAMPLE TAMP_FLTCR_TAMPFLT_0 /*!< Tamper is activated after 2 consecutive samples at the active level */
- #define LL_RTC_TAMPER_FILTER_4SAMPLE TAMP_FLTCR_TAMPFLT_1 /*!< Tamper is activated after 4 consecutive samples at the active level */
- #define LL_RTC_TAMPER_FILTER_8SAMPLE TAMP_FLTCR_TAMPFLT /*!< Tamper is activated after 8 consecutive samples at the active level. */
- /**
- * @}
- */
- /** @defgroup RTC_LL_EC_TAMPER_SAMPLFREQDIV TAMPER SAMPLING FREQUENCY DIVIDER
- * @{
- */
- #define LL_RTC_TAMPER_SAMPLFREQDIV_32768 0x00000000U /*!< Each of the tamper inputs are sampled with a frequency = RTCCLK / 32768 */
- #define LL_RTC_TAMPER_SAMPLFREQDIV_16384 TAMP_FLTCR_TAMPFREQ_0 /*!< Each of the tamper inputs are sampled with a frequency = RTCCLK / 16384 */
- #define LL_RTC_TAMPER_SAMPLFREQDIV_8192 TAMP_FLTCR_TAMPFREQ_1 /*!< Each of the tamper inputs are sampled with a frequency = RTCCLK / 8192 */
- #define LL_RTC_TAMPER_SAMPLFREQDIV_4096 (TAMP_FLTCR_TAMPFREQ_1 | TAMP_FLTCR_TAMPFREQ_0) /*!< Each of the tamper inputs are sampled with a frequency = RTCCLK / 4096 */
- #define LL_RTC_TAMPER_SAMPLFREQDIV_2048 TAMP_FLTCR_TAMPFREQ_2 /*!< Each of the tamper inputs are sampled with a frequency = RTCCLK / 2048 */
- #define LL_RTC_TAMPER_SAMPLFREQDIV_1024 (TAMP_FLTCR_TAMPFREQ_2 | TAMP_FLTCR_TAMPFREQ_0) /*!< Each of the tamper inputs are sampled with a frequency = RTCCLK / 1024 */
- #define LL_RTC_TAMPER_SAMPLFREQDIV_512 (TAMP_FLTCR_TAMPFREQ_2 | TAMP_FLTCR_TAMPFREQ_1) /*!< Each of the tamper inputs are sampled with a frequency = RTCCLK / 512 */
- #define LL_RTC_TAMPER_SAMPLFREQDIV_256 TAMP_FLTCR_TAMPFREQ /*!< Each of the tamper inputs are sampled with a frequency = RTCCLK / 256 */
- /**
- * @}
- */
- /** @defgroup RTC_LL_EC_TAMPER_ACTIVELEVEL TAMPER ACTIVE LEVEL
- * @{
- */
- #define LL_RTC_TAMPER_ACTIVELEVEL_TAMP1 TAMP_CR2_TAMP1TRG /*!< Tamper 1 input falling edge (if TAMPFLT = 00) or staying high (if TAMPFLT != 00) triggers a tamper detection event */
- #define LL_RTC_TAMPER_ACTIVELEVEL_TAMP2 TAMP_CR2_TAMP2TRG /*!< Tamper 2 input falling edge (if TAMPFLT = 00) or staying high (if TAMPFLT != 00) triggers a tamper detection event */
- #if (RTC_TAMP_NB == 3)
- #define LL_RTC_TAMPER_ACTIVELEVEL_TAMP3 TAMP_CR2_TAMP3TRG /*!< Tamper 3 input falling edge (if TAMPFLT = 00) or staying high (if TAMPFLT != 00) triggers a tamper detection event */
- #elif (RTC_TAMP_NB == 8)
- #define LL_RTC_TAMPER_ACTIVELEVEL_TAMP3 TAMP_CR2_TAMP3TRG /*!< Tamper 3 input falling edge (if TAMPFLT = 00) or staying high (if TAMPFLT != 00) triggers a tamper detection event */
- #define LL_RTC_TAMPER_ACTIVELEVEL_TAMP4 TAMP_CR2_TAMP4TRG /*!< Tamper 4 input falling edge (if TAMPFLT = 00) or staying high (if TAMPFLT != 00) triggers a tamper detection event */
- #define LL_RTC_TAMPER_ACTIVELEVEL_TAMP5 TAMP_CR2_TAMP5TRG /*!< Tamper 5 input falling edge (if TAMPFLT = 00) or staying high (if TAMPFLT != 00) triggers a tamper detection event */
- #define LL_RTC_TAMPER_ACTIVELEVEL_TAMP6 TAMP_CR2_TAMP6TRG /*!< Tamper 6 input falling edge (if TAMPFLT = 00) or staying high (if TAMPFLT != 00) triggers a tamper detection event */
- #define LL_RTC_TAMPER_ACTIVELEVEL_TAMP7 TAMP_CR2_TAMP7TRG /*!< Tamper 7 input falling edge (if TAMPFLT = 00) or staying high (if TAMPFLT != 00) triggers a tamper detection event */
- #define LL_RTC_TAMPER_ACTIVELEVEL_TAMP8 TAMP_CR2_TAMP8TRG /*!< Tamper 8 input falling edge (if TAMPFLT = 00) or staying high (if TAMPFLT != 00) triggers a tamper detection event */
- #endif /* (RTC_TAMP_NB) */
- /**
- * @}
- */
- /** @defgroup RTC_LL_EC_INTERNAL INTERNAL TAMPER
- * @{
- */
- #define LL_RTC_TAMPER_ITAMP1 TAMP_CR1_ITAMP1E /*!< Internal tamper 1: RTC supply voltage monitoring */
- #if defined (RTC_TAMP_INT_2_SUPPORT)
- #define LL_RTC_TAMPER_ITAMP2 TAMP_CR1_ITAMP2E /*!< Internal tamper 2: temperature monitoring */
- #endif /* RTC_TAMP_INT_2_SUPPORT */
- #define LL_RTC_TAMPER_ITAMP3 TAMP_CR1_ITAMP3E /*!< Internal tamper 3: LSE monitoring */
- #define LL_RTC_TAMPER_ITAMP4 TAMP_CR1_ITAMP4E /*!< Internal tamper 4: HSE monitoring */
- #define LL_RTC_TAMPER_ITAMP5 TAMP_CR1_ITAMP5E /*!< Internal tamper 5: RTC calendar overflow */
- #if defined (RTC_TAMP_INT_6_SUPPORT)
- #define LL_RTC_TAMPER_ITAMP6 TAMP_CR1_ITAMP6E /*!< Internal tamper 6: Test mode entry */
- #endif /* RTC_TAMP_INT_6_SUPPORT */
- #if defined (RTC_TAMP_INT_7_SUPPORT)
- #define LL_RTC_TAMPER_ITAMP7 TAMP_CR1_ITAMP7E /*!< Internal tamper 7: Readout protection level decrease */
- #endif /* RTC_TAMP_INT_7_SUPPORT */
- #if defined (RTC_TAMP_INT_8_SUPPORT)
- #define LL_RTC_TAMPER_ITAMP8 TAMP_CR1_ITAMP8E /*!< Internal tamper 8: Monotonic counter overflow */
- #endif /* RTC_TAMP_INT_8_SUPPORT */
- /**
- * @}
- */
- /** @defgroup RTC_LL_EC_BKP BACKUP
- * @{
- */
- #define LL_RTC_BKP_NUMBER RTC_BACKUP_NB
- #if (LL_RTC_BKP_NUMBER == 5)
- #define LL_RTC_BKP_DR0 0x00U
- #define LL_RTC_BKP_DR1 0x01U
- #define LL_RTC_BKP_DR2 0x02U
- #define LL_RTC_BKP_DR3 0x03U
- #define LL_RTC_BKP_DR4 0x04U
- #elif (LL_RTC_BKP_NUMBER == 16)
- #define LL_RTC_BKP_DR0 0x00U
- #define LL_RTC_BKP_DR1 0x01U
- #define LL_RTC_BKP_DR2 0x02U
- #define LL_RTC_BKP_DR3 0x03U
- #define LL_RTC_BKP_DR4 0x04U
- #define LL_RTC_BKP_DR5 0x05U
- #define LL_RTC_BKP_DR6 0x06U
- #define LL_RTC_BKP_DR7 0x07U
- #define LL_RTC_BKP_DR8 0x08U
- #define LL_RTC_BKP_DR9 0x09U
- #define LL_RTC_BKP_DR10 0x0AU
- #define LL_RTC_BKP_DR11 0x0BU
- #define LL_RTC_BKP_DR12 0x0CU
- #define LL_RTC_BKP_DR13 0x0DU
- #define LL_RTC_BKP_DR14 0x0EU
- #define LL_RTC_BKP_DR15 0x0FU
- #elif (LL_RTC_BKP_NUMBER == 32)
- #define LL_RTC_BKP_DR0 0x00U
- #define LL_RTC_BKP_DR1 0x01U
- #define LL_RTC_BKP_DR2 0x02U
- #define LL_RTC_BKP_DR3 0x03U
- #define LL_RTC_BKP_DR4 0x04U
- #define LL_RTC_BKP_DR5 0x05U
- #define LL_RTC_BKP_DR6 0x06U
- #define LL_RTC_BKP_DR7 0x07U
- #define LL_RTC_BKP_DR8 0x08U
- #define LL_RTC_BKP_DR9 0x09U
- #define LL_RTC_BKP_DR10 0x0AU
- #define LL_RTC_BKP_DR11 0x0BU
- #define LL_RTC_BKP_DR12 0x0CU
- #define LL_RTC_BKP_DR13 0x0DU
- #define LL_RTC_BKP_DR14 0x0EU
- #define LL_RTC_BKP_DR15 0x0FU
- #define LL_RTC_BKP_DR16 0x10U
- #define LL_RTC_BKP_DR17 0x11U
- #define LL_RTC_BKP_DR18 0x12U
- #define LL_RTC_BKP_DR19 0x13U
- #define LL_RTC_BKP_DR20 0x14U
- #define LL_RTC_BKP_DR21 0x15U
- #define LL_RTC_BKP_DR22 0x16U
- #define LL_RTC_BKP_DR23 0x17U
- #define LL_RTC_BKP_DR24 0x18U
- #define LL_RTC_BKP_DR25 0x19U
- #define LL_RTC_BKP_DR26 0x1AU
- #define LL_RTC_BKP_DR27 0x1BU
- #define LL_RTC_BKP_DR28 0x1CU
- #define LL_RTC_BKP_DR29 0x1DU
- #define LL_RTC_BKP_DR30 0x1EU
- #define LL_RTC_BKP_DR31 0x1FU
- #else
- #error "no LL Backup Registers Definition"
- #endif /* (LL_RTC_BKP_NUMBER) */
- /**
- * @}
- */
- /** @defgroup RTC_LL_EC_WAKEUPCLOCK_DIV WAKEUP CLOCK DIV
- * @{
- */
- #define LL_RTC_WAKEUPCLOCK_DIV_16 0x00000000U /*!< RTC/16 clock is selected */
- #define LL_RTC_WAKEUPCLOCK_DIV_8 RTC_CR_WUCKSEL_0 /*!< RTC/8 clock is selected */
- #define LL_RTC_WAKEUPCLOCK_DIV_4 RTC_CR_WUCKSEL_1 /*!< RTC/4 clock is selected */
- #define LL_RTC_WAKEUPCLOCK_DIV_2 (RTC_CR_WUCKSEL_1 | RTC_CR_WUCKSEL_0) /*!< RTC/2 clock is selected */
- #define LL_RTC_WAKEUPCLOCK_CKSPRE RTC_CR_WUCKSEL_2 /*!< ck_spre (usually 1 Hz) clock is selected */
- #define LL_RTC_WAKEUPCLOCK_CKSPRE_WUT (RTC_CR_WUCKSEL_2 | RTC_CR_WUCKSEL_1) /*!< ck_spre (usually 1 Hz) clock is selected and 2exp16 is added to the WUT counter value*/
- /**
- * @}
- */
- /** @defgroup RTC_LL_EC_CALIB_OUTPUT Calibration output
- * @{
- */
- #define LL_RTC_CALIB_OUTPUT_NONE 0x00000000U /*!< Calibration output disabled */
- #define LL_RTC_CALIB_OUTPUT_1HZ (RTC_CR_COE | RTC_CR_COSEL) /*!< Calibration output is 1 Hz */
- #define LL_RTC_CALIB_OUTPUT_512HZ RTC_CR_COE /*!< Calibration output is 512 Hz */
- /**
- * @}
- */
- /** @defgroup RTC_LL_EC_CALIB_INSERTPULSE Calibration pulse insertion
- * @{
- */
- #define LL_RTC_CALIB_INSERTPULSE_NONE 0x00000000U /*!< No RTCCLK pulses are added */
- #define LL_RTC_CALIB_INSERTPULSE_SET RTC_CALR_CALP /*!< One RTCCLK pulse is effectively inserted every 2exp11 pulses (frequency increased by 488.5 ppm) */
- /**
- * @}
- */
- /** @defgroup RTC_LL_EC_CALIB_PERIOD Calibration period
- * @{
- */
- #define LL_RTC_CALIB_PERIOD_32SEC 0x00000000U /*!< Use a 32-second calibration cycle period */
- #define LL_RTC_CALIB_PERIOD_16SEC RTC_CALR_CALW16 /*!< Use a 16-second calibration cycle period */
- #define LL_RTC_CALIB_PERIOD_8SEC RTC_CALR_CALW8 /*!< Use a 8-second calibration cycle period */
- /**
- * @}
- */
- /**
- * @}
- */
- /* Exported macro ------------------------------------------------------------*/
- /** @defgroup RTC_LL_EM_Convert Convert helper Macros
- * @{
- */
- /**
- * @brief Helper macro to convert a value from 2 digit decimal format to BCD format
- * @param __VALUE__ Byte to be converted
- * @retval Converted byte
- */
- #define __LL_RTC_CONVERT_BIN2BCD(__VALUE__) (uint8_t)((((__VALUE__) / 10U) << 4U) | ((__VALUE__) % 10U))
- /**
- * @brief Helper macro to convert a value from BCD format to 2 digit decimal format
- * @param __VALUE__ BCD value to be converted
- * @retval Converted byte
- */
- #define __LL_RTC_CONVERT_BCD2BIN(__VALUE__) ((uint8_t)((((uint8_t)((__VALUE__) & (uint8_t)0xF0U) >> (uint8_t)0x4U) * 10U) + ((__VALUE__) & (uint8_t)0x0FU)))
- /**
- * @}
- */
- /** @defgroup RTC_LL_EM_Date Date helper Macros
- * @{
- */
- /**
- * @brief Helper macro to retrieve weekday.
- * @param __RTC_DATE__ Date returned by @ref LL_RTC_DATE_Get function.
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_RTC_WEEKDAY_MONDAY
- * @arg @ref LL_RTC_WEEKDAY_TUESDAY
- * @arg @ref LL_RTC_WEEKDAY_WEDNESDAY
- * @arg @ref LL_RTC_WEEKDAY_THURSDAY
- * @arg @ref LL_RTC_WEEKDAY_FRIDAY
- * @arg @ref LL_RTC_WEEKDAY_SATURDAY
- * @arg @ref LL_RTC_WEEKDAY_SUNDAY
- */
- #define __LL_RTC_GET_WEEKDAY(__RTC_DATE__) (((__RTC_DATE__) >> RTC_OFFSET_WEEKDAY) & 0x000000FFU)
- /**
- * @brief Helper macro to retrieve Year in BCD format
- * @param __RTC_DATE__ Value returned by @ref LL_RTC_DATE_Get
- * @retval Year in BCD format (0x00 . . . 0x99)
- */
- #define __LL_RTC_GET_YEAR(__RTC_DATE__) ((__RTC_DATE__) & 0x000000FFU)
- /**
- * @brief Helper macro to retrieve Month in BCD format
- * @param __RTC_DATE__ Value returned by @ref LL_RTC_DATE_Get
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_RTC_MONTH_JANUARY
- * @arg @ref LL_RTC_MONTH_FEBRUARY
- * @arg @ref LL_RTC_MONTH_MARCH
- * @arg @ref LL_RTC_MONTH_APRIL
- * @arg @ref LL_RTC_MONTH_MAY
- * @arg @ref LL_RTC_MONTH_JUNE
- * @arg @ref LL_RTC_MONTH_JULY
- * @arg @ref LL_RTC_MONTH_AUGUST
- * @arg @ref LL_RTC_MONTH_SEPTEMBER
- * @arg @ref LL_RTC_MONTH_OCTOBER
- * @arg @ref LL_RTC_MONTH_NOVEMBER
- * @arg @ref LL_RTC_MONTH_DECEMBER
- */
- #define __LL_RTC_GET_MONTH(__RTC_DATE__) (((__RTC_DATE__) >>RTC_OFFSET_MONTH) & 0x000000FFU)
- /**
- * @brief Helper macro to retrieve Day in BCD format
- * @param __RTC_DATE__ Value returned by @ref LL_RTC_DATE_Get
- * @retval Day in BCD format (0x01 . . . 0x31)
- */
- #define __LL_RTC_GET_DAY(__RTC_DATE__) (((__RTC_DATE__) >>RTC_OFFSET_DAY) & 0x000000FFU)
- /**
- * @}
- */
- /** @defgroup RTC_LL_EM_Time Time helper Macros
- * @{
- */
- /**
- * @brief Helper macro to retrieve hour in BCD format
- * @param __RTC_TIME__ RTC time returned by @ref LL_RTC_TIME_Get function
- * @retval Hours in BCD format (0x01. . .0x12 or between Min_Data=0x00 and Max_Data=0x23)
- */
- #define __LL_RTC_GET_HOUR(__RTC_TIME__) (((__RTC_TIME__) >> RTC_OFFSET_HOUR) & 0x000000FFU)
- /**
- * @brief Helper macro to retrieve minute in BCD format
- * @param __RTC_TIME__ RTC time returned by @ref LL_RTC_TIME_Get function
- * @retval Minutes in BCD format (0x00. . .0x59)
- */
- #define __LL_RTC_GET_MINUTE(__RTC_TIME__) (((__RTC_TIME__) >> RTC_OFFSET_MINUTE) & 0x000000FFU)
- /**
- * @brief Helper macro to retrieve second in BCD format
- * @param __RTC_TIME__ RTC time returned by @ref LL_RTC_TIME_Get function
- * @retval Seconds in format (0x00. . .0x59)
- */
- #define __LL_RTC_GET_SECOND(__RTC_TIME__) ((__RTC_TIME__) & 0x000000FFU)
- /**
- * @}
- */
- /**
- * @}
- */
- /* Exported functions --------------------------------------------------------*/
- /** @defgroup RTC_LL_Exported_Functions RTC Exported Functions
- * @{
- */
- /** @defgroup RTC_LL_EF_Configuration Configuration
- * @{
- */
- /**
- * @brief Set Hours format (24 hour/day or AM/PM hour format)
- * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
- * @note It can be written in initialization mode only (@ref LL_RTC_EnableInitMode function)
- * @rmtoll RTC_CR FMT LL_RTC_SetHourFormat
- * @param RTCx RTC Instance
- * @param HourFormat This parameter can be one of the following values:
- * @arg @ref LL_RTC_HOURFORMAT_24HOUR
- * @arg @ref LL_RTC_HOURFORMAT_AMPM
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_SetHourFormat(RTC_TypeDef *RTCx, uint32_t HourFormat)
- {
- MODIFY_REG(RTCx->CR, RTC_CR_FMT, HourFormat);
- }
- /**
- * @brief Get Hours format (24 hour/day or AM/PM hour format)
- * @rmtoll RTC_CR FMT LL_RTC_GetHourFormat
- * @param RTCx RTC Instance
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_RTC_HOURFORMAT_24HOUR
- * @arg @ref LL_RTC_HOURFORMAT_AMPM
- */
- __STATIC_INLINE uint32_t LL_RTC_GetHourFormat(RTC_TypeDef *RTCx)
- {
- return (uint32_t)(READ_BIT(RTCx->CR, RTC_CR_FMT));
- }
- /**
- * @brief Select the flag to be routed to RTC_ALARM output
- * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
- * @rmtoll RTC_CR OSEL LL_RTC_SetAlarmOutEvent
- * @param RTCx RTC Instance
- * @param AlarmOutput This parameter can be one of the following values:
- * @arg @ref LL_RTC_ALARMOUT_DISABLE
- * @arg @ref LL_RTC_ALARMOUT_ALMA
- * @arg @ref LL_RTC_ALARMOUT_ALMB
- * @arg @ref LL_RTC_ALARMOUT_WAKEUP
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_SetAlarmOutEvent(RTC_TypeDef *RTCx, uint32_t AlarmOutput)
- {
- MODIFY_REG(RTCx->CR, RTC_CR_OSEL, AlarmOutput);
- }
- /**
- * @brief Get the flag to be routed to RTC_ALARM output
- * @rmtoll RTC_CR OSEL LL_RTC_GetAlarmOutEvent
- * @param RTCx RTC Instance
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_RTC_ALARMOUT_DISABLE
- * @arg @ref LL_RTC_ALARMOUT_ALMA
- * @arg @ref LL_RTC_ALARMOUT_ALMB
- * @arg @ref LL_RTC_ALARMOUT_WAKEUP
- */
- __STATIC_INLINE uint32_t LL_RTC_GetAlarmOutEvent(RTC_TypeDef *RTCx)
- {
- return (uint32_t)(READ_BIT(RTCx->CR, RTC_CR_OSEL));
- }
- /**
- * @brief Set RTC_ALARM output type (ALARM in push-pull or open-drain output)
- * @rmtoll RTC_CR TAMPALRM_TYPE LL_RTC_SetAlarmOutputType
- * @param RTCx RTC Instance
- * @param Output This parameter can be one of the following values:
- * @arg @ref LL_RTC_ALARM_OUTPUTTYPE_OPENDRAIN
- * @arg @ref LL_RTC_ALARM_OUTPUTTYPE_PUSHPULL
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_SetAlarmOutputType(RTC_TypeDef *RTCx, uint32_t Output)
- {
- MODIFY_REG(RTCx->CR, RTC_CR_TAMPALRM_TYPE, Output);
- }
- /**
- * @brief Get RTC_ALARM output type (ALARM in push-pull or open-drain output)
- * @rmtoll RTC_CR TAMPALRM_TYPE LL_RTC_SetAlarmOutputType
- * @param RTCx RTC Instance
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_RTC_ALARM_OUTPUTTYPE_OPENDRAIN
- * @arg @ref LL_RTC_ALARM_OUTPUTTYPE_PUSHPULL
- */
- __STATIC_INLINE uint32_t LL_RTC_GetAlarmOutputType(RTC_TypeDef *RTCx)
- {
- return (uint32_t)(READ_BIT(RTCx->CR, RTC_CR_TAMPALRM_TYPE));
- }
- /**
- * @brief Enable initialization mode
- * @note Initialization mode is used to program time and date register (RTC_TR and RTC_DR)
- * and prescaler register (RTC_PRER).
- * Counters are stopped and start counting from the new value when INIT is reset.
- * @rmtoll RTC_ICSR INIT LL_RTC_EnableInitMode
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_EnableInitMode(RTC_TypeDef *RTCx)
- {
- /* Set the Initialization mode */
- WRITE_REG(RTCx->ICSR, RTC_LL_INIT_MASK);
- }
- /**
- * @brief Disable initialization mode (Free running mode)
- * @rmtoll RTC_ICSR INIT LL_RTC_DisableInitMode
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_DisableInitMode(RTC_TypeDef *RTCx)
- {
- /* Exit Initialization mode */
- WRITE_REG(RTCx->ICSR, (uint32_t)~RTC_ICSR_INIT);
- }
- /**
- * @brief Set Output polarity (pin is low when ALRAF/ALRBF/WUTF is asserted)
- * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
- * @rmtoll RTC_CR POL LL_RTC_SetOutputPolarity
- * @param RTCx RTC Instance
- * @param Polarity This parameter can be one of the following values:
- * @arg @ref LL_RTC_OUTPUTPOLARITY_PIN_HIGH
- * @arg @ref LL_RTC_OUTPUTPOLARITY_PIN_LOW
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_SetOutputPolarity(RTC_TypeDef *RTCx, uint32_t Polarity)
- {
- MODIFY_REG(RTCx->CR, RTC_CR_POL, Polarity);
- }
- /**
- * @brief Get Output polarity
- * @rmtoll RTC_CR POL LL_RTC_GetOutputPolarity
- * @param RTCx RTC Instance
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_RTC_OUTPUTPOLARITY_PIN_HIGH
- * @arg @ref LL_RTC_OUTPUTPOLARITY_PIN_LOW
- */
- __STATIC_INLINE uint32_t LL_RTC_GetOutputPolarity(RTC_TypeDef *RTCx)
- {
- return (uint32_t)(READ_BIT(RTCx->CR, RTC_CR_POL));
- }
- /**
- * @brief Enable Bypass the shadow registers
- * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
- * @rmtoll RTC_CR BYPSHAD LL_RTC_EnableShadowRegBypass
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_EnableShadowRegBypass(RTC_TypeDef *RTCx)
- {
- SET_BIT(RTCx->CR, RTC_CR_BYPSHAD);
- }
- /**
- * @brief Disable Bypass the shadow registers
- * @rmtoll RTC_CR BYPSHAD LL_RTC_DisableShadowRegBypass
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_DisableShadowRegBypass(RTC_TypeDef *RTCx)
- {
- CLEAR_BIT(RTCx->CR, RTC_CR_BYPSHAD);
- }
- /**
- * @brief Check if Shadow registers bypass is enabled or not.
- * @rmtoll RTC_CR BYPSHAD LL_RTC_IsShadowRegBypassEnabled
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsShadowRegBypassEnabled(RTC_TypeDef *RTCx)
- {
- return ((READ_BIT(RTCx->CR, RTC_CR_BYPSHAD) == (RTC_CR_BYPSHAD)) ? 1U : 0U);
- }
- /**
- * @brief Enable RTC_REFIN reference clock detection (50 or 60 Hz)
- * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
- * @note It can be written in initialization mode only (@ref LL_RTC_EnableInitMode function)
- * @rmtoll RTC_CR REFCKON LL_RTC_EnableRefClock
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_EnableRefClock(RTC_TypeDef *RTCx)
- {
- SET_BIT(RTCx->CR, RTC_CR_REFCKON);
- }
- /**
- * @brief Disable RTC_REFIN reference clock detection (50 or 60 Hz)
- * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
- * @note It can be written in initialization mode only (@ref LL_RTC_EnableInitMode function)
- * @rmtoll RTC_CR REFCKON LL_RTC_DisableRefClock
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_DisableRefClock(RTC_TypeDef *RTCx)
- {
- CLEAR_BIT(RTCx->CR, RTC_CR_REFCKON);
- }
- /**
- * @brief Set Asynchronous prescaler factor
- * @rmtoll RTC_PRER PREDIV_A LL_RTC_SetAsynchPrescaler
- * @param RTCx RTC Instance
- * @param AsynchPrescaler Value between Min_Data = 0 and Max_Data = 0x7F
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_SetAsynchPrescaler(RTC_TypeDef *RTCx, uint32_t AsynchPrescaler)
- {
- MODIFY_REG(RTCx->PRER, RTC_PRER_PREDIV_A, AsynchPrescaler << RTC_PRER_PREDIV_A_Pos);
- }
- /**
- * @brief Set Synchronous prescaler factor
- * @rmtoll RTC_PRER PREDIV_S LL_RTC_SetSynchPrescaler
- * @param RTCx RTC Instance
- * @param SynchPrescaler Value between Min_Data = 0 and Max_Data = 0x7FFF
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_SetSynchPrescaler(RTC_TypeDef *RTCx, uint32_t SynchPrescaler)
- {
- MODIFY_REG(RTCx->PRER, RTC_PRER_PREDIV_S, SynchPrescaler);
- }
- /**
- * @brief Get Asynchronous prescaler factor
- * @rmtoll RTC_PRER PREDIV_A LL_RTC_GetAsynchPrescaler
- * @param RTCx RTC Instance
- * @retval Value between Min_Data = 0 and Max_Data = 0x7F
- */
- __STATIC_INLINE uint32_t LL_RTC_GetAsynchPrescaler(RTC_TypeDef *RTCx)
- {
- return (uint32_t)(READ_BIT(RTCx->PRER, RTC_PRER_PREDIV_A) >> RTC_PRER_PREDIV_A_Pos);
- }
- /**
- * @brief Get Synchronous prescaler factor
- * @rmtoll RTC_PRER PREDIV_S LL_RTC_GetSynchPrescaler
- * @param RTCx RTC Instance
- * @retval Value between Min_Data = 0 and Max_Data = 0x7FFF
- */
- __STATIC_INLINE uint32_t LL_RTC_GetSynchPrescaler(RTC_TypeDef *RTCx)
- {
- return (uint32_t)(READ_BIT(RTCx->PRER, RTC_PRER_PREDIV_S));
- }
- /**
- * @brief Enable the write protection for RTC registers.
- * @rmtoll RTC_WPR KEY LL_RTC_EnableWriteProtection
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_EnableWriteProtection(RTC_TypeDef *RTCx)
- {
- WRITE_REG(RTCx->WPR, RTC_WRITE_PROTECTION_DISABLE);
- }
- /**
- * @brief Disable the write protection for RTC registers.
- * @rmtoll RTC_WPR KEY LL_RTC_DisableWriteProtection
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_DisableWriteProtection(RTC_TypeDef *RTCx)
- {
- WRITE_REG(RTCx->WPR, RTC_WRITE_PROTECTION_ENABLE_1);
- WRITE_REG(RTCx->WPR, RTC_WRITE_PROTECTION_ENABLE_2);
- }
- /**
- * @brief Enable tamper output.
- * @note When the tamper output is enabled, all external and internal tamper flags
- * are ORed and routed to the TAMPALRM output.
- * @rmtoll RTC_CR TAMPOE LL_RTC_EnableTamperOutput
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_EnableTamperOutput(RTC_TypeDef *RTCx)
- {
- SET_BIT(RTCx->CR, RTC_CR_TAMPOE);
- }
- /**
- * @brief Disable tamper output.
- * @rmtoll RTC_CR TAMPOE LL_RTC_DisableTamperOutput
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_DisableTamperOutput(RTC_TypeDef *RTCx)
- {
- CLEAR_BIT(RTCx->CR, RTC_CR_TAMPOE);
- }
- /**
- * @brief Check if tamper output is enabled or not.
- * @rmtoll RTC_CR TAMPOE LL_RTC_IsTamperOutputEnabled
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsTamperOutputEnabled(RTC_TypeDef *RTCx)
- {
- return ((READ_BIT(RTCx->CR, RTC_CR_TAMPOE) == (RTC_CR_TAMPOE)) ? 1U : 0U);
- }
- /**
- * @brief Enable internal pull-up in output mode.
- * @rmtoll RTC_CR TAMPALRM_PU LL_RTC_EnableAlarmPullUp
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_EnableAlarmPullUp(RTC_TypeDef *RTCx)
- {
- SET_BIT(RTCx->CR, RTC_CR_TAMPALRM_PU);
- }
- /**
- * @brief Disable internal pull-up in output mode.
- * @rmtoll RTC_CR TAMPALRM_PU LL_RTC_EnableAlarmPullUp
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_DisableAlarmPullUp(RTC_TypeDef *RTCx)
- {
- CLEAR_BIT(RTCx->CR, RTC_CR_TAMPALRM_PU);
- }
- /**
- * @brief Check if internal pull-up in output mode is enabled or not.
- * @rmtoll RTC_CR TAMPALRM_PU LL_RTC_IsAlarmPullUpEnabled
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsAlarmPullUpEnabled(RTC_TypeDef *RTCx)
- {
- return ((READ_BIT(RTCx->CR, RTC_CR_TAMPALRM_PU) == (RTC_CR_TAMPALRM_PU)) ? 1U : 0U);
- }
- /**
- * @brief Enable RTC_OUT2 output
- * @note RTC_OUT2 mapping depends on both OSEL (@ref LL_RTC_SetAlarmOutEvent)
- * and COE (@ref LL_RTC_CAL_SetOutputFreq) settings.
- * @note RTC_OUT2 is not available ins VBAT mode.
- * @rmtoll RTC_CR OUT2EN LL_RTC_EnableOutput2
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_EnableOutput2(RTC_TypeDef *RTCx)
- {
- SET_BIT(RTCx->CR, RTC_CR_OUT2EN);
- }
- /**
- * @brief Disable RTC_OUT2 output
- * @rmtoll RTC_CR OUT2EN LL_RTC_DisableOutput2
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_DisableOutput2(RTC_TypeDef *RTCx)
- {
- CLEAR_BIT(RTCx->CR, RTC_CR_OUT2EN);
- }
- /**
- * @brief Check if RTC_OUT2 output is enabled or not.
- * @rmtoll RTC_CR OUT2EN LL_RTC_IsOutput2Enabled
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsOutput2Enabled(RTC_TypeDef *RTCx)
- {
- return ((READ_BIT(RTCx->CR, RTC_CR_OUT2EN) == (RTC_CR_OUT2EN)) ? 1U : 0U);
- }
- /**
- * @}
- */
- /** @defgroup RTC_LL_EF_Time Time
- * @{
- */
- /**
- * @brief Set time format (AM/24-hour or PM notation)
- * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
- * @note It can be written in initialization mode only (@ref LL_RTC_EnableInitMode function)
- * @rmtoll RTC_TR PM LL_RTC_TIME_SetFormat
- * @param RTCx RTC Instance
- * @param TimeFormat This parameter can be one of the following values:
- * @arg @ref LL_RTC_TIME_FORMAT_AM_OR_24
- * @arg @ref LL_RTC_TIME_FORMAT_PM
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_TIME_SetFormat(RTC_TypeDef *RTCx, uint32_t TimeFormat)
- {
- MODIFY_REG(RTCx->TR, RTC_TR_PM, TimeFormat);
- }
- /**
- * @brief Get time format (AM or PM notation)
- * @note if RTC shadow registers are not bypassed (BYPSHAD=0), need to check if RSF flag is set
- * before reading this bit
- * @note Read either RTC_SSR or RTC_TR locks the values in the higher-order calendar
- * shadow registers until RTC_DR is read (LL_RTC_ReadReg(RTC, DR)).
- * @rmtoll RTC_TR PM LL_RTC_TIME_GetFormat
- * @param RTCx RTC Instance
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_RTC_TIME_FORMAT_AM_OR_24
- * @arg @ref LL_RTC_TIME_FORMAT_PM
- */
- __STATIC_INLINE uint32_t LL_RTC_TIME_GetFormat(RTC_TypeDef *RTCx)
- {
- return (uint32_t)(READ_BIT(RTCx->TR, RTC_TR_PM));
- }
- /**
- * @brief Set Hours in BCD format
- * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
- * @note It can be written in initialization mode only (@ref LL_RTC_EnableInitMode function)
- * @note helper macro __LL_RTC_CONVERT_BIN2BCD is available to convert hour from binary to BCD format
- * @rmtoll RTC_TR HT LL_RTC_TIME_SetHour\n
- * RTC_TR HU LL_RTC_TIME_SetHour
- * @param RTCx RTC Instance
- * @param Hours Value between Min_Data=0x01 and Max_Data=0x12 or between Min_Data=0x00 and Max_Data=0x23
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_TIME_SetHour(RTC_TypeDef *RTCx, uint32_t Hours)
- {
- MODIFY_REG(RTCx->TR, (RTC_TR_HT | RTC_TR_HU),
- (((Hours & 0xF0U) << (RTC_TR_HT_Pos - 4U)) | ((Hours & 0x0FU) << RTC_TR_HU_Pos)));
- }
- /**
- * @brief Get Hours in BCD format
- * @note if RTC shadow registers are not bypassed (BYPSHAD=0), need to check if RSF flag is set
- * before reading this bit
- * @note Read either RTC_SSR or RTC_TR locks the values in the higher-order calendar
- * shadow registers until RTC_DR is read (LL_RTC_ReadReg(RTC, DR)).
- * @note helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert hour from BCD to
- * Binary format
- * @rmtoll RTC_TR HT LL_RTC_TIME_GetHour\n
- * RTC_TR HU LL_RTC_TIME_GetHour
- * @param RTCx RTC Instance
- * @retval Value between Min_Data=0x01 and Max_Data=0x12 or between Min_Data=0x00 and Max_Data=0x23
- */
- __STATIC_INLINE uint32_t LL_RTC_TIME_GetHour(RTC_TypeDef *RTCx)
- {
- return (uint32_t)((READ_BIT(RTCx->TR, (RTC_TR_HT | RTC_TR_HU))) >> RTC_TR_HU_Pos);
- }
- /**
- * @brief Set Minutes in BCD format
- * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
- * @note It can be written in initialization mode only (@ref LL_RTC_EnableInitMode function)
- * @note helper macro __LL_RTC_CONVERT_BIN2BCD is available to convert Minutes from binary to BCD format
- * @rmtoll RTC_TR MNT LL_RTC_TIME_SetMinute\n
- * RTC_TR MNU LL_RTC_TIME_SetMinute
- * @param RTCx RTC Instance
- * @param Minutes Value between Min_Data=0x00 and Max_Data=0x59
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_TIME_SetMinute(RTC_TypeDef *RTCx, uint32_t Minutes)
- {
- MODIFY_REG(RTCx->TR, (RTC_TR_MNT | RTC_TR_MNU),
- (((Minutes & 0xF0U) << (RTC_TR_MNT_Pos - 4U)) | ((Minutes & 0x0FU) << RTC_TR_MNU_Pos)));
- }
- /**
- * @brief Get Minutes in BCD format
- * @note if RTC shadow registers are not bypassed (BYPSHAD=0), need to check if RSF flag is set
- * before reading this bit
- * @note Read either RTC_SSR or RTC_TR locks the values in the higher-order calendar
- * shadow registers until RTC_DR is read (LL_RTC_ReadReg(RTC, DR)).
- * @note helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert minute from BCD
- * to Binary format
- * @rmtoll RTC_TR MNT LL_RTC_TIME_GetMinute\n
- * RTC_TR MNU LL_RTC_TIME_GetMinute
- * @param RTCx RTC Instance
- * @retval Value between Min_Data=0x00 and Max_Data=0x59
- */
- __STATIC_INLINE uint32_t LL_RTC_TIME_GetMinute(RTC_TypeDef *RTCx)
- {
- return (uint32_t)(READ_BIT(RTCx->TR, (RTC_TR_MNT | RTC_TR_MNU)) >> RTC_TR_MNU_Pos);
- }
- /**
- * @brief Set Seconds in BCD format
- * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
- * @note It can be written in initialization mode only (@ref LL_RTC_EnableInitMode function)
- * @note helper macro __LL_RTC_CONVERT_BIN2BCD is available to convert Seconds from binary to BCD format
- * @rmtoll RTC_TR ST LL_RTC_TIME_SetSecond\n
- * RTC_TR SU LL_RTC_TIME_SetSecond
- * @param RTCx RTC Instance
- * @param Seconds Value between Min_Data=0x00 and Max_Data=0x59
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_TIME_SetSecond(RTC_TypeDef *RTCx, uint32_t Seconds)
- {
- MODIFY_REG(RTCx->TR, (RTC_TR_ST | RTC_TR_SU),
- (((Seconds & 0xF0U) << (RTC_TR_ST_Pos - 4U)) | ((Seconds & 0x0FU) << RTC_TR_SU_Pos)));
- }
- /**
- * @brief Get Seconds in BCD format
- * @note if RTC shadow registers are not bypassed (BYPSHAD=0), need to check if RSF flag is set
- * before reading this bit
- * @note Read either RTC_SSR or RTC_TR locks the values in the higher-order calendar
- * shadow registers until RTC_DR is read (LL_RTC_ReadReg(RTC, DR)).
- * @note helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Seconds from BCD
- * to Binary format
- * @rmtoll RTC_TR ST LL_RTC_TIME_GetSecond\n
- * RTC_TR SU LL_RTC_TIME_GetSecond
- * @param RTCx RTC Instance
- * @retval Value between Min_Data=0x00 and Max_Data=0x59
- */
- __STATIC_INLINE uint32_t LL_RTC_TIME_GetSecond(RTC_TypeDef *RTCx)
- {
- return (uint32_t)(READ_BIT(RTCx->TR, (RTC_TR_ST | RTC_TR_SU)) >> RTC_TR_SU_Pos);
- }
- /**
- * @brief Set time (hour, minute and second) in BCD format
- * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
- * @note It can be written in initialization mode only (@ref LL_RTC_EnableInitMode function)
- * @note TimeFormat and Hours should follow the same format
- * @rmtoll RTC_TR PM LL_RTC_TIME_Config\n
- * RTC_TR HT LL_RTC_TIME_Config\n
- * RTC_TR HU LL_RTC_TIME_Config\n
- * RTC_TR MNT LL_RTC_TIME_Config\n
- * RTC_TR MNU LL_RTC_TIME_Config\n
- * RTC_TR ST LL_RTC_TIME_Config\n
- * RTC_TR SU LL_RTC_TIME_Config
- * @param RTCx RTC Instance
- * @param Format12_24 This parameter can be one of the following values:
- * @arg @ref LL_RTC_TIME_FORMAT_AM_OR_24
- * @arg @ref LL_RTC_TIME_FORMAT_PM
- * @param Hours Value between Min_Data=0x01 and Max_Data=0x12 or between Min_Data=0x00 and Max_Data=0x23
- * @param Minutes Value between Min_Data=0x00 and Max_Data=0x59
- * @param Seconds Value between Min_Data=0x00 and Max_Data=0x59
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_TIME_Config(RTC_TypeDef *RTCx, uint32_t Format12_24, uint32_t Hours, uint32_t Minutes,
- uint32_t Seconds)
- {
- uint32_t temp;
- temp = Format12_24 | \
- (((Hours & 0xF0U) << (RTC_TR_HT_Pos - 4U)) | ((Hours & 0x0FU) << RTC_TR_HU_Pos)) | \
- (((Minutes & 0xF0U) << (RTC_TR_MNT_Pos - 4U)) | ((Minutes & 0x0FU) << RTC_TR_MNU_Pos)) | \
- (((Seconds & 0xF0U) << (RTC_TR_ST_Pos - 4U)) | ((Seconds & 0x0FU) << RTC_TR_SU_Pos));
- MODIFY_REG(RTCx->TR, (RTC_TR_PM | RTC_TR_HT | RTC_TR_HU | RTC_TR_MNT | RTC_TR_MNU | RTC_TR_ST | RTC_TR_SU), temp);
- }
- /**
- * @brief Get time (hour, minute and second) in BCD format
- * @note if RTC shadow registers are not bypassed (BYPSHAD=0), need to check if RSF flag is set
- * before reading this bit
- * @note Read either RTC_SSR or RTC_TR locks the values in the higher-order calendar
- * shadow registers until RTC_DR is read (LL_RTC_ReadReg(RTC, DR)).
- * @note helper macros __LL_RTC_GET_HOUR, __LL_RTC_GET_MINUTE and __LL_RTC_GET_SECOND
- * are available to get independently each parameter.
- * @rmtoll RTC_TR HT LL_RTC_TIME_Get\n
- * RTC_TR HU LL_RTC_TIME_Get\n
- * RTC_TR MNT LL_RTC_TIME_Get\n
- * RTC_TR MNU LL_RTC_TIME_Get\n
- * RTC_TR ST LL_RTC_TIME_Get\n
- * RTC_TR SU LL_RTC_TIME_Get
- * @param RTCx RTC Instance
- * @retval Combination of hours, minutes and seconds (Format: 0x00HHMMSS).
- */
- __STATIC_INLINE uint32_t LL_RTC_TIME_Get(RTC_TypeDef *RTCx)
- {
- uint32_t temp;
- temp = READ_BIT(RTCx->TR, (RTC_TR_HT | RTC_TR_HU | RTC_TR_MNT | RTC_TR_MNU | RTC_TR_ST | RTC_TR_SU));
- return (uint32_t)((((((temp & RTC_TR_HT) >> RTC_TR_HT_Pos) << 4U) | ((temp & RTC_TR_HU) >> RTC_TR_HU_Pos)) << RTC_OFFSET_HOUR) | \
- (((((temp & RTC_TR_MNT) >> RTC_TR_MNT_Pos) << 4U) | ((temp & RTC_TR_MNU) >> RTC_TR_MNU_Pos)) << RTC_OFFSET_MINUTE) | \
- ((((temp & RTC_TR_ST) >> RTC_TR_ST_Pos) << 4U) | ((temp & RTC_TR_SU) >> RTC_TR_SU_Pos)));
- }
- /**
- * @brief Memorize whether the daylight saving time change has been performed
- * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
- * @rmtoll RTC_CR BKP LL_RTC_TIME_EnableDayLightStore
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_TIME_EnableDayLightStore(RTC_TypeDef *RTCx)
- {
- SET_BIT(RTCx->CR, RTC_CR_BKP);
- }
- /**
- * @brief Disable memorization whether the daylight saving time change has been performed.
- * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
- * @rmtoll RTC_CR BKP LL_RTC_TIME_DisableDayLightStore
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_TIME_DisableDayLightStore(RTC_TypeDef *RTCx)
- {
- CLEAR_BIT(RTCx->CR, RTC_CR_BKP);
- }
- /**
- * @brief Check if RTC Day Light Saving stored operation has been enabled or not
- * @rmtoll RTC_CR BKP LL_RTC_TIME_IsDayLightStoreEnabled
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_TIME_IsDayLightStoreEnabled(RTC_TypeDef *RTCx)
- {
- return ((READ_BIT(RTCx->CR, RTC_CR_BKP) == (RTC_CR_BKP)) ? 1U : 0U);
- }
- /**
- * @brief Subtract 1 hour (winter time change)
- * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
- * @rmtoll RTC_CR SUB1H LL_RTC_TIME_DecHour
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_TIME_DecHour(RTC_TypeDef *RTCx)
- {
- SET_BIT(RTCx->CR, RTC_CR_SUB1H);
- }
- /**
- * @brief Add 1 hour (summer time change)
- * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
- * @rmtoll RTC_CR ADD1H LL_RTC_TIME_IncHour
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_TIME_IncHour(RTC_TypeDef *RTCx)
- {
- SET_BIT(RTCx->CR, RTC_CR_ADD1H);
- }
- /**
- * @brief Get Sub second value in the synchronous prescaler counter.
- * @note You can use both SubSeconds value and SecondFraction (PREDIV_S through
- * LL_RTC_GetSynchPrescaler function) terms returned to convert Calendar
- * SubSeconds value in second fraction ratio with time unit following
- * generic formula:
- * ==> Seconds fraction ratio * time_unit= [(SecondFraction-SubSeconds)/(SecondFraction+1)] * time_unit
- * This conversion can be performed only if no shift operation is pending
- * (ie. SHFP=0) when PREDIV_S >= SS.
- * @rmtoll RTC_SSR SS LL_RTC_TIME_GetSubSecond
- * @param RTCx RTC Instance
- * @retval Sub second value (number between 0 and 65535)
- */
- __STATIC_INLINE uint32_t LL_RTC_TIME_GetSubSecond(RTC_TypeDef *RTCx)
- {
- return (uint32_t)(READ_BIT(RTCx->SSR, RTC_SSR_SS));
- }
- /**
- * @brief Synchronize to a remote clock with a high degree of precision.
- * @note This operation effectively subtracts from (delays) or advance the clock of a fraction of a second.
- * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
- * @note When REFCKON is set, firmware must not write to Shift control register.
- * @rmtoll RTC_SHIFTR ADD1S LL_RTC_TIME_Synchronize\n
- * RTC_SHIFTR SUBFS LL_RTC_TIME_Synchronize
- * @param RTCx RTC Instance
- * @param ShiftSecond This parameter can be one of the following values:
- * @arg @ref LL_RTC_SHIFT_SECOND_DELAY
- * @arg @ref LL_RTC_SHIFT_SECOND_ADVANCE
- * @param Fraction Number of Seconds Fractions (any value from 0 to 0x7FFF)
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_TIME_Synchronize(RTC_TypeDef *RTCx, uint32_t ShiftSecond, uint32_t Fraction)
- {
- WRITE_REG(RTCx->SHIFTR, (ShiftSecond | Fraction));
- }
- /**
- * @}
- */
- /** @defgroup RTC_LL_EF_Date Date
- * @{
- */
- /**
- * @brief Set Year in BCD format
- * @note helper macro __LL_RTC_CONVERT_BIN2BCD is available to convert Year from binary to BCD format
- * @rmtoll RTC_DR YT LL_RTC_DATE_SetYear\n
- * RTC_DR YU LL_RTC_DATE_SetYear
- * @param RTCx RTC Instance
- * @param Year Value between Min_Data=0x00 and Max_Data=0x99
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_DATE_SetYear(RTC_TypeDef *RTCx, uint32_t Year)
- {
- MODIFY_REG(RTCx->DR, (RTC_DR_YT | RTC_DR_YU),
- (((Year & 0xF0U) << (RTC_DR_YT_Pos - 4U)) | ((Year & 0x0FU) << RTC_DR_YU_Pos)));
- }
- /**
- * @brief Get Year in BCD format
- * @note if RTC shadow registers are not bypassed (BYPSHAD=0), need to check if RSF flag is set
- * before reading this bit
- * @note helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Year from BCD to Binary format
- * @rmtoll RTC_DR YT LL_RTC_DATE_GetYear\n
- * RTC_DR YU LL_RTC_DATE_GetYear
- * @param RTCx RTC Instance
- * @retval Value between Min_Data=0x00 and Max_Data=0x99
- */
- __STATIC_INLINE uint32_t LL_RTC_DATE_GetYear(RTC_TypeDef *RTCx)
- {
- return (uint32_t)((READ_BIT(RTCx->DR, (RTC_DR_YT | RTC_DR_YU))) >> RTC_DR_YU_Pos);
- }
- /**
- * @brief Set Week day
- * @rmtoll RTC_DR WDU LL_RTC_DATE_SetWeekDay
- * @param RTCx RTC Instance
- * @param WeekDay This parameter can be one of the following values:
- * @arg @ref LL_RTC_WEEKDAY_MONDAY
- * @arg @ref LL_RTC_WEEKDAY_TUESDAY
- * @arg @ref LL_RTC_WEEKDAY_WEDNESDAY
- * @arg @ref LL_RTC_WEEKDAY_THURSDAY
- * @arg @ref LL_RTC_WEEKDAY_FRIDAY
- * @arg @ref LL_RTC_WEEKDAY_SATURDAY
- * @arg @ref LL_RTC_WEEKDAY_SUNDAY
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_DATE_SetWeekDay(RTC_TypeDef *RTCx, uint32_t WeekDay)
- {
- MODIFY_REG(RTCx->DR, RTC_DR_WDU, WeekDay << RTC_DR_WDU_Pos);
- }
- /**
- * @brief Get Week day
- * @note if RTC shadow registers are not bypassed (BYPSHAD=0), need to check if RSF flag is set
- * before reading this bit
- * @rmtoll RTC_DR WDU LL_RTC_DATE_GetWeekDay
- * @param RTCx RTC Instance
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_RTC_WEEKDAY_MONDAY
- * @arg @ref LL_RTC_WEEKDAY_TUESDAY
- * @arg @ref LL_RTC_WEEKDAY_WEDNESDAY
- * @arg @ref LL_RTC_WEEKDAY_THURSDAY
- * @arg @ref LL_RTC_WEEKDAY_FRIDAY
- * @arg @ref LL_RTC_WEEKDAY_SATURDAY
- * @arg @ref LL_RTC_WEEKDAY_SUNDAY
- */
- __STATIC_INLINE uint32_t LL_RTC_DATE_GetWeekDay(RTC_TypeDef *RTCx)
- {
- return (uint32_t)(READ_BIT(RTCx->DR, RTC_DR_WDU) >> RTC_DR_WDU_Pos);
- }
- /**
- * @brief Set Month in BCD format
- * @note helper macro __LL_RTC_CONVERT_BIN2BCD is available to convert Month from binary to BCD format
- * @rmtoll RTC_DR MT LL_RTC_DATE_SetMonth\n
- * RTC_DR MU LL_RTC_DATE_SetMonth
- * @param RTCx RTC Instance
- * @param Month This parameter can be one of the following values:
- * @arg @ref LL_RTC_MONTH_JANUARY
- * @arg @ref LL_RTC_MONTH_FEBRUARY
- * @arg @ref LL_RTC_MONTH_MARCH
- * @arg @ref LL_RTC_MONTH_APRIL
- * @arg @ref LL_RTC_MONTH_MAY
- * @arg @ref LL_RTC_MONTH_JUNE
- * @arg @ref LL_RTC_MONTH_JULY
- * @arg @ref LL_RTC_MONTH_AUGUST
- * @arg @ref LL_RTC_MONTH_SEPTEMBER
- * @arg @ref LL_RTC_MONTH_OCTOBER
- * @arg @ref LL_RTC_MONTH_NOVEMBER
- * @arg @ref LL_RTC_MONTH_DECEMBER
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_DATE_SetMonth(RTC_TypeDef *RTCx, uint32_t Month)
- {
- MODIFY_REG(RTCx->DR, (RTC_DR_MT | RTC_DR_MU),
- (((Month & 0xF0U) << (RTC_DR_MT_Pos - 4U)) | ((Month & 0x0FU) << RTC_DR_MU_Pos)));
- }
- /**
- * @brief Get Month in BCD format
- * @note if RTC shadow registers are not bypassed (BYPSHAD=0), need to check if RSF flag is set
- * before reading this bit
- * @note helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Month from BCD to Binary format
- * @rmtoll RTC_DR MT LL_RTC_DATE_GetMonth\n
- * RTC_DR MU LL_RTC_DATE_GetMonth
- * @param RTCx RTC Instance
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_RTC_MONTH_JANUARY
- * @arg @ref LL_RTC_MONTH_FEBRUARY
- * @arg @ref LL_RTC_MONTH_MARCH
- * @arg @ref LL_RTC_MONTH_APRIL
- * @arg @ref LL_RTC_MONTH_MAY
- * @arg @ref LL_RTC_MONTH_JUNE
- * @arg @ref LL_RTC_MONTH_JULY
- * @arg @ref LL_RTC_MONTH_AUGUST
- * @arg @ref LL_RTC_MONTH_SEPTEMBER
- * @arg @ref LL_RTC_MONTH_OCTOBER
- * @arg @ref LL_RTC_MONTH_NOVEMBER
- * @arg @ref LL_RTC_MONTH_DECEMBER
- */
- __STATIC_INLINE uint32_t LL_RTC_DATE_GetMonth(RTC_TypeDef *RTCx)
- {
- return (uint32_t)((READ_BIT(RTCx->DR, (RTC_DR_MT | RTC_DR_MU))) >> RTC_DR_MU_Pos);
- }
- /**
- * @brief Set Day in BCD format
- * @note helper macro __LL_RTC_CONVERT_BIN2BCD is available to convert Day from binary to BCD format
- * @rmtoll RTC_DR DT LL_RTC_DATE_SetDay\n
- * RTC_DR DU LL_RTC_DATE_SetDay
- * @param RTCx RTC Instance
- * @param Day Value between Min_Data=0x01 and Max_Data=0x31
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_DATE_SetDay(RTC_TypeDef *RTCx, uint32_t Day)
- {
- MODIFY_REG(RTCx->DR, (RTC_DR_DT | RTC_DR_DU),
- (((Day & 0xF0U) << (RTC_DR_DT_Pos - 4U)) | ((Day & 0x0FU) << RTC_DR_DU_Pos)));
- }
- /**
- * @brief Get Day in BCD format
- * @note if RTC shadow registers are not bypassed (BYPSHAD=0), need to check if RSF flag is set
- * before reading this bit
- * @note helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Day from BCD to Binary format
- * @rmtoll RTC_DR DT LL_RTC_DATE_GetDay\n
- * RTC_DR DU LL_RTC_DATE_GetDay
- * @param RTCx RTC Instance
- * @retval Value between Min_Data=0x01 and Max_Data=0x31
- */
- __STATIC_INLINE uint32_t LL_RTC_DATE_GetDay(RTC_TypeDef *RTCx)
- {
- return (uint32_t)((READ_BIT(RTCx->DR, (RTC_DR_DT | RTC_DR_DU))) >> RTC_DR_DU_Pos);
- }
- /**
- * @brief Set date (WeekDay, Day, Month and Year) in BCD format
- * @rmtoll RTC_DR WDU LL_RTC_DATE_Config\n
- * RTC_DR MT LL_RTC_DATE_Config\n
- * RTC_DR MU LL_RTC_DATE_Config\n
- * RTC_DR DT LL_RTC_DATE_Config\n
- * RTC_DR DU LL_RTC_DATE_Config\n
- * RTC_DR YT LL_RTC_DATE_Config\n
- * RTC_DR YU LL_RTC_DATE_Config
- * @param RTCx RTC Instance
- * @param WeekDay This parameter can be one of the following values:
- * @arg @ref LL_RTC_WEEKDAY_MONDAY
- * @arg @ref LL_RTC_WEEKDAY_TUESDAY
- * @arg @ref LL_RTC_WEEKDAY_WEDNESDAY
- * @arg @ref LL_RTC_WEEKDAY_THURSDAY
- * @arg @ref LL_RTC_WEEKDAY_FRIDAY
- * @arg @ref LL_RTC_WEEKDAY_SATURDAY
- * @arg @ref LL_RTC_WEEKDAY_SUNDAY
- * @param Day Value between Min_Data=0x01 and Max_Data=0x31
- * @param Month This parameter can be one of the following values:
- * @arg @ref LL_RTC_MONTH_JANUARY
- * @arg @ref LL_RTC_MONTH_FEBRUARY
- * @arg @ref LL_RTC_MONTH_MARCH
- * @arg @ref LL_RTC_MONTH_APRIL
- * @arg @ref LL_RTC_MONTH_MAY
- * @arg @ref LL_RTC_MONTH_JUNE
- * @arg @ref LL_RTC_MONTH_JULY
- * @arg @ref LL_RTC_MONTH_AUGUST
- * @arg @ref LL_RTC_MONTH_SEPTEMBER
- * @arg @ref LL_RTC_MONTH_OCTOBER
- * @arg @ref LL_RTC_MONTH_NOVEMBER
- * @arg @ref LL_RTC_MONTH_DECEMBER
- * @param Year Value between Min_Data=0x00 and Max_Data=0x99
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_DATE_Config(RTC_TypeDef *RTCx, uint32_t WeekDay, uint32_t Day, uint32_t Month,
- uint32_t Year)
- {
- uint32_t temp;
- temp = (WeekDay << RTC_DR_WDU_Pos) | \
- (((Year & 0xF0U) << (RTC_DR_YT_Pos - 4U)) | ((Year & 0x0FU) << RTC_DR_YU_Pos)) | \
- (((Month & 0xF0U) << (RTC_DR_MT_Pos - 4U)) | ((Month & 0x0FU) << RTC_DR_MU_Pos)) | \
- (((Day & 0xF0U) << (RTC_DR_DT_Pos - 4U)) | ((Day & 0x0FU) << RTC_DR_DU_Pos));
- MODIFY_REG(RTCx->DR, (RTC_DR_WDU | RTC_DR_MT | RTC_DR_MU | RTC_DR_DT | RTC_DR_DU | RTC_DR_YT | RTC_DR_YU), temp);
- }
- /**
- * @brief Get date (WeekDay, Day, Month and Year) in BCD format
- * @note if RTC shadow registers are not bypassed (BYPSHAD=0), need to check if RSF flag is set
- * before reading this bit
- * @note helper macros __LL_RTC_GET_WEEKDAY, __LL_RTC_GET_YEAR, __LL_RTC_GET_MONTH,
- * and __LL_RTC_GET_DAY are available to get independently each parameter.
- * @rmtoll RTC_DR WDU LL_RTC_DATE_Get\n
- * RTC_DR MT LL_RTC_DATE_Get\n
- * RTC_DR MU LL_RTC_DATE_Get\n
- * RTC_DR DT LL_RTC_DATE_Get\n
- * RTC_DR DU LL_RTC_DATE_Get\n
- * RTC_DR YT LL_RTC_DATE_Get\n
- * RTC_DR YU LL_RTC_DATE_Get
- * @param RTCx RTC Instance
- * @retval Combination of WeekDay, Day, Month and Year (Format: 0xWWDDMMYY).
- */
- __STATIC_INLINE uint32_t LL_RTC_DATE_Get(RTC_TypeDef *RTCx)
- {
- uint32_t temp;
- temp = READ_BIT(RTCx->DR, (RTC_DR_WDU | RTC_DR_MT | RTC_DR_MU | RTC_DR_DT | RTC_DR_DU | RTC_DR_YT | RTC_DR_YU));
- return (uint32_t)((((temp & RTC_DR_WDU) >> RTC_DR_WDU_Pos) << RTC_OFFSET_WEEKDAY) | \
- (((((temp & RTC_DR_DT) >> RTC_DR_DT_Pos) << 4U) | ((temp & RTC_DR_DU) >> RTC_DR_DU_Pos)) << RTC_OFFSET_DAY) | \
- (((((temp & RTC_DR_MT) >> RTC_DR_MT_Pos) << 4U) | ((temp & RTC_DR_MU) >> RTC_DR_MU_Pos)) << RTC_OFFSET_MONTH) | \
- ((((temp & RTC_DR_YT) >> RTC_DR_YT_Pos) << 4U) | ((temp & RTC_DR_YU) >> RTC_DR_YU_Pos)));
- }
- /**
- * @}
- */
- /** @defgroup RTC_LL_EF_ALARMA ALARMA
- * @{
- */
- /**
- * @brief Enable Alarm A
- * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
- * @rmtoll RTC_CR ALRAE LL_RTC_ALMA_Enable
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_ALMA_Enable(RTC_TypeDef *RTCx)
- {
- SET_BIT(RTCx->CR, RTC_CR_ALRAE);
- }
- /**
- * @brief Disable Alarm A
- * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
- * @rmtoll RTC_CR ALRAE LL_RTC_ALMA_Disable
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_ALMA_Disable(RTC_TypeDef *RTCx)
- {
- CLEAR_BIT(RTCx->CR, RTC_CR_ALRAE);
- }
- /**
- * @brief Specify the Alarm A masks.
- * @rmtoll RTC_ALRMAR MSK4 LL_RTC_ALMA_SetMask\n
- * RTC_ALRMAR MSK3 LL_RTC_ALMA_SetMask\n
- * RTC_ALRMAR MSK2 LL_RTC_ALMA_SetMask\n
- * RTC_ALRMAR MSK1 LL_RTC_ALMA_SetMask
- * @param RTCx RTC Instance
- * @param Mask This parameter can be a combination of the following values:
- * @arg @ref LL_RTC_ALMA_MASK_NONE
- * @arg @ref LL_RTC_ALMA_MASK_DATEWEEKDAY
- * @arg @ref LL_RTC_ALMA_MASK_HOURS
- * @arg @ref LL_RTC_ALMA_MASK_MINUTES
- * @arg @ref LL_RTC_ALMA_MASK_SECONDS
- * @arg @ref LL_RTC_ALMA_MASK_ALL
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_ALMA_SetMask(RTC_TypeDef *RTCx, uint32_t Mask)
- {
- MODIFY_REG(RTCx->ALRMAR, RTC_ALRMAR_MSK4 | RTC_ALRMAR_MSK3 | RTC_ALRMAR_MSK2 | RTC_ALRMAR_MSK1, Mask);
- }
- /**
- * @brief Get the Alarm A masks.
- * @rmtoll RTC_ALRMAR MSK4 LL_RTC_ALMA_GetMask\n
- * RTC_ALRMAR MSK3 LL_RTC_ALMA_GetMask\n
- * RTC_ALRMAR MSK2 LL_RTC_ALMA_GetMask\n
- * RTC_ALRMAR MSK1 LL_RTC_ALMA_GetMask
- * @param RTCx RTC Instance
- * @retval Returned value can be can be a combination of the following values:
- * @arg @ref LL_RTC_ALMA_MASK_NONE
- * @arg @ref LL_RTC_ALMA_MASK_DATEWEEKDAY
- * @arg @ref LL_RTC_ALMA_MASK_HOURS
- * @arg @ref LL_RTC_ALMA_MASK_MINUTES
- * @arg @ref LL_RTC_ALMA_MASK_SECONDS
- * @arg @ref LL_RTC_ALMA_MASK_ALL
- */
- __STATIC_INLINE uint32_t LL_RTC_ALMA_GetMask(RTC_TypeDef *RTCx)
- {
- return (uint32_t)(READ_BIT(RTCx->ALRMAR, RTC_ALRMAR_MSK4 | RTC_ALRMAR_MSK3 | RTC_ALRMAR_MSK2 | RTC_ALRMAR_MSK1));
- }
- /**
- * @brief Enable AlarmA Week day selection (DU[3:0] represents the week day. DT[1:0] is do not care)
- * @rmtoll RTC_ALRMAR WDSEL LL_RTC_ALMA_EnableWeekday
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_ALMA_EnableWeekday(RTC_TypeDef *RTCx)
- {
- SET_BIT(RTCx->ALRMAR, RTC_ALRMAR_WDSEL);
- }
- /**
- * @brief Disable AlarmA Week day selection (DU[3:0] represents the date )
- * @rmtoll RTC_ALRMAR WDSEL LL_RTC_ALMA_DisableWeekday
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_ALMA_DisableWeekday(RTC_TypeDef *RTCx)
- {
- CLEAR_BIT(RTCx->ALRMAR, RTC_ALRMAR_WDSEL);
- }
- /**
- * @brief Set ALARM A Day in BCD format
- * @note helper macro __LL_RTC_CONVERT_BIN2BCD is available to convert Day from binary to BCD format
- * @rmtoll RTC_ALRMAR DT LL_RTC_ALMA_SetDay\n
- * RTC_ALRMAR DU LL_RTC_ALMA_SetDay
- * @param RTCx RTC Instance
- * @param Day Value between Min_Data=0x01 and Max_Data=0x31
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_ALMA_SetDay(RTC_TypeDef *RTCx, uint32_t Day)
- {
- MODIFY_REG(RTCx->ALRMAR, (RTC_ALRMAR_DT | RTC_ALRMAR_DU),
- (((Day & 0xF0U) << (RTC_ALRMAR_DT_Pos - 4U)) | ((Day & 0x0FU) << RTC_ALRMAR_DU_Pos)));
- }
- /**
- * @brief Get ALARM A Day in BCD format
- * @note helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Day from BCD to Binary format
- * @rmtoll RTC_ALRMAR DT LL_RTC_ALMA_GetDay\n
- * RTC_ALRMAR DU LL_RTC_ALMA_GetDay
- * @param RTCx RTC Instance
- * @retval Value between Min_Data=0x01 and Max_Data=0x31
- */
- __STATIC_INLINE uint32_t LL_RTC_ALMA_GetDay(RTC_TypeDef *RTCx)
- {
- return (uint32_t)((READ_BIT(RTCx->ALRMAR, (RTC_ALRMAR_DT | RTC_ALRMAR_DU))) >> RTC_ALRMAR_DU_Pos);
- }
- /**
- * @brief Set ALARM A Weekday
- * @rmtoll RTC_ALRMAR DU LL_RTC_ALMA_SetWeekDay
- * @param RTCx RTC Instance
- * @param WeekDay This parameter can be one of the following values:
- * @arg @ref LL_RTC_WEEKDAY_MONDAY
- * @arg @ref LL_RTC_WEEKDAY_TUESDAY
- * @arg @ref LL_RTC_WEEKDAY_WEDNESDAY
- * @arg @ref LL_RTC_WEEKDAY_THURSDAY
- * @arg @ref LL_RTC_WEEKDAY_FRIDAY
- * @arg @ref LL_RTC_WEEKDAY_SATURDAY
- * @arg @ref LL_RTC_WEEKDAY_SUNDAY
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_ALMA_SetWeekDay(RTC_TypeDef *RTCx, uint32_t WeekDay)
- {
- MODIFY_REG(RTCx->ALRMAR, RTC_ALRMAR_DU, WeekDay << RTC_ALRMAR_DU_Pos);
- }
- /**
- * @brief Get ALARM A Weekday
- * @rmtoll RTC_ALRMAR DU LL_RTC_ALMA_GetWeekDay
- * @param RTCx RTC Instance
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_RTC_WEEKDAY_MONDAY
- * @arg @ref LL_RTC_WEEKDAY_TUESDAY
- * @arg @ref LL_RTC_WEEKDAY_WEDNESDAY
- * @arg @ref LL_RTC_WEEKDAY_THURSDAY
- * @arg @ref LL_RTC_WEEKDAY_FRIDAY
- * @arg @ref LL_RTC_WEEKDAY_SATURDAY
- * @arg @ref LL_RTC_WEEKDAY_SUNDAY
- */
- __STATIC_INLINE uint32_t LL_RTC_ALMA_GetWeekDay(RTC_TypeDef *RTCx)
- {
- return (uint32_t)(READ_BIT(RTCx->ALRMAR, RTC_ALRMAR_DU) >> RTC_ALRMAR_DU_Pos);
- }
- /**
- * @brief Set Alarm A time format (AM/24-hour or PM notation)
- * @rmtoll RTC_ALRMAR PM LL_RTC_ALMA_SetTimeFormat
- * @param RTCx RTC Instance
- * @param TimeFormat This parameter can be one of the following values:
- * @arg @ref LL_RTC_ALMA_TIME_FORMAT_AM
- * @arg @ref LL_RTC_ALMA_TIME_FORMAT_PM
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_ALMA_SetTimeFormat(RTC_TypeDef *RTCx, uint32_t TimeFormat)
- {
- MODIFY_REG(RTCx->ALRMAR, RTC_ALRMAR_PM, TimeFormat);
- }
- /**
- * @brief Get Alarm A time format (AM or PM notation)
- * @rmtoll RTC_ALRMAR PM LL_RTC_ALMA_GetTimeFormat
- * @param RTCx RTC Instance
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_RTC_ALMA_TIME_FORMAT_AM
- * @arg @ref LL_RTC_ALMA_TIME_FORMAT_PM
- */
- __STATIC_INLINE uint32_t LL_RTC_ALMA_GetTimeFormat(RTC_TypeDef *RTCx)
- {
- return (uint32_t)(READ_BIT(RTCx->ALRMAR, RTC_ALRMAR_PM));
- }
- /**
- * @brief Set ALARM A Hours in BCD format
- * @note helper macro __LL_RTC_CONVERT_BIN2BCD is available to convert Hours from binary to BCD format
- * @rmtoll RTC_ALRMAR HT LL_RTC_ALMA_SetHour\n
- * RTC_ALRMAR HU LL_RTC_ALMA_SetHour
- * @param RTCx RTC Instance
- * @param Hours Value between Min_Data=0x01 and Max_Data=0x12 or between Min_Data=0x00 and Max_Data=0x23
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_ALMA_SetHour(RTC_TypeDef *RTCx, uint32_t Hours)
- {
- MODIFY_REG(RTCx->ALRMAR, (RTC_ALRMAR_HT | RTC_ALRMAR_HU),
- (((Hours & 0xF0U) << (RTC_ALRMAR_HT_Pos - 4U)) | ((Hours & 0x0FU) << RTC_ALRMAR_HU_Pos)));
- }
- /**
- * @brief Get ALARM A Hours in BCD format
- * @note helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Hours from BCD to Binary format
- * @rmtoll RTC_ALRMAR HT LL_RTC_ALMA_GetHour\n
- * RTC_ALRMAR HU LL_RTC_ALMA_GetHour
- * @param RTCx RTC Instance
- * @retval Value between Min_Data=0x01 and Max_Data=0x12 or between Min_Data=0x00 and Max_Data=0x23
- */
- __STATIC_INLINE uint32_t LL_RTC_ALMA_GetHour(RTC_TypeDef *RTCx)
- {
- return (uint32_t)((READ_BIT(RTCx->ALRMAR, (RTC_ALRMAR_HT | RTC_ALRMAR_HU))) >> RTC_ALRMAR_HU_Pos);
- }
- /**
- * @brief Set ALARM A Minutes in BCD format
- * @note helper macro __LL_RTC_CONVERT_BIN2BCD is available to convert Minutes from binary to BCD format
- * @rmtoll RTC_ALRMAR MNT LL_RTC_ALMA_SetMinute\n
- * RTC_ALRMAR MNU LL_RTC_ALMA_SetMinute
- * @param RTCx RTC Instance
- * @param Minutes Value between Min_Data=0x00 and Max_Data=0x59
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_ALMA_SetMinute(RTC_TypeDef *RTCx, uint32_t Minutes)
- {
- MODIFY_REG(RTCx->ALRMAR, (RTC_ALRMAR_MNT | RTC_ALRMAR_MNU),
- (((Minutes & 0xF0U) << (RTC_ALRMAR_MNT_Pos - 4U)) | ((Minutes & 0x0FU) << RTC_ALRMAR_MNU_Pos)));
- }
- /**
- * @brief Get ALARM A Minutes in BCD format
- * @note helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Minutes from BCD to Binary format
- * @rmtoll RTC_ALRMAR MNT LL_RTC_ALMA_GetMinute\n
- * RTC_ALRMAR MNU LL_RTC_ALMA_GetMinute
- * @param RTCx RTC Instance
- * @retval Value between Min_Data=0x00 and Max_Data=0x59
- */
- __STATIC_INLINE uint32_t LL_RTC_ALMA_GetMinute(RTC_TypeDef *RTCx)
- {
- return (uint32_t)((READ_BIT(RTCx->ALRMAR, (RTC_ALRMAR_MNT | RTC_ALRMAR_MNU))) >> RTC_ALRMAR_MNU_Pos);
- }
- /**
- * @brief Set ALARM A Seconds in BCD format
- * @note helper macro __LL_RTC_CONVERT_BIN2BCD is available to convert Seconds from binary to BCD format
- * @rmtoll RTC_ALRMAR ST LL_RTC_ALMA_SetSecond\n
- * RTC_ALRMAR SU LL_RTC_ALMA_SetSecond
- * @param RTCx RTC Instance
- * @param Seconds Value between Min_Data=0x00 and Max_Data=0x59
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_ALMA_SetSecond(RTC_TypeDef *RTCx, uint32_t Seconds)
- {
- MODIFY_REG(RTCx->ALRMAR, (RTC_ALRMAR_ST | RTC_ALRMAR_SU),
- (((Seconds & 0xF0U) << (RTC_ALRMAR_ST_Pos - 4U)) | ((Seconds & 0x0FU) << RTC_ALRMAR_SU_Pos)));
- }
- /**
- * @brief Get ALARM A Seconds in BCD format
- * @note helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Seconds from BCD to Binary format
- * @rmtoll RTC_ALRMAR ST LL_RTC_ALMA_GetSecond\n
- * RTC_ALRMAR SU LL_RTC_ALMA_GetSecond
- * @param RTCx RTC Instance
- * @retval Value between Min_Data=0x00 and Max_Data=0x59
- */
- __STATIC_INLINE uint32_t LL_RTC_ALMA_GetSecond(RTC_TypeDef *RTCx)
- {
- return (uint32_t)((READ_BIT(RTCx->ALRMAR, (RTC_ALRMAR_ST | RTC_ALRMAR_SU))) >> RTC_ALRMAR_SU_Pos);
- }
- /**
- * @brief Set Alarm A Time (hour, minute and second) in BCD format
- * @rmtoll RTC_ALRMAR PM LL_RTC_ALMA_ConfigTime\n
- * RTC_ALRMAR HT LL_RTC_ALMA_ConfigTime\n
- * RTC_ALRMAR HU LL_RTC_ALMA_ConfigTime\n
- * RTC_ALRMAR MNT LL_RTC_ALMA_ConfigTime\n
- * RTC_ALRMAR MNU LL_RTC_ALMA_ConfigTime\n
- * RTC_ALRMAR ST LL_RTC_ALMA_ConfigTime\n
- * RTC_ALRMAR SU LL_RTC_ALMA_ConfigTime
- * @param RTCx RTC Instance
- * @param Format12_24 This parameter can be one of the following values:
- * @arg @ref LL_RTC_ALMA_TIME_FORMAT_AM
- * @arg @ref LL_RTC_ALMA_TIME_FORMAT_PM
- * @param Hours Value between Min_Data=0x01 and Max_Data=0x12 or between Min_Data=0x00 and Max_Data=0x23
- * @param Minutes Value between Min_Data=0x00 and Max_Data=0x59
- * @param Seconds Value between Min_Data=0x00 and Max_Data=0x59
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_ALMA_ConfigTime(RTC_TypeDef *RTCx, uint32_t Format12_24, uint32_t Hours, uint32_t Minutes,
- uint32_t Seconds)
- {
- uint32_t temp;
- temp = Format12_24 | (((Hours & 0xF0U) << (RTC_ALRMAR_HT_Pos - 4U)) | ((Hours & 0x0FU) << RTC_ALRMAR_HU_Pos)) | \
- (((Minutes & 0xF0U) << (RTC_ALRMAR_MNT_Pos - 4U)) | ((Minutes & 0x0FU) << RTC_ALRMAR_MNU_Pos)) | \
- (((Seconds & 0xF0U) << (RTC_ALRMAR_ST_Pos - 4U)) | ((Seconds & 0x0FU) << RTC_ALRMAR_SU_Pos));
- MODIFY_REG(RTCx->ALRMAR, RTC_ALRMAR_PM | RTC_ALRMAR_HT | RTC_ALRMAR_HU | RTC_ALRMAR_MNT | RTC_ALRMAR_MNU | RTC_ALRMAR_ST
- | RTC_ALRMAR_SU, temp);
- }
- /**
- * @brief Get Alarm B Time (hour, minute and second) in BCD format
- * @note helper macros __LL_RTC_GET_HOUR, __LL_RTC_GET_MINUTE and __LL_RTC_GET_SECOND
- * are available to get independently each parameter.
- * @rmtoll RTC_ALRMAR HT LL_RTC_ALMA_GetTime\n
- * RTC_ALRMAR HU LL_RTC_ALMA_GetTime\n
- * RTC_ALRMAR MNT LL_RTC_ALMA_GetTime\n
- * RTC_ALRMAR MNU LL_RTC_ALMA_GetTime\n
- * RTC_ALRMAR ST LL_RTC_ALMA_GetTime\n
- * RTC_ALRMAR SU LL_RTC_ALMA_GetTime
- * @param RTCx RTC Instance
- * @retval Combination of hours, minutes and seconds.
- */
- __STATIC_INLINE uint32_t LL_RTC_ALMA_GetTime(RTC_TypeDef *RTCx)
- {
- return (uint32_t)((LL_RTC_ALMA_GetHour(RTCx) << RTC_OFFSET_HOUR) | (LL_RTC_ALMA_GetMinute(RTCx) << RTC_OFFSET_MINUTE) | LL_RTC_ALMA_GetSecond(RTCx));
- }
- /**
- * @brief Set Alarm A Mask the most-significant bits starting at this bit
- * @note This register can be written only when ALRAE is reset in RTC_CR register,
- * or in initialization mode.
- * @rmtoll RTC_ALRMASSR MASKSS LL_RTC_ALMA_SetSubSecondMask
- * @param RTCx RTC Instance
- * @param Mask Value between Min_Data=0x00 and Max_Data=0xF
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_ALMA_SetSubSecondMask(RTC_TypeDef *RTCx, uint32_t Mask)
- {
- MODIFY_REG(RTCx->ALRMASSR, RTC_ALRMASSR_MASKSS, Mask << RTC_ALRMASSR_MASKSS_Pos);
- }
- /**
- * @brief Get Alarm A Mask the most-significant bits starting at this bit
- * @rmtoll RTC_ALRMASSR MASKSS LL_RTC_ALMA_GetSubSecondMask
- * @param RTCx RTC Instance
- * @retval Value between Min_Data=0x00 and Max_Data=0xF
- */
- __STATIC_INLINE uint32_t LL_RTC_ALMA_GetSubSecondMask(RTC_TypeDef *RTCx)
- {
- return (uint32_t)(READ_BIT(RTCx->ALRMASSR, RTC_ALRMASSR_MASKSS) >> RTC_ALRMASSR_MASKSS_Pos);
- }
- /**
- * @brief Set Alarm A Sub seconds value
- * @rmtoll RCT_ALRMASSR SS LL_RTC_ALMA_SetSubSecond
- * @param RTCx RTC Instance
- * @param Subsecond Value between Min_Data=0x00 and Max_Data=0x7FFF
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_ALMA_SetSubSecond(RTC_TypeDef *RTCx, uint32_t Subsecond)
- {
- MODIFY_REG(RTCx->ALRMASSR, RTC_ALRMASSR_SS, Subsecond);
- }
- /**
- * @brief Get Alarm A Sub seconds value
- * @rmtoll RCT_ALRMASSR SS LL_RTC_ALMA_GetSubSecond
- * @param RTCx RTC Instance
- * @retval Value between Min_Data=0x00 and Max_Data=0x7FFF
- */
- __STATIC_INLINE uint32_t LL_RTC_ALMA_GetSubSecond(RTC_TypeDef *RTCx)
- {
- return (uint32_t)(READ_BIT(RTCx->ALRMASSR, RTC_ALRMASSR_SS));
- }
- /**
- * @}
- */
- /** @defgroup RTC_LL_EF_ALARMB ALARMB
- * @{
- */
- /**
- * @brief Enable Alarm B
- * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
- * @rmtoll RTC_CR ALRBE LL_RTC_ALMB_Enable
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_ALMB_Enable(RTC_TypeDef *RTCx)
- {
- SET_BIT(RTCx->CR, RTC_CR_ALRBE);
- }
- /**
- * @brief Disable Alarm B
- * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
- * @rmtoll RTC_CR ALRBE LL_RTC_ALMB_Disable
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_ALMB_Disable(RTC_TypeDef *RTCx)
- {
- CLEAR_BIT(RTCx->CR, RTC_CR_ALRBE);
- }
- /**
- * @brief Specify the Alarm B masks.
- * @rmtoll RTC_ALRMBR MSK4 LL_RTC_ALMB_SetMask\n
- * RTC_ALRMBR MSK3 LL_RTC_ALMB_SetMask\n
- * RTC_ALRMBR MSK2 LL_RTC_ALMB_SetMask\n
- * RTC_ALRMBR MSK1 LL_RTC_ALMB_SetMask
- * @param RTCx RTC Instance
- * @param Mask This parameter can be a combination of the following values:
- * @arg @ref LL_RTC_ALMB_MASK_NONE
- * @arg @ref LL_RTC_ALMB_MASK_DATEWEEKDAY
- * @arg @ref LL_RTC_ALMB_MASK_HOURS
- * @arg @ref LL_RTC_ALMB_MASK_MINUTES
- * @arg @ref LL_RTC_ALMB_MASK_SECONDS
- * @arg @ref LL_RTC_ALMB_MASK_ALL
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_ALMB_SetMask(RTC_TypeDef *RTCx, uint32_t Mask)
- {
- MODIFY_REG(RTCx->ALRMBR, RTC_ALRMBR_MSK4 | RTC_ALRMBR_MSK3 | RTC_ALRMBR_MSK2 | RTC_ALRMBR_MSK1, Mask);
- }
- /**
- * @brief Get the Alarm B masks.
- * @rmtoll RTC_ALRMBR MSK4 LL_RTC_ALMB_GetMask\n
- * RTC_ALRMBR MSK3 LL_RTC_ALMB_GetMask\n
- * RTC_ALRMBR MSK2 LL_RTC_ALMB_GetMask\n
- * RTC_ALRMBR MSK1 LL_RTC_ALMB_GetMask
- * @param RTCx RTC Instance
- * @retval Returned value can be can be a combination of the following values:
- * @arg @ref LL_RTC_ALMB_MASK_NONE
- * @arg @ref LL_RTC_ALMB_MASK_DATEWEEKDAY
- * @arg @ref LL_RTC_ALMB_MASK_HOURS
- * @arg @ref LL_RTC_ALMB_MASK_MINUTES
- * @arg @ref LL_RTC_ALMB_MASK_SECONDS
- * @arg @ref LL_RTC_ALMB_MASK_ALL
- */
- __STATIC_INLINE uint32_t LL_RTC_ALMB_GetMask(RTC_TypeDef *RTCx)
- {
- return (uint32_t)(READ_BIT(RTCx->ALRMBR, RTC_ALRMBR_MSK4 | RTC_ALRMBR_MSK3 | RTC_ALRMBR_MSK2 | RTC_ALRMBR_MSK1));
- }
- /**
- * @brief Enable AlarmB Week day selection (DU[3:0] represents the week day. DT[1:0] is do not care)
- * @rmtoll RTC_ALRMBR WDSEL LL_RTC_ALMB_EnableWeekday
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_ALMB_EnableWeekday(RTC_TypeDef *RTCx)
- {
- SET_BIT(RTCx->ALRMBR, RTC_ALRMBR_WDSEL);
- }
- /**
- * @brief Disable AlarmB Week day selection (DU[3:0] represents the date )
- * @rmtoll RTC_ALRMBR WDSEL LL_RTC_ALMB_DisableWeekday
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_ALMB_DisableWeekday(RTC_TypeDef *RTCx)
- {
- CLEAR_BIT(RTCx->ALRMBR, RTC_ALRMBR_WDSEL);
- }
- /**
- * @brief Set ALARM B Day in BCD format
- * @note helper macro __LL_RTC_CONVERT_BIN2BCD is available to convert Day from binary to BCD format
- * @rmtoll RTC_ALRMBR DT LL_RTC_ALMB_SetDay\n
- * RTC_ALRMBR DU LL_RTC_ALMB_SetDay
- * @param RTCx RTC Instance
- * @param Day Value between Min_Data=0x01 and Max_Data=0x31
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_ALMB_SetDay(RTC_TypeDef *RTCx, uint32_t Day)
- {
- MODIFY_REG(RTCx->ALRMBR, (RTC_ALRMBR_DT | RTC_ALRMBR_DU),
- (((Day & 0xF0U) << (RTC_ALRMBR_DT_Pos - 4U)) | ((Day & 0x0FU) << RTC_ALRMBR_DU_Pos)));
- }
- /**
- * @brief Get ALARM B Day in BCD format
- * @note helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Day from BCD to Binary format
- * @rmtoll RTC_ALRMBR DT LL_RTC_ALMB_GetDay\n
- * RTC_ALRMBR DU LL_RTC_ALMB_GetDay
- * @param RTCx RTC Instance
- * @retval Value between Min_Data=0x01 and Max_Data=0x31
- */
- __STATIC_INLINE uint32_t LL_RTC_ALMB_GetDay(RTC_TypeDef *RTCx)
- {
- return (uint32_t)((READ_BIT(RTCx->ALRMBR, (RTC_ALRMBR_DT | RTC_ALRMBR_DU))) >> RTC_ALRMBR_DU_Pos);
- }
- /**
- * @brief Set ALARM B Weekday
- * @rmtoll RTC_ALRMBR DU LL_RTC_ALMB_SetWeekDay
- * @param RTCx RTC Instance
- * @param WeekDay This parameter can be one of the following values:
- * @arg @ref LL_RTC_WEEKDAY_MONDAY
- * @arg @ref LL_RTC_WEEKDAY_TUESDAY
- * @arg @ref LL_RTC_WEEKDAY_WEDNESDAY
- * @arg @ref LL_RTC_WEEKDAY_THURSDAY
- * @arg @ref LL_RTC_WEEKDAY_FRIDAY
- * @arg @ref LL_RTC_WEEKDAY_SATURDAY
- * @arg @ref LL_RTC_WEEKDAY_SUNDAY
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_ALMB_SetWeekDay(RTC_TypeDef *RTCx, uint32_t WeekDay)
- {
- MODIFY_REG(RTCx->ALRMBR, RTC_ALRMBR_DU, WeekDay << RTC_ALRMBR_DU_Pos);
- }
- /**
- * @brief Get ALARM B Weekday
- * @rmtoll RTC_ALRMBR DU LL_RTC_ALMB_GetWeekDay
- * @param RTCx RTC Instance
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_RTC_WEEKDAY_MONDAY
- * @arg @ref LL_RTC_WEEKDAY_TUESDAY
- * @arg @ref LL_RTC_WEEKDAY_WEDNESDAY
- * @arg @ref LL_RTC_WEEKDAY_THURSDAY
- * @arg @ref LL_RTC_WEEKDAY_FRIDAY
- * @arg @ref LL_RTC_WEEKDAY_SATURDAY
- * @arg @ref LL_RTC_WEEKDAY_SUNDAY
- */
- __STATIC_INLINE uint32_t LL_RTC_ALMB_GetWeekDay(RTC_TypeDef *RTCx)
- {
- return (uint32_t)(READ_BIT(RTCx->ALRMBR, RTC_ALRMBR_DU) >> RTC_ALRMBR_DU_Pos);
- }
- /**
- * @brief Set ALARM B time format (AM/24-hour or PM notation)
- * @rmtoll RTC_ALRMBR PM LL_RTC_ALMB_SetTimeFormat
- * @param RTCx RTC Instance
- * @param TimeFormat This parameter can be one of the following values:
- * @arg @ref LL_RTC_ALMB_TIME_FORMAT_AM
- * @arg @ref LL_RTC_ALMB_TIME_FORMAT_PM
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_ALMB_SetTimeFormat(RTC_TypeDef *RTCx, uint32_t TimeFormat)
- {
- MODIFY_REG(RTCx->ALRMBR, RTC_ALRMBR_PM, TimeFormat);
- }
- /**
- * @brief Get ALARM B time format (AM or PM notation)
- * @rmtoll RTC_ALRMBR PM LL_RTC_ALMB_GetTimeFormat
- * @param RTCx RTC Instance
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_RTC_ALMB_TIME_FORMAT_AM
- * @arg @ref LL_RTC_ALMB_TIME_FORMAT_PM
- */
- __STATIC_INLINE uint32_t LL_RTC_ALMB_GetTimeFormat(RTC_TypeDef *RTCx)
- {
- return (uint32_t)(READ_BIT(RTCx->ALRMBR, RTC_ALRMBR_PM));
- }
- /**
- * @brief Set ALARM B Hours in BCD format
- * @note helper macro __LL_RTC_CONVERT_BIN2BCD is available to convert Hours from binary to BCD format
- * @rmtoll RTC_ALRMBR HT LL_RTC_ALMB_SetHour\n
- * RTC_ALRMBR HU LL_RTC_ALMB_SetHour
- * @param RTCx RTC Instance
- * @param Hours Value between Min_Data=0x01 and Max_Data=0x12 or between Min_Data=0x00 and Max_Data=0x23
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_ALMB_SetHour(RTC_TypeDef *RTCx, uint32_t Hours)
- {
- MODIFY_REG(RTCx->ALRMBR, (RTC_ALRMBR_HT | RTC_ALRMBR_HU),
- (((Hours & 0xF0U) << (RTC_ALRMBR_HT_Pos - 4U)) | ((Hours & 0x0FU) << RTC_ALRMBR_HU_Pos)));
- }
- /**
- * @brief Get ALARM B Hours in BCD format
- * @note helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Hours from BCD to Binary format
- * @rmtoll RTC_ALRMBR HT LL_RTC_ALMB_GetHour\n
- * RTC_ALRMBR HU LL_RTC_ALMB_GetHour
- * @param RTCx RTC Instance
- * @retval Value between Min_Data=0x01 and Max_Data=0x12 or between Min_Data=0x00 and Max_Data=0x23
- */
- __STATIC_INLINE uint32_t LL_RTC_ALMB_GetHour(RTC_TypeDef *RTCx)
- {
- return (uint32_t)((READ_BIT(RTCx->ALRMBR, (RTC_ALRMBR_HT | RTC_ALRMBR_HU))) >> RTC_ALRMBR_HU_Pos);
- }
- /**
- * @brief Set ALARM B Minutes in BCD format
- * @note helper macro __LL_RTC_CONVERT_BIN2BCD is available to convert Minutes from binary to BCD format
- * @rmtoll RTC_ALRMBR MNT LL_RTC_ALMB_SetMinute\n
- * RTC_ALRMBR MNU LL_RTC_ALMB_SetMinute
- * @param RTCx RTC Instance
- * @param Minutes between Min_Data=0x00 and Max_Data=0x59
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_ALMB_SetMinute(RTC_TypeDef *RTCx, uint32_t Minutes)
- {
- MODIFY_REG(RTCx->ALRMBR, (RTC_ALRMBR_MNT | RTC_ALRMBR_MNU),
- (((Minutes & 0xF0U) << (RTC_ALRMBR_MNT_Pos - 4U)) | ((Minutes & 0x0FU) << RTC_ALRMBR_MNU_Pos)));
- }
- /**
- * @brief Get ALARM B Minutes in BCD format
- * @note helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Minutes from BCD to Binary format
- * @rmtoll RTC_ALRMBR MNT LL_RTC_ALMB_GetMinute\n
- * RTC_ALRMBR MNU LL_RTC_ALMB_GetMinute
- * @param RTCx RTC Instance
- * @retval Value between Min_Data=0x00 and Max_Data=0x59
- */
- __STATIC_INLINE uint32_t LL_RTC_ALMB_GetMinute(RTC_TypeDef *RTCx)
- {
- return (uint32_t)((READ_BIT(RTCx->ALRMBR, (RTC_ALRMBR_MNT | RTC_ALRMBR_MNU))) >> RTC_ALRMBR_MNU_Pos);
- }
- /**
- * @brief Set ALARM B Seconds in BCD format
- * @note helper macro __LL_RTC_CONVERT_BIN2BCD is available to convert Seconds from binary to BCD format
- * @rmtoll RTC_ALRMBR ST LL_RTC_ALMB_SetSecond\n
- * RTC_ALRMBR SU LL_RTC_ALMB_SetSecond
- * @param RTCx RTC Instance
- * @param Seconds Value between Min_Data=0x00 and Max_Data=0x59
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_ALMB_SetSecond(RTC_TypeDef *RTCx, uint32_t Seconds)
- {
- MODIFY_REG(RTCx->ALRMBR, (RTC_ALRMBR_ST | RTC_ALRMBR_SU),
- (((Seconds & 0xF0U) << (RTC_ALRMBR_ST_Pos - 4U)) | ((Seconds & 0x0FU) << RTC_ALRMBR_SU_Pos)));
- }
- /**
- * @brief Get ALARM B Seconds in BCD format
- * @note helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Seconds from BCD to Binary format
- * @rmtoll RTC_ALRMBR ST LL_RTC_ALMB_GetSecond\n
- * RTC_ALRMBR SU LL_RTC_ALMB_GetSecond
- * @param RTCx RTC Instance
- * @retval Value between Min_Data=0x00 and Max_Data=0x59
- */
- __STATIC_INLINE uint32_t LL_RTC_ALMB_GetSecond(RTC_TypeDef *RTCx)
- {
- return (uint32_t)((READ_BIT(RTCx->ALRMBR, (RTC_ALRMBR_ST | RTC_ALRMBR_SU))) >> RTC_ALRMBR_SU_Pos);
- }
- /**
- * @brief Set Alarm B Time (hour, minute and second) in BCD format
- * @rmtoll RTC_ALRMBR PM LL_RTC_ALMB_ConfigTime\n
- * RTC_ALRMBR HT LL_RTC_ALMB_ConfigTime\n
- * RTC_ALRMBR HU LL_RTC_ALMB_ConfigTime\n
- * RTC_ALRMBR MNT LL_RTC_ALMB_ConfigTime\n
- * RTC_ALRMBR MNU LL_RTC_ALMB_ConfigTime\n
- * RTC_ALRMBR ST LL_RTC_ALMB_ConfigTime\n
- * RTC_ALRMBR SU LL_RTC_ALMB_ConfigTime
- * @param RTCx RTC Instance
- * @param Format12_24 This parameter can be one of the following values:
- * @arg @ref LL_RTC_ALMB_TIME_FORMAT_AM
- * @arg @ref LL_RTC_ALMB_TIME_FORMAT_PM
- * @param Hours Value between Min_Data=0x01 and Max_Data=0x12 or between Min_Data=0x00 and Max_Data=0x23
- * @param Minutes Value between Min_Data=0x00 and Max_Data=0x59
- * @param Seconds Value between Min_Data=0x00 and Max_Data=0x59
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_ALMB_ConfigTime(RTC_TypeDef *RTCx, uint32_t Format12_24, uint32_t Hours, uint32_t Minutes,
- uint32_t Seconds)
- {
- uint32_t temp;
- temp = Format12_24 | (((Hours & 0xF0U) << (RTC_ALRMBR_HT_Pos - 4U)) | ((Hours & 0x0FU) << RTC_ALRMBR_HU_Pos)) | \
- (((Minutes & 0xF0U) << (RTC_ALRMBR_MNT_Pos - 4U)) | ((Minutes & 0x0FU) << RTC_ALRMBR_MNU_Pos)) | \
- (((Seconds & 0xF0U) << (RTC_ALRMBR_ST_Pos - 4U)) | ((Seconds & 0x0FU) << RTC_ALRMBR_SU_Pos));
- MODIFY_REG(RTCx->ALRMBR, RTC_ALRMBR_PM | RTC_ALRMBR_HT | RTC_ALRMBR_HU | RTC_ALRMBR_MNT | RTC_ALRMBR_MNU | RTC_ALRMBR_ST
- | RTC_ALRMBR_SU, temp);
- }
- /**
- * @brief Get Alarm B Time (hour, minute and second) in BCD format
- * @note helper macros __LL_RTC_GET_HOUR, __LL_RTC_GET_MINUTE and __LL_RTC_GET_SECOND
- * are available to get independently each parameter.
- * @rmtoll RTC_ALRMBR HT LL_RTC_ALMB_GetTime\n
- * RTC_ALRMBR HU LL_RTC_ALMB_GetTime\n
- * RTC_ALRMBR MNT LL_RTC_ALMB_GetTime\n
- * RTC_ALRMBR MNU LL_RTC_ALMB_GetTime\n
- * RTC_ALRMBR ST LL_RTC_ALMB_GetTime\n
- * RTC_ALRMBR SU LL_RTC_ALMB_GetTime
- * @param RTCx RTC Instance
- * @retval Combination of hours, minutes and seconds.
- */
- __STATIC_INLINE uint32_t LL_RTC_ALMB_GetTime(RTC_TypeDef *RTCx)
- {
- return (uint32_t)((LL_RTC_ALMB_GetHour(RTCx) << RTC_OFFSET_HOUR) | (LL_RTC_ALMB_GetMinute(RTCx) << RTC_OFFSET_MINUTE) | LL_RTC_ALMB_GetSecond(RTCx));
- }
- /**
- * @brief Set Alarm B Mask the most-significant bits starting at this bit
- * @note This register can be written only when ALRBE is reset in RTC_CR register,
- * or in initialization mode.
- * @rmtoll RTC_ALRMBSSR MASKSS LL_RTC_ALMB_SetSubSecondMask
- * @param RTCx RTC Instance
- * @param Mask Value between Min_Data=0x00 and Max_Data=0xF
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_ALMB_SetSubSecondMask(RTC_TypeDef *RTCx, uint32_t Mask)
- {
- MODIFY_REG(RTCx->ALRMBSSR, RTC_ALRMBSSR_MASKSS, Mask << RTC_ALRMBSSR_MASKSS_Pos);
- }
- /**
- * @brief Get Alarm B Mask the most-significant bits starting at this bit
- * @rmtoll RTC_ALRMBSSR MASKSS LL_RTC_ALMB_GetSubSecondMask
- * @param RTCx RTC Instance
- * @retval Value between Min_Data=0x00 and Max_Data=0xF
- */
- __STATIC_INLINE uint32_t LL_RTC_ALMB_GetSubSecondMask(RTC_TypeDef *RTCx)
- {
- return (uint32_t)(READ_BIT(RTCx->ALRMBSSR, RTC_ALRMBSSR_MASKSS) >> RTC_ALRMBSSR_MASKSS_Pos);
- }
- /**
- * @brief Set Alarm B Sub seconds value
- * @rmtoll RTC_ALRMBSSR SS LL_RTC_ALMB_SetSubSecond
- * @param RTCx RTC Instance
- * @param Subsecond Value between Min_Data=0x00 and Max_Data=0x7FFF
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_ALMB_SetSubSecond(RTC_TypeDef *RTCx, uint32_t Subsecond)
- {
- MODIFY_REG(RTCx->ALRMBSSR, RTC_ALRMBSSR_SS, Subsecond);
- }
- /**
- * @brief Get Alarm B Sub seconds value
- * @rmtoll RTC_ALRMBSSR SS LL_RTC_ALMB_GetSubSecond
- * @param RTCx RTC Instance
- * @retval Value between Min_Data=0x00 and Max_Data=0x7FFF
- */
- __STATIC_INLINE uint32_t LL_RTC_ALMB_GetSubSecond(RTC_TypeDef *RTCx)
- {
- return (uint32_t)(READ_BIT(RTCx->ALRMBSSR, RTC_ALRMBSSR_SS));
- }
- /**
- * @}
- */
- /** @defgroup RTC_LL_EF_Timestamp Timestamp
- * @{
- */
- /**
- * @brief Enable internal event timestamp
- * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
- * @rmtoll RTC_CR ITSE LL_RTC_TS_EnableInternalEvent
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_TS_EnableInternalEvent(RTC_TypeDef *RTCx)
- {
- SET_BIT(RTCx->CR, RTC_CR_ITSE);
- }
- /**
- * @brief Disable internal event timestamp
- * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
- * @rmtoll RTC_CR ITSE LL_RTC_TS_DisableInternalEvent
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_TS_DisableInternalEvent(RTC_TypeDef *RTCx)
- {
- CLEAR_BIT(RTCx->CR, RTC_CR_ITSE);
- }
- /**
- * @brief Enable Timestamp
- * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
- * @rmtoll RTC_CR ITSE LL_RTC_TS_Enable
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_TS_Enable(RTC_TypeDef *RTCx)
- {
- SET_BIT(RTCx->CR, RTC_CR_TSE);
- }
- /**
- * @brief Disable Timestamp
- * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
- * @rmtoll RTC_CR ITSE LL_RTC_TS_Disable
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_TS_Disable(RTC_TypeDef *RTCx)
- {
- CLEAR_BIT(RTCx->CR, RTC_CR_TSE);
- }
- /**
- * @brief Set Time-stamp event active edge
- * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
- * @note TSE must be reset when TSEDGE is changed to avoid unwanted TSF setting
- * @rmtoll RTC_CR ITSEDGE LL_RTC_TS_SetActiveEdge
- * @param RTCx RTC Instance
- * @param Edge This parameter can be one of the following values:
- * @arg @ref LL_RTC_TIMESTAMP_EDGE_RISING
- * @arg @ref LL_RTC_TIMESTAMP_EDGE_FALLING
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_TS_SetActiveEdge(RTC_TypeDef *RTCx, uint32_t Edge)
- {
- MODIFY_REG(RTCx->CR, RTC_CR_TSEDGE, Edge);
- }
- /**
- * @brief Get Time-stamp event active edge
- * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
- * @rmtoll RTC_CR ITSEDGE LL_RTC_TS_GetActiveEdge
- * @param RTCx RTC Instance
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_RTC_TIMESTAMP_EDGE_RISING
- * @arg @ref LL_RTC_TIMESTAMP_EDGE_FALLING
- */
- __STATIC_INLINE uint32_t LL_RTC_TS_GetActiveEdge(RTC_TypeDef *RTCx)
- {
- return (uint32_t)(READ_BIT(RTCx->CR, RTC_CR_TSEDGE));
- }
- /**
- * @brief Get Timestamp AM/PM notation (AM or 24-hour format)
- * @rmtoll RTC_TSTR PM LL_RTC_TS_GetTimeFormat
- * @param RTCx RTC Instance
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_RTC_TS_TIME_FORMAT_AM
- * @arg @ref LL_RTC_TS_TIME_FORMAT_PM
- */
- __STATIC_INLINE uint32_t LL_RTC_TS_GetTimeFormat(RTC_TypeDef *RTCx)
- {
- return (uint32_t)(READ_BIT(RTCx->TSTR, RTC_TSTR_PM));
- }
- /**
- * @brief Get Timestamp Hours in BCD format
- * @note helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Hours from BCD to Binary format
- * @rmtoll RTC_TSTR HT LL_RTC_TS_GetHour\n
- * RTC_TSTR HU LL_RTC_TS_GetHour
- * @param RTCx RTC Instance
- * @retval Value between Min_Data=0x01 and Max_Data=0x12 or between Min_Data=0x00 and Max_Data=0x23
- */
- __STATIC_INLINE uint32_t LL_RTC_TS_GetHour(RTC_TypeDef *RTCx)
- {
- return (uint32_t)(READ_BIT(RTCx->TSTR, RTC_TSTR_HT | RTC_TSTR_HU) >> RTC_TSTR_HU_Pos);
- }
- /**
- * @brief Get Timestamp Minutes in BCD format
- * @note helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Minutes from BCD to Binary format
- * @rmtoll RTC_TSTR MNT LL_RTC_TS_GetMinute\n
- * RTC_TSTR HU LL_RTC_TS_GetMinute
- * @param RTCx RTC Instance
- * @retval Value between Min_Data=0x00 and Max_Data=0x59
- */
- __STATIC_INLINE uint32_t LL_RTC_TS_GetMinute(RTC_TypeDef *RTCx)
- {
- return (uint32_t)(READ_BIT(RTCx->TSTR, RTC_TSTR_MNT | RTC_TSTR_MNU) >> RTC_TSTR_MNU_Pos);
- }
- /**
- * @brief Get Timestamp Seconds in BCD format
- * @note helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Seconds from BCD to Binary format
- * @rmtoll RTC_TSTR ST LL_RTC_TS_GetSecond\n
- * RTC_TSTR HU LL_RTC_TS_GetSecond
- * @param RTCx RTC Instance
- * @retval Value between Min_Data=0x00 and Max_Data=0x59
- */
- __STATIC_INLINE uint32_t LL_RTC_TS_GetSecond(RTC_TypeDef *RTCx)
- {
- return (uint32_t)(READ_BIT(RTCx->TSTR, RTC_TSTR_ST | RTC_TSTR_SU));
- }
- /**
- * @brief Get Timestamp time (hour, minute and second) in BCD format
- * @note helper macros __LL_RTC_GET_HOUR, __LL_RTC_GET_MINUTE and __LL_RTC_GET_SECOND
- * are available to get independently each parameter.
- * @rmtoll RTC_TSTR HT LL_RTC_TS_GetTime\n
- * RTC_TSTR HU LL_RTC_TS_GetTime\n
- * RTC_TSTR MNT LL_RTC_TS_GetTime\n
- * RTC_TSTR MNU LL_RTC_TS_GetTime\n
- * RTC_TSTR ST LL_RTC_TS_GetTime\n
- * RTC_TSTR SU LL_RTC_TS_GetTime
- * @param RTCx RTC Instance
- * @retval Combination of hours, minutes and seconds.
- */
- __STATIC_INLINE uint32_t LL_RTC_TS_GetTime(RTC_TypeDef *RTCx)
- {
- return (uint32_t)(READ_BIT(RTCx->TSTR,
- RTC_TSTR_HT | RTC_TSTR_HU | RTC_TSTR_MNT | RTC_TSTR_MNU | RTC_TSTR_ST | RTC_TSTR_SU));
- }
- /**
- * @brief Get Timestamp Week day
- * @rmtoll RTC_TSDR WDU LL_RTC_TS_GetWeekDay
- * @param RTCx RTC Instance
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_RTC_WEEKDAY_MONDAY
- * @arg @ref LL_RTC_WEEKDAY_TUESDAY
- * @arg @ref LL_RTC_WEEKDAY_WEDNESDAY
- * @arg @ref LL_RTC_WEEKDAY_THURSDAY
- * @arg @ref LL_RTC_WEEKDAY_FRIDAY
- * @arg @ref LL_RTC_WEEKDAY_SATURDAY
- * @arg @ref LL_RTC_WEEKDAY_SUNDAY
- */
- __STATIC_INLINE uint32_t LL_RTC_TS_GetWeekDay(RTC_TypeDef *RTCx)
- {
- return (uint32_t)(READ_BIT(RTCx->TSDR, RTC_TSDR_WDU) >> RTC_TSDR_WDU_Pos);
- }
- /**
- * @brief Get Timestamp Month in BCD format
- * @note helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Month from BCD to Binary format
- * @rmtoll RTC_TSDR MT LL_RTC_TS_GetMonth\n
- * RTC_TSDR MU LL_RTC_TS_GetMonth
- * @param RTCx RTC Instance
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_RTC_MONTH_JANUARY
- * @arg @ref LL_RTC_MONTH_FEBRUARY
- * @arg @ref LL_RTC_MONTH_MARCH
- * @arg @ref LL_RTC_MONTH_APRIL
- * @arg @ref LL_RTC_MONTH_MAY
- * @arg @ref LL_RTC_MONTH_JUNE
- * @arg @ref LL_RTC_MONTH_JULY
- * @arg @ref LL_RTC_MONTH_AUGUST
- * @arg @ref LL_RTC_MONTH_SEPTEMBER
- * @arg @ref LL_RTC_MONTH_OCTOBER
- * @arg @ref LL_RTC_MONTH_NOVEMBER
- * @arg @ref LL_RTC_MONTH_DECEMBER
- */
- __STATIC_INLINE uint32_t LL_RTC_TS_GetMonth(RTC_TypeDef *RTCx)
- {
- return (uint32_t)(READ_BIT(RTCx->TSDR, RTC_TSDR_MT | RTC_TSDR_MU) >> RTC_TSDR_MU_Pos);
- }
- /**
- * @brief Get Timestamp Day in BCD format
- * @note helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Day from BCD to Binary format
- * @rmtoll RTC_TSDR DT LL_RTC_TS_GetDay\n
- * RTC_TSDR DU LL_RTC_TS_GetDay
- * @param RTCx RTC Instance
- * @retval Value between Min_Data=0x01 and Max_Data=0x31
- */
- __STATIC_INLINE uint32_t LL_RTC_TS_GetDay(RTC_TypeDef *RTCx)
- {
- return (uint32_t)(READ_BIT(RTCx->TSDR, RTC_TSDR_DT | RTC_TSDR_DU));
- }
- /**
- * @brief Get Timestamp date (WeekDay, Day and Month) in BCD format
- * @note helper macros __LL_RTC_GET_WEEKDAY, __LL_RTC_GET_MONTH,
- * and __LL_RTC_GET_DAY are available to get independently each parameter.
- * @rmtoll RTC_TSDR WDU LL_RTC_TS_GetDate\n
- * RTC_TSDR MT LL_RTC_TS_GetDate\n
- * RTC_TSDR MU LL_RTC_TS_GetDate\n
- * RTC_TSDR DT LL_RTC_TS_GetDate\n
- * RTC_TSDR DU LL_RTC_TS_GetDate
- * @param RTCx RTC Instance
- * @retval Combination of Weekday, Day and Month
- */
- __STATIC_INLINE uint32_t LL_RTC_TS_GetDate(RTC_TypeDef *RTCx)
- {
- return (uint32_t)(READ_BIT(RTCx->TSDR, RTC_TSDR_WDU | RTC_TSDR_MT | RTC_TSDR_MU | RTC_TSDR_DT | RTC_TSDR_DU));
- }
- /**
- * @brief Get time-stamp sub second value
- * @rmtoll RTC_TSDR SS LL_RTC_TS_GetSubSecond
- * @param RTCx RTC Instance
- * @retval Value between Min_Data=0x00 and Max_Data=0xFFFF
- */
- __STATIC_INLINE uint32_t LL_RTC_TS_GetSubSecond(RTC_TypeDef *RTCx)
- {
- return (uint32_t)(READ_BIT(RTCx->TSSSR, RTC_TSSSR_SS));
- }
- /**
- * @brief Activate timestamp on tamper detection event
- * @rmtoll RTC_CR TAMPTS LL_RTC_TS_EnableOnTamper
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_TS_EnableOnTamper(RTC_TypeDef *RTCx)
- {
- SET_BIT(RTCx->CR, RTC_CR_TAMPTS);
- }
- /**
- * @brief Disable timestamp on tamper detection event
- * @rmtoll RTC_CR TAMPTS LL_RTC_TS_DisableOnTamper
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_TS_DisableOnTamper(RTC_TypeDef *RTCx)
- {
- CLEAR_BIT(RTCx->CR, RTC_CR_TAMPTS);
- }
- /**
- * @}
- */
- /** @defgroup RTC_LL_EF_Tamper Tamper
- * @{
- */
- /**
- * @brief Enable TAMPx input detection
- * @rmtoll TAMP_CR1 TAMP1E LL_RTC_TAMPER_Enable\n
- * TAMP_CR1 TAMP2E... LL_RTC_TAMPER_Enable
- * @param RTCx RTC Instance
- * @param Tamper This parameter can be a combination of the following values:
- * @arg @ref LL_RTC_TAMPER_1
- * @arg @ref LL_RTC_TAMPER_2
- *
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_TAMPER_Enable(RTC_TypeDef *RTCx, uint32_t Tamper)
- {
- UNUSED(RTCx);
- SET_BIT(TAMP->CR1, Tamper);
- }
- /**
- * @brief Clear TAMPx input detection
- * @rmtoll TAMP_CR1 TAMP1E LL_RTC_TAMPER_Disable\n
- * TAMP_CR1 TAMP2E... LL_RTC_TAMPER_Disable
- * @param RTCx RTC Instance
- * @param Tamper This parameter can be a combination of the following values:
- * @arg @ref LL_RTC_TAMPER_1
- * @arg @ref LL_RTC_TAMPER_2
- *
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_TAMPER_Disable(RTC_TypeDef *RTCx, uint32_t Tamper)
- {
- UNUSED(RTCx);
- CLEAR_BIT(TAMP->CR1, Tamper);
- }
- /**
- * @brief Enable Tamper mask flag
- * @note Associated Tamper IT must not enabled when tamper mask is set.
- * @rmtoll TAMP_CR2 TAMP1MF LL_RTC_TAMPER_EnableMask\n
- * TAMP_CR2 TAMP2MF... LL_RTC_TAMPER_EnableMask
- * @param RTCx RTC Instance
- * @param Mask This parameter can be a combination of the following values:
- * @arg @ref LL_RTC_TAMPER_MASK_TAMPER1
- * @arg @ref LL_RTC_TAMPER_MASK_TAMPER2
- *
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_TAMPER_EnableMask(RTC_TypeDef *RTCx, uint32_t Mask)
- {
- UNUSED(RTCx);
- SET_BIT(TAMP->CR2, Mask);
- }
- /**
- * @brief Disable Tamper mask flag
- * @rmtoll TAMP_CR2 TAMP1MF LL_RTC_TAMPER_DisableMask\n
- * TAMP_CR2 TAMP2MF... LL_RTC_TAMPER_DisableMask
- * @param RTCx RTC Instance
- * @param Mask This parameter can be a combination of the following values:
- * @arg @ref LL_RTC_TAMPER_MASK_TAMPER1
- * @arg @ref LL_RTC_TAMPER_MASK_TAMPER2
- *
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_TAMPER_DisableMask(RTC_TypeDef *RTCx, uint32_t Mask)
- {
- UNUSED(RTCx);
- CLEAR_BIT(TAMP->CR2, Mask);
- }
- /**
- * @brief Enable backup register erase after Tamper event detection
- * @rmtoll TAMP_CR2 TAMP1NOERASE LL_RTC_TAMPER_EnableEraseBKP\n
- * TAMP_CR2 TAMP2NOERASE... LL_RTC_TAMPER_EnableEraseBKP
- * @param RTCx RTC Instance
- * @param Tamper This parameter can be a combination of the following values:
- * @arg @ref LL_RTC_TAMPER_NOERASE_TAMPER1
- * @arg @ref LL_RTC_TAMPER_NOERASE_TAMPER2
- *
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_TAMPER_EnableEraseBKP(RTC_TypeDef *RTCx, uint32_t Tamper)
- {
- UNUSED(RTCx);
- CLEAR_BIT(TAMP->CR2, Tamper);
- }
- /**
- * @brief Disable backup register erase after Tamper event detection
- * @rmtoll TAMP_CR2 TAMP1NOERASE LL_RTC_TAMPER_DisableEraseBKP\n
- * TAMP_CR2 TAMP2NOERASE... LL_RTC_TAMPER_DisableEraseBKP
- * @param RTCx RTC Instance
- * @param Tamper This parameter can be a combination of the following values:
- * @arg @ref LL_RTC_TAMPER_NOERASE_TAMPER1
- * @arg @ref LL_RTC_TAMPER_NOERASE_TAMPER2
- *
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_TAMPER_DisableEraseBKP(RTC_TypeDef *RTCx, uint32_t Tamper)
- {
- UNUSED(RTCx);
- SET_BIT(TAMP->CR2, Tamper);
- }
- /**
- * @brief Disable RTC_TAMPx pull-up disable (Disable precharge of RTC_TAMPx pins)
- * @rmtoll TAMP_FLTCR TAMPPUDIS LL_RTC_TAMPER_DisablePullUp
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_TAMPER_DisablePullUp(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- SET_BIT(TAMP->FLTCR, TAMP_FLTCR_TAMPPUDIS);
- }
- /**
- * @brief Enable RTC_TAMPx pull-up disable ( Precharge RTC_TAMPx pins before sampling)
- * @rmtoll TAMP_FLTCR TAMPPUDIS LL_RTC_TAMPER_EnablePullUp
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_TAMPER_EnablePullUp(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- CLEAR_BIT(TAMP->FLTCR, TAMP_FLTCR_TAMPPUDIS);
- }
- /**
- * @brief Set RTC_TAMPx precharge duration
- * @rmtoll TAMP_FLTCR TAMPPRCH LL_RTC_TAMPER_SetPrecharge
- * @param RTCx RTC Instance
- * @param Duration This parameter can be one of the following values:
- * @arg @ref LL_RTC_TAMPER_DURATION_1RTCCLK
- * @arg @ref LL_RTC_TAMPER_DURATION_2RTCCLK
- * @arg @ref LL_RTC_TAMPER_DURATION_4RTCCLK
- * @arg @ref LL_RTC_TAMPER_DURATION_8RTCCLK
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_TAMPER_SetPrecharge(RTC_TypeDef *RTCx, uint32_t Duration)
- {
- UNUSED(RTCx);
- MODIFY_REG(TAMP->FLTCR, TAMP_FLTCR_TAMPPRCH, Duration);
- }
- /**
- * @brief Get RTC_TAMPx precharge duration
- * @rmtoll TAMP_FLTCR TAMPPRCH LL_RTC_TAMPER_GetPrecharge
- * @param RTCx RTC Instance
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_RTC_TAMPER_DURATION_1RTCCLK
- * @arg @ref LL_RTC_TAMPER_DURATION_2RTCCLK
- * @arg @ref LL_RTC_TAMPER_DURATION_4RTCCLK
- * @arg @ref LL_RTC_TAMPER_DURATION_8RTCCLK
- */
- __STATIC_INLINE uint32_t LL_RTC_TAMPER_GetPrecharge(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- return (uint32_t)(READ_BIT(TAMP->FLTCR, TAMP_FLTCR_TAMPPRCH));
- }
- /**
- * @brief Set RTC_TAMPx filter count
- * @rmtoll TAMP_FLTCR TAMPFLT LL_RTC_TAMPER_SetFilterCount
- * @param RTCx RTC Instance
- * @param FilterCount This parameter can be one of the following values:
- * @arg @ref LL_RTC_TAMPER_FILTER_DISABLE
- * @arg @ref LL_RTC_TAMPER_FILTER_2SAMPLE
- * @arg @ref LL_RTC_TAMPER_FILTER_4SAMPLE
- * @arg @ref LL_RTC_TAMPER_FILTER_8SAMPLE
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_TAMPER_SetFilterCount(RTC_TypeDef *RTCx, uint32_t FilterCount)
- {
- UNUSED(RTCx);
- MODIFY_REG(TAMP->FLTCR, TAMP_FLTCR_TAMPFLT, FilterCount);
- }
- /**
- * @brief Get RTC_TAMPx filter count
- * @rmtoll TAMP_FLTCR TAMPFLT LL_RTC_TAMPER_GetFilterCount
- * @param RTCx RTC Instance
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_RTC_TAMPER_FILTER_DISABLE
- * @arg @ref LL_RTC_TAMPER_FILTER_2SAMPLE
- * @arg @ref LL_RTC_TAMPER_FILTER_4SAMPLE
- * @arg @ref LL_RTC_TAMPER_FILTER_8SAMPLE
- */
- __STATIC_INLINE uint32_t LL_RTC_TAMPER_GetFilterCount(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- return (uint32_t)(READ_BIT(TAMP->FLTCR, TAMP_FLTCR_TAMPFLT));
- }
- /**
- * @brief Set Tamper sampling frequency
- * @rmtoll TAMP_FLTCR TAMPFREQ LL_RTC_TAMPER_SetSamplingFreq
- * @param RTCx RTC Instance
- * @param SamplingFreq This parameter can be one of the following values:
- * @arg @ref LL_RTC_TAMPER_SAMPLFREQDIV_32768
- * @arg @ref LL_RTC_TAMPER_SAMPLFREQDIV_16384
- * @arg @ref LL_RTC_TAMPER_SAMPLFREQDIV_8192
- * @arg @ref LL_RTC_TAMPER_SAMPLFREQDIV_4096
- * @arg @ref LL_RTC_TAMPER_SAMPLFREQDIV_2048
- * @arg @ref LL_RTC_TAMPER_SAMPLFREQDIV_1024
- * @arg @ref LL_RTC_TAMPER_SAMPLFREQDIV_512
- * @arg @ref LL_RTC_TAMPER_SAMPLFREQDIV_256
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_TAMPER_SetSamplingFreq(RTC_TypeDef *RTCx, uint32_t SamplingFreq)
- {
- UNUSED(RTCx);
- MODIFY_REG(TAMP->FLTCR, TAMP_FLTCR_TAMPFREQ, SamplingFreq);
- }
- /**
- * @brief Get Tamper sampling frequency
- * @rmtoll TAMP_FLTCR TAMPFREQ LL_RTC_TAMPER_GetSamplingFreq
- * @param RTCx RTC Instance
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_RTC_TAMPER_SAMPLFREQDIV_32768
- * @arg @ref LL_RTC_TAMPER_SAMPLFREQDIV_16384
- * @arg @ref LL_RTC_TAMPER_SAMPLFREQDIV_8192
- * @arg @ref LL_RTC_TAMPER_SAMPLFREQDIV_4096
- * @arg @ref LL_RTC_TAMPER_SAMPLFREQDIV_2048
- * @arg @ref LL_RTC_TAMPER_SAMPLFREQDIV_1024
- * @arg @ref LL_RTC_TAMPER_SAMPLFREQDIV_512
- * @arg @ref LL_RTC_TAMPER_SAMPLFREQDIV_256
- */
- __STATIC_INLINE uint32_t LL_RTC_TAMPER_GetSamplingFreq(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- return (uint32_t)(READ_BIT(TAMP->FLTCR, TAMP_FLTCR_TAMPFREQ));
- }
- /**
- * @brief Enable Active level for Tamper input
- * @rmtoll TAMP_CR2 TAMP1TRG LL_RTC_TAMPER_EnableActiveLevel\n
- * TAMP_CR2 TAMP2TRG... LL_RTC_TAMPER_EnableActiveLevel
- * @param RTCx RTC Instance
- * @param Tamper This parameter can be a combination of the following values:
- * @arg @ref LL_RTC_TAMPER_ACTIVELEVEL_TAMP1
- * @arg @ref LL_RTC_TAMPER_ACTIVELEVEL_TAMP2
- *
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_TAMPER_EnableActiveLevel(RTC_TypeDef *RTCx, uint32_t Tamper)
- {
- UNUSED(RTCx);
- SET_BIT(TAMP->CR2, Tamper);
- }
- /**
- * @brief Disable Active level for Tamper input
- * @rmtoll TAMP_CR2 TAMP1TRG LL_RTC_TAMPER_DisableActiveLevel\n
- * TAMP_CR2 TAMP2TRG... LL_RTC_TAMPER_DisableActiveLevel
- * @param RTCx RTC Instance
- * @param Tamper This parameter can be a combination of the following values:
- * @arg @ref LL_RTC_TAMPER_ACTIVELEVEL_TAMP1
- * @arg @ref LL_RTC_TAMPER_ACTIVELEVEL_TAMP2
- *
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_TAMPER_DisableActiveLevel(RTC_TypeDef *RTCx, uint32_t Tamper)
- {
- UNUSED(RTCx);
- CLEAR_BIT(TAMP->CR2, Tamper);
- }
- /**
- * @}
- */
- /** @defgroup RTC_LL_EF_Internal_Tamper Internal Tamper
- * @{
- */
- /**
- * @brief Enable internal tamper detection.
- * @rmtoll TAMP_CR1 ITAMP1E LL_RTC_TAMPER_ITAMP_Enable\n
- * TAMP_CR1 ITAMP3E LL_RTC_TAMPER_ITAMP_Enable\n
- * TAMP_CR1 ITAMP4E LL_RTC_TAMPER_ITAMP_Enable\n
- * TAMP_CR1 ITAMP5E LL_RTC_TAMPER_ITAMP_Enable\n
- * TAMP_CR1 ITAMP6E LL_RTC_TAMPER_ITAMP_Enable\n
- * TAMP_CR1 ITAMP7E... LL_RTC_TAMPER_ITAMP_Enable
- * @param RTCx RTC Instance
- * @param InternalTamper This parameter can be a combination of the following values:
- * @arg @ref LL_RTC_TAMPER_ITAMP1
- * @arg @ref LL_RTC_TAMPER_ITAMP3
- * @arg @ref LL_RTC_TAMPER_ITAMP4
- * @arg @ref LL_RTC_TAMPER_ITAMP5
- * @arg @ref LL_RTC_TAMPER_ITAMP6
- @if RTC_TAMP_INT_7_SUPPORT
- * @arg @ref LL_RTC_TAMPER_ITAMP7
- @endif
- *
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_TAMPER_ITAMP_Enable(RTC_TypeDef *RTCx, uint32_t InternalTamper)
- {
- UNUSED(RTCx);
- SET_BIT(TAMP->CR1, InternalTamper);
- }
- /**
- * @brief Disable internal tamper detection.
- * @rmtoll TAMP_CR1 ITAMP1E LL_RTC_TAMPER_ITAMP_Disable\n
- * TAMP_CR1 ITAMP3E LL_RTC_TAMPER_ITAMP_Disable\n
- * TAMP_CR1 ITAMP4E LL_RTC_TAMPER_ITAMP_Disable\n
- * TAMP_CR1 ITAMP5E LL_RTC_TAMPER_ITAMP_Disable\n
- * TAMP_CR1 ITAMP6E LL_RTC_TAMPER_ITAMP_Disable\n
- * TAMP_CR1 ITAMP7E... LL_RTC_TAMPER_ITAMP_Disable
- * @param RTCx RTC Instance
- * @param InternalTamper This parameter can be a combination of the following values:
- * @arg @ref LL_RTC_TAMPER_ITAMP1
- * @arg @ref LL_RTC_TAMPER_ITAMP3
- * @arg @ref LL_RTC_TAMPER_ITAMP4
- * @arg @ref LL_RTC_TAMPER_ITAMP5
- * @arg @ref LL_RTC_TAMPER_ITAMP6
- @if RTC_TAMP_INT_7_SUPPORT
- * @arg @ref LL_RTC_TAMPER_ITAMP7
- @endif
- *
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_TAMPER_ITAMP_Disable(RTC_TypeDef *RTCx, uint32_t InternalTamper)
- {
- UNUSED(RTCx);
- CLEAR_BIT(TAMP->CR1, InternalTamper);
- }
- /**
- * @}
- */
- /** @defgroup RTC_LL_EF_Wakeup Wakeup
- * @{
- */
- /**
- * @brief Enable Wakeup timer
- * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
- * @rmtoll RTC_CR WUTE LL_RTC_WAKEUP_Enable
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_WAKEUP_Enable(RTC_TypeDef *RTCx)
- {
- SET_BIT(RTCx->CR, RTC_CR_WUTE);
- }
- /**
- * @brief Disable Wakeup timer
- * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
- * @rmtoll RTC_CR WUTE LL_RTC_WAKEUP_Disable
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_WAKEUP_Disable(RTC_TypeDef *RTCx)
- {
- CLEAR_BIT(RTCx->CR, RTC_CR_WUTE);
- }
- /**
- * @brief Check if Wakeup timer is enabled or not
- * @rmtoll RTC_CR WUTE LL_RTC_WAKEUP_IsEnabled
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_WAKEUP_IsEnabled(RTC_TypeDef *RTCx)
- {
- return ((READ_BIT(RTCx->CR, RTC_CR_WUTE) == (RTC_CR_WUTE)) ? 1U : 0U);
- }
- /**
- * @brief Select Wakeup clock
- * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
- * @note Bit can be written only when RTC_CR WUTE bit = 0 and RTC_ICSR WUTWF bit = 1
- * @rmtoll RTC_CR WUCKSEL LL_RTC_WAKEUP_SetClock
- * @param RTCx RTC Instance
- * @param WakeupClock This parameter can be one of the following values:
- * @arg @ref LL_RTC_WAKEUPCLOCK_DIV_16
- * @arg @ref LL_RTC_WAKEUPCLOCK_DIV_8
- * @arg @ref LL_RTC_WAKEUPCLOCK_DIV_4
- * @arg @ref LL_RTC_WAKEUPCLOCK_DIV_2
- * @arg @ref LL_RTC_WAKEUPCLOCK_CKSPRE
- * @arg @ref LL_RTC_WAKEUPCLOCK_CKSPRE_WUT
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_WAKEUP_SetClock(RTC_TypeDef *RTCx, uint32_t WakeupClock)
- {
- MODIFY_REG(RTCx->CR, RTC_CR_WUCKSEL, WakeupClock);
- }
- /**
- * @brief Get Wakeup clock
- * @rmtoll RTC_CR WUCKSEL LL_RTC_WAKEUP_GetClock
- * @param RTCx RTC Instance
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_RTC_WAKEUPCLOCK_DIV_16
- * @arg @ref LL_RTC_WAKEUPCLOCK_DIV_8
- * @arg @ref LL_RTC_WAKEUPCLOCK_DIV_4
- * @arg @ref LL_RTC_WAKEUPCLOCK_DIV_2
- * @arg @ref LL_RTC_WAKEUPCLOCK_CKSPRE
- * @arg @ref LL_RTC_WAKEUPCLOCK_CKSPRE_WUT
- */
- __STATIC_INLINE uint32_t LL_RTC_WAKEUP_GetClock(RTC_TypeDef *RTCx)
- {
- return (uint32_t)(READ_BIT(RTCx->CR, RTC_CR_WUCKSEL));
- }
- /**
- * @brief Set Wakeup auto-reload value
- * @note Bit can be written only when WUTWF is set to 1 in RTC_ICSR
- * @rmtoll RTC_WUTR WUT LL_RTC_WAKEUP_SetAutoReload
- * @param RTCx RTC Instance
- * @param Value Value between Min_Data=0x00 and Max_Data=0xFFFF
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_WAKEUP_SetAutoReload(RTC_TypeDef *RTCx, uint32_t Value)
- {
- MODIFY_REG(RTCx->WUTR, RTC_WUTR_WUT, Value);
- }
- /**
- * @brief Get Wakeup auto-reload value
- * @rmtoll RTC_WUTR WUT LL_RTC_WAKEUP_GetAutoReload
- * @param RTCx RTC Instance
- * @retval Value between Min_Data=0x00 and Max_Data=0xFFFF
- */
- __STATIC_INLINE uint32_t LL_RTC_WAKEUP_GetAutoReload(RTC_TypeDef *RTCx)
- {
- return (uint32_t)(READ_BIT(RTCx->WUTR, RTC_WUTR_WUT));
- }
- /**
- * @}
- */
- /** @defgroup RTC_LL_EF_Backup_Registers Backup_Registers
- * @{
- */
- /**
- * @brief Writes a data in a specified Backup data register.
- * @rmtoll TAMP_BKPxR BKP LL_RTC_BKP_SetRegister
- * @param RTCx RTC Instance
- * @param BackupRegister This parameter can be one of the following values:
- * @arg @ref LL_RTC_BKP_DR0
- * @arg @ref LL_RTC_BKP_DR1
- * @arg @ref LL_RTC_BKP_DR2
- * @arg @ref LL_RTC_BKP_DR3
- * ...
- * @param Data Value between Min_Data=0x00 and Max_Data=0xFFFFFFFF
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_BKP_SetRegister(RTC_TypeDef *RTCx, uint32_t BackupRegister, uint32_t Data)
- {
- __IO uint32_t *tmp;
- UNUSED(RTCx);
- tmp = &(TAMP->BKP0R) + BackupRegister;
- /* Write the specified register */
- *tmp = Data;
- }
- /**
- * @brief Reads data from the specified RTC Backup data Register.
- * @rmtoll TAMP_BKPxR BKP LL_RTC_BKP_GetRegister
- * @param RTCx RTC Instance
- * @param BackupRegister This parameter can be one of the following values:
- * @arg @ref LL_RTC_BKP_DR0
- * @arg @ref LL_RTC_BKP_DR1
- * @arg @ref LL_RTC_BKP_DR2
- * @arg @ref LL_RTC_BKP_DR3
- * ...
- * @retval Value between Min_Data=0x00 and Max_Data=0xFFFFFFFF
- */
- __STATIC_INLINE uint32_t LL_RTC_BKP_GetRegister(RTC_TypeDef *RTCx, uint32_t BackupRegister)
- {
- const __IO uint32_t *tmp;
- UNUSED(RTCx);
- tmp = &(TAMP->BKP0R) + BackupRegister;
- /* Read the specified register */
- return *tmp;
- }
- /**
- * @}
- */
- /** @defgroup RTC_LL_EF_Calibration Calibration
- * @{
- */
- /**
- * @brief Set Calibration output frequency (1 Hz or 512 Hz)
- * @note Bits are write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
- * @rmtoll RTC_CR COE LL_RTC_CAL_SetOutputFreq\n
- * RTC_CR COSEL LL_RTC_CAL_SetOutputFreq
- * @param RTCx RTC Instance
- * @param Frequency This parameter can be one of the following values:
- * @arg @ref LL_RTC_CALIB_OUTPUT_NONE
- * @arg @ref LL_RTC_CALIB_OUTPUT_1HZ
- * @arg @ref LL_RTC_CALIB_OUTPUT_512HZ
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_CAL_SetOutputFreq(RTC_TypeDef *RTCx, uint32_t Frequency)
- {
- MODIFY_REG(RTCx->CR, RTC_CR_COE | RTC_CR_COSEL, Frequency);
- }
- /**
- * @brief Get Calibration output frequency (1 Hz or 512 Hz)
- * @rmtoll RTC_CR COE LL_RTC_CAL_GetOutputFreq\n
- * RTC_CR COSEL LL_RTC_CAL_GetOutputFreq
- * @param RTCx RTC Instance
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_RTC_CALIB_OUTPUT_NONE
- * @arg @ref LL_RTC_CALIB_OUTPUT_1HZ
- * @arg @ref LL_RTC_CALIB_OUTPUT_512HZ
- */
- __STATIC_INLINE uint32_t LL_RTC_CAL_GetOutputFreq(RTC_TypeDef *RTCx)
- {
- return (uint32_t)(READ_BIT(RTCx->CR, RTC_CR_COE | RTC_CR_COSEL));
- }
- /**
- * @brief Insert or not One RTCCLK pulse every 2exp11 pulses (frequency increased by 488.5 ppm)
- * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
- * @note Bit can be written only when RECALPF is set to 0 in RTC_ICSR
- * @rmtoll RTC_CALR CALP LL_RTC_CAL_SetPulse
- * @param RTCx RTC Instance
- * @param Pulse This parameter can be one of the following values:
- * @arg @ref LL_RTC_CALIB_INSERTPULSE_NONE
- * @arg @ref LL_RTC_CALIB_INSERTPULSE_SET
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_CAL_SetPulse(RTC_TypeDef *RTCx, uint32_t Pulse)
- {
- MODIFY_REG(RTCx->CALR, RTC_CALR_CALP, Pulse);
- }
- /**
- * @brief Check if one RTCCLK has been inserted or not every 2exp11 pulses (frequency increased by 488.5 ppm)
- * @rmtoll RTC_CALR CALP LL_RTC_CAL_IsPulseInserted
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_CAL_IsPulseInserted(RTC_TypeDef *RTCx)
- {
- return ((READ_BIT(RTCx->CALR, RTC_CALR_CALP) == (RTC_CALR_CALP)) ? 1U : 0U);
- }
- /**
- * @brief Set the calibration cycle period
- * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
- * @note Bit can be written only when RECALPF is set to 0 in RTC_ICSR
- * @rmtoll RTC_CALR CALW8 LL_RTC_CAL_SetPeriod\n
- * RTC_CALR CALW16 LL_RTC_CAL_SetPeriod
- * @param RTCx RTC Instance
- * @param Period This parameter can be one of the following values:
- * @arg @ref LL_RTC_CALIB_PERIOD_32SEC
- * @arg @ref LL_RTC_CALIB_PERIOD_16SEC
- * @arg @ref LL_RTC_CALIB_PERIOD_8SEC
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_CAL_SetPeriod(RTC_TypeDef *RTCx, uint32_t Period)
- {
- MODIFY_REG(RTCx->CALR, RTC_CALR_CALW8 | RTC_CALR_CALW16, Period);
- }
- /**
- * @brief Get the calibration cycle period
- * @rmtoll RTC_CALR CALW8 LL_RTC_CAL_GetPeriod\n
- * RTC_CALR CALW16 LL_RTC_CAL_GetPeriod
- * @param RTCx RTC Instance
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_RTC_CALIB_PERIOD_32SEC
- * @arg @ref LL_RTC_CALIB_PERIOD_16SEC
- * @arg @ref LL_RTC_CALIB_PERIOD_8SEC
- */
- __STATIC_INLINE uint32_t LL_RTC_CAL_GetPeriod(RTC_TypeDef *RTCx)
- {
- return (uint32_t)(READ_BIT(RTCx->CALR, RTC_CALR_CALW8 | RTC_CALR_CALW16));
- }
- /**
- * @brief Set Calibration minus
- * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
- * @note Bit can be written only when RECALPF is set to 0 in RTC_ICSR
- * @rmtoll RTC_CALR CALM LL_RTC_CAL_SetMinus
- * @param RTCx RTC Instance
- * @param CalibMinus Value between Min_Data=0x00 and Max_Data=0x1FF
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_CAL_SetMinus(RTC_TypeDef *RTCx, uint32_t CalibMinus)
- {
- MODIFY_REG(RTCx->CALR, RTC_CALR_CALM, CalibMinus);
- }
- /**
- * @brief Get Calibration minus
- * @rmtoll RTC_CALR CALM LL_RTC_CAL_GetMinus
- * @param RTCx RTC Instance
- * @retval Value between Min_Data=0x00 and Max_Data= 0x1FF
- */
- __STATIC_INLINE uint32_t LL_RTC_CAL_GetMinus(RTC_TypeDef *RTCx)
- {
- return (uint32_t)(READ_BIT(RTCx->CALR, RTC_CALR_CALM));
- }
- /**
- * @}
- */
- /** @defgroup RTC_LL_EF_FLAG_Management FLAG_Management
- * @{
- */
- /**
- * @brief Get Internal Time-stamp flag
- * @rmtoll RTC_SR ITSF LL_RTC_IsActiveFlag_ITS
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_ITS(RTC_TypeDef *RTCx)
- {
- return ((READ_BIT(RTCx->SR, RTC_SR_ITSF) == (RTC_SR_ITSF)) ? 1U : 0U);
- }
- /**
- * @brief Get Recalibration pending Flag
- * @rmtoll RTC_ICSR RECALPF LL_RTC_IsActiveFlag_RECALP
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_RECALP(RTC_TypeDef *RTCx)
- {
- return ((READ_BIT(RTCx->ICSR, RTC_ICSR_RECALPF) == (RTC_ICSR_RECALPF)) ? 1U : 0U);
- }
- /**
- * @brief Get Time-stamp overflow flag
- * @rmtoll RTC_SR TSOVF LL_RTC_IsActiveFlag_TSOV
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_TSOV(RTC_TypeDef *RTCx)
- {
- return ((READ_BIT(RTCx->SR, RTC_SR_TSOVF) == (RTC_SR_TSOVF)) ? 1U : 0U);
- }
- /**
- * @brief Get Time-stamp flag
- * @rmtoll RTC_SR TSF LL_RTC_IsActiveFlag_TS
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_TS(RTC_TypeDef *RTCx)
- {
- return ((READ_BIT(RTCx->SR, RTC_SR_TSF) == (RTC_SR_TSF)) ? 1U : 0U);
- }
- /**
- * @brief Get Wakeup timer flag
- * @rmtoll RTC_SR WUTF LL_RTC_IsActiveFlag_WUT
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_WUT(RTC_TypeDef *RTCx)
- {
- return ((READ_BIT(RTCx->SR, RTC_SR_WUTF) == (RTC_SR_WUTF)) ? 1U : 0U);
- }
- /**
- * @brief Get Alarm B flag
- * @rmtoll RTC_SR ALRBF LL_RTC_IsActiveFlag_ALRB
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_ALRB(RTC_TypeDef *RTCx)
- {
- return ((READ_BIT(RTCx->SR, RTC_SR_ALRBF) == (RTC_SR_ALRBF)) ? 1U : 0U);
- }
- /**
- * @brief Get Alarm A flag
- * @rmtoll RTC_SR ALRAF LL_RTC_IsActiveFlag_ALRA
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_ALRA(RTC_TypeDef *RTCx)
- {
- return ((READ_BIT(RTCx->SR, RTC_SR_ALRAF) == (RTC_SR_ALRAF)) ? 1U : 0U);
- }
- /**
- * @brief Clear Internal Time-stamp flag
- * @rmtoll RTC_SCR CITSF LL_RTC_ClearFlag_ITS
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_ClearFlag_ITS(RTC_TypeDef *RTCx)
- {
- SET_BIT(RTCx->SCR, RTC_SCR_CITSF);
- }
- /**
- * @brief Clear Time-stamp overflow flag
- * @rmtoll RTC_SCR CTSOVF LL_RTC_ClearFlag_TSOV
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_ClearFlag_TSOV(RTC_TypeDef *RTCx)
- {
- SET_BIT(RTCx->SCR, RTC_SCR_CTSOVF);
- }
- /**
- * @brief Clear Time-stamp flag
- * @rmtoll RTC_SCR CTSF LL_RTC_ClearFlag_TS
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_ClearFlag_TS(RTC_TypeDef *RTCx)
- {
- SET_BIT(RTCx->SCR, RTC_SCR_CTSF);
- }
- /**
- * @brief Clear Wakeup timer flag
- * @rmtoll RTC_SCR CWUTF LL_RTC_ClearFlag_WUT
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_ClearFlag_WUT(RTC_TypeDef *RTCx)
- {
- SET_BIT(RTCx->SCR, RTC_SCR_CWUTF);
- }
- /**
- * @brief Clear Alarm B flag
- * @rmtoll RTC_SCR CALRBF LL_RTC_ClearFlag_ALRB
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_ClearFlag_ALRB(RTC_TypeDef *RTCx)
- {
- SET_BIT(RTCx->SCR, RTC_SCR_CALRBF);
- }
- /**
- * @brief Clear Alarm A flag
- * @rmtoll RTC_SCR CALRAF LL_RTC_ClearFlag_ALRA
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_ClearFlag_ALRA(RTC_TypeDef *RTCx)
- {
- SET_BIT(RTCx->SCR, RTC_SCR_CALRAF);
- }
- /**
- * @brief Get Initialization flag
- * @rmtoll RTC_ICSR INITF LL_RTC_IsActiveFlag_INIT
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_INIT(RTC_TypeDef *RTCx)
- {
- return ((READ_BIT(RTCx->ICSR, RTC_ICSR_INITF) == (RTC_ICSR_INITF)) ? 1U : 0U);
- }
- /**
- * @brief Get Registers synchronization flag
- * @rmtoll RTC_ICSR RSF LL_RTC_IsActiveFlag_RS
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_RS(RTC_TypeDef *RTCx)
- {
- return ((READ_BIT(RTCx->ICSR, RTC_ICSR_RSF) == (RTC_ICSR_RSF)) ? 1U : 0U);
- }
- /**
- * @brief Clear Registers synchronization flag
- * @rmtoll RTC_ICSR RSF LL_RTC_ClearFlag_RS
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_ClearFlag_RS(RTC_TypeDef *RTCx)
- {
- WRITE_REG(RTCx->ICSR, (~((RTC_ICSR_RSF | RTC_ICSR_INIT) & 0x000000FFU) | (RTCx->ICSR & RTC_ICSR_INIT)));
- }
- /**
- * @brief Get Initialization status flag
- * @rmtoll RTC_ICSR INITS LL_RTC_IsActiveFlag_INITS
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_INITS(RTC_TypeDef *RTCx)
- {
- return ((READ_BIT(RTCx->ICSR, RTC_ICSR_INITS) == (RTC_ICSR_INITS)) ? 1U : 0U);
- }
- /**
- * @brief Get Shift operation pending flag
- * @rmtoll RTC_ICSR SHPF LL_RTC_IsActiveFlag_SHP
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_SHP(RTC_TypeDef *RTCx)
- {
- return ((READ_BIT(RTCx->ICSR, RTC_ICSR_SHPF) == (RTC_ICSR_SHPF)) ? 1U : 0U);
- }
- /**
- * @brief Get Wakeup timer write flag
- * @rmtoll RTC_ICSR WUTWF LL_RTC_IsActiveFlag_WUTW
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_WUTW(RTC_TypeDef *RTCx)
- {
- return ((READ_BIT(RTCx->ICSR, RTC_ICSR_WUTWF) == (RTC_ICSR_WUTWF)) ? 1U : 0U);
- }
- /**
- * @brief Get Alarm B write flag
- * @rmtoll RTC_ICSR ALRBWF LL_RTC_IsActiveFlag_ALRBW
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_ALRBW(RTC_TypeDef *RTCx)
- {
- return ((READ_BIT(RTCx->ICSR, RTC_ICSR_ALRBWF) == (RTC_ICSR_ALRBWF)) ? 1U : 0U);
- }
- /**
- * @brief Get Alarm A write flag
- * @rmtoll RTC_ICSR ALRAWF LL_RTC_IsActiveFlag_ALRAW
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_ALRAW(RTC_TypeDef *RTCx)
- {
- return ((READ_BIT(RTCx->ICSR, RTC_ICSR_ALRAWF) == (RTC_ICSR_ALRAWF)) ? 1U : 0U);
- }
- /**
- * @brief Get Alarm A masked flag.
- * @rmtoll RTC_MISR ALRAMF LL_RTC_IsActiveFlag_ALRAM
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_ALRAM(RTC_TypeDef *RTCx)
- {
- return ((READ_BIT(RTCx->MISR, RTC_MISR_ALRAMF) == (RTC_MISR_ALRAMF)) ? 1U : 0U);
- }
- /**
- * @brief Get Alarm B masked flag.
- * @rmtoll RTC_MISR ALRBMF LL_RTC_IsActiveFlag_ALRBM
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_ALRBM(RTC_TypeDef *RTCx)
- {
- return ((READ_BIT(RTCx->MISR, RTC_MISR_ALRBMF) == (RTC_MISR_ALRBMF)) ? 1U : 0U);
- }
- /**
- * @brief Get Wakeup timer masked flag.
- * @rmtoll RTC_MISR WUTMF LL_RTC_IsActiveFlag_WUTM
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_WUTM(RTC_TypeDef *RTCx)
- {
- return ((READ_BIT(RTCx->MISR, RTC_MISR_WUTMF) == (RTC_MISR_WUTMF)) ? 1U : 0U);
- }
- /**
- * @brief Get Time-stamp masked flag.
- * @rmtoll RTC_MISR TSMF LL_RTC_IsActiveFlag_TSM
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_TSM(RTC_TypeDef *RTCx)
- {
- return ((READ_BIT(RTCx->MISR, RTC_MISR_TSMF) == (RTC_MISR_TSMF)) ? 1U : 0U);
- }
- /**
- * @brief Get Time-stamp overflow masked flag.
- * @rmtoll RTC_MISR TSOVMF LL_RTC_IsActiveFlag_TSOVM
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_TSOVM(RTC_TypeDef *RTCx)
- {
- return ((READ_BIT(RTCx->MISR, RTC_MISR_TSOVMF) == (RTC_MISR_TSOVMF)) ? 1U : 0U);
- }
- /**
- * @brief Get Internal Time-stamp masked flag.
- * @rmtoll RTC_MISR ITSMF LL_RTC_IsActiveFlag_ITSM
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_ITSM(RTC_TypeDef *RTCx)
- {
- return ((READ_BIT(RTCx->MISR, RTC_MISR_ITSMF) == (RTC_MISR_ITSMF)) ? 1U : 0U);
- }
- /**
- * @brief Get tamper 1 detection flag.
- * @rmtoll TAMP_SR TAMP1F LL_RTC_IsActiveFlag_TAMP1
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_TAMP1(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- return ((READ_BIT(TAMP->SR, TAMP_SR_TAMP1F) == (TAMP_SR_TAMP1F)) ? 1U : 0U);
- }
- /**
- * @brief Get tamper 2 detection flag.
- * @rmtoll TAMP_SR TAMP2F LL_RTC_IsActiveFlag_TAMP2
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_TAMP2(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- return ((READ_BIT(TAMP->SR, TAMP_SR_TAMP2F) == (TAMP_SR_TAMP2F)) ? 1U : 0U);
- }
- #if (RTC_TAMP_NB==3)
- /**
- * @brief Get tamper 3 detection flag.
- * @rmtoll TAMP_SR TAMP3F LL_RTC_IsActiveFlag_TAMP3
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_TAMP3(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- return ((READ_BIT(TAMP->SR, TAMP_SR_TAMP3F) == (TAMP_SR_TAMP3F)) ? 1U : 0U);
- }
- #elif (RTC_TAMP_NB==8)
- /**
- * @brief Get tamper 3 detection flag.
- * @rmtoll TAMP_SR TAMP3F LL_RTC_IsActiveFlag_TAMP3
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_TAMP3(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- return ((READ_BIT(TAMP->SR, TAMP_SR_TAMP3F) == (TAMP_SR_TAMP3F)) ? 1U : 0U);
- }
- /**
- * @brief Get tamper 4 detection flag.
- * @rmtoll TAMP_SR TAMP4F LL_RTC_IsActiveFlag_TAMP4
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_TAMP4(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- return ((READ_BIT(TAMP->SR, TAMP_SR_TAMP4F) == (TAMP_SR_TAMP4F)) ? 1U : 0U);
- }
- /**
- * @brief Get tamper 5 detection flag.
- * @rmtoll TAMP_SR TAMP5F LL_RTC_IsActiveFlag_TAMP5
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_TAMP5(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- return ((READ_BIT(TAMP->SR, TAMP_SR_TAMP5F) == (TAMP_SR_TAMP5F)) ? 1U : 0U);
- }
- /**
- * @brief Get tamper 6 detection flag.
- * @rmtoll TAMP_SR TAMP6F LL_RTC_IsActiveFlag_TAMP6
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_TAMP6(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- return ((READ_BIT(TAMP->SR, TAMP_SR_TAMP6F) == (TAMP_SR_TAMP6F)) ? 1U : 0U);
- }
- /**
- * @brief Get tamper 7 detection flag.
- * @rmtoll TAMP_SR TAMP7F LL_RTC_IsActiveFlag_TAMP7
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_TAMP7(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- return ((READ_BIT(TAMP->SR, TAMP_SR_TAMP7F) == (TAMP_SR_TAMP7F)) ? 1U : 0U);
- }
- /**
- * @brief Get tamper 8 detection flag.
- * @rmtoll TAMP_SR TAMP8F LL_RTC_IsActiveFlag_TAMP8
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_TAMP8(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- return ((READ_BIT(TAMP->SR, TAMP_SR_TAMP8F) == (TAMP_SR_TAMP8F)) ? 1U : 0U);
- }
- #endif /* RTC_TAMP_NB */
- #if defined (RTC_TAMP_INT_1_SUPPORT)
- /**
- * @brief Get internal tamper 1 detection flag.
- * @rmtoll TAMP_SR ITAMP1F LL_RTC_IsActiveFlag_ITAMP1
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_ITAMP1(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- return ((READ_BIT(TAMP->SR, TAMP_SR_ITAMP1F) == (TAMP_SR_ITAMP1F)) ? 1U : 0U);
- }
- #endif /* RTC_TAMP_INT_1_SUPPORT */
- #if defined (RTC_TAMP_INT_2_SUPPORT)
- /**
- * @brief Get internal tamper 2 detection flag.
- * @rmtoll TAMP_SR ITAMP2F LL_RTC_IsActiveFlag_ITAMP2
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_ITAMP2(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- return ((READ_BIT(TAMP->SR, TAMP_SR_ITAMP2F) == (TAMP_SR_ITAMP2F)) ? 1U : 0U);
- }
- #endif /* RTC_TAMP_INT_2_SUPPORT */
- /**
- * @brief Get internal tamper 3 detection flag.
- * @rmtoll TAMP_SR ITAMP3F LL_RTC_IsActiveFlag_ITAMP3
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_ITAMP3(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- return ((READ_BIT(TAMP->SR, TAMP_SR_ITAMP3F) == (TAMP_SR_ITAMP3F)) ? 1U : 0U);
- }
- /**
- * @brief Get internal tamper 4 detection flag.
- * @rmtoll TAMP_SR ITAMP4F LL_RTC_IsActiveFlag_ITAMP4
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_ITAMP4(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- return ((READ_BIT(TAMP->SR, TAMP_SR_ITAMP4F) == (TAMP_SR_ITAMP4F)) ? 1U : 0U);
- }
- /**
- * @brief Get internal tamper 5 detection flag.
- * @rmtoll TAMP_SR ITAMP5F LL_RTC_IsActiveFlag_ITAMP5
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_ITAMP5(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- return ((READ_BIT(TAMP->SR, TAMP_SR_ITAMP5F) == (TAMP_SR_ITAMP5F)) ? 1U : 0U);
- }
- #if defined (RTC_TAMP_INT_6_SUPPORT)
- /**
- * @brief Get internal tamper 6 detection flag.
- * @rmtoll TAMP_SR ITAMP6F LL_RTC_IsActiveFlag_ITAMP6
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_ITAMP6(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- return ((READ_BIT(TAMP->SR, TAMP_SR_ITAMP6F) == (TAMP_SR_ITAMP6F)) ? 1U : 0U);
- }
- #endif /* RTC_TAMP_INT_6_SUPPORT */
- #if defined (RTC_TAMP_INT_7_SUPPORT)
- /**
- * @brief Get internal tamper 7 detection flag.
- * @rmtoll TAMP_SR ITAMP7F LL_RTC_IsActiveFlag_ITAMP7
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_ITAMP7(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- return ((READ_BIT(TAMP->SR, TAMP_SR_ITAMP7F) == (TAMP_SR_ITAMP7F)) ? 1U : 0U);
- }
- #endif /* RTC_TAMP_INT_7_SUPPORT */
- #if defined (RTC_TAMP_INT_8_SUPPORT)
- /**
- * @brief Get internal tamper 8 detection flag.
- * @rmtoll TAMP_SR ITAMP8F LL_RTC_IsActiveFlag_ITAMP8
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_ITAMP8(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- return ((READ_BIT(TAMP->SR, TAMP_SR_ITAMP8F) == (TAMP_SR_ITAMP8F)) ? 1U : 0U);
- }
- #endif /* RTC_TAMP_INT_8_SUPPORT */
- #if 0
- /**
- * @brief Get internal tamper 9 detection flag.
- * @rmtoll TAMP_SR ITAMP9F LL_RTC_IsActiveFlag_ITAMP9
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_ITAMP9(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- return ((READ_BIT(TAMP->SR, TAMP_SR_ITAMP9F) == (TAMP_SR_ITAMP9F)) ? 1U : 0U);
- }
- /**
- * @brief Get internal tamper 10 detection flag.
- * @rmtoll TAMP_SR ITAMP10F LL_RTC_IsActiveFlag_ITAMP10
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_ITAMP10(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- return ((READ_BIT(TAMP->SR, TAMP_SR_ITAMP10F) == (TAMP_SR_ITAMP10F)) ? 1U : 0U);
- }
- /**
- * @brief Get internal tamper 11 detection flag.
- * @rmtoll TAMP_SR ITAMP11F LL_RTC_IsActiveFlag_ITAMP11
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_ITAMP11(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- return ((READ_BIT(TAMP->SR, TAMP_SR_ITAMP11F) == (TAMP_SR_ITAMP11F)) ? 1U : 0U);
- }
- /**
- * @brief Get internal tamper 12 detection flag.
- * @rmtoll TAMP_SR ITAMP7F LL_RTC_IsActiveFlag_ITAMP12
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_ITAMP12(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- return ((READ_BIT(TAMP->SR, TAMP_SR_ITAMP12F) == (TAMP_SR_ITAMP12F)) ? 1U : 0U);
- }
- /**
- * @brief Get internal tamper 13 detection flag.
- * @rmtoll TAMP_SR ITAMP13F LL_RTC_IsActiveFlag_ITAMP13
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_ITAMP13(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- return ((READ_BIT(TAMP->SR, TAMP_SR_ITAMP13F) == (TAMP_SR_ITAMP13F)) ? 1U : 0U);
- }
- /**
- * @brief Get internal tamper 14 detection flag.
- * @rmtoll TAMP_SR ITAMP14F LL_RTC_IsActiveFlag_ITAMP14
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_ITAMP14(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- return ((READ_BIT(TAMP->SR, TAMP_SR_ITAMP14F) == (TAMP_SR_ITAMP14F)) ? 1U : 0U);
- }
- /**
- * @brief Get internal tamper 15 detection flag.
- * @rmtoll TAMP_SR ITAMP15F LL_RTC_IsActiveFlag_ITAMP15
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_ITAMP15(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- return ((READ_BIT(TAMP->SR, TAMP_SR_ITAMP15F) == (TAMP_SR_ITAMP15F)) ? 1U : 0U);
- }
- /**
- * @brief Get internal tamper 16 detection flag.
- * @rmtoll TAMP_SR ITAMP7F LL_RTC_IsActiveFlag_ITAMP16
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_ITAMP16(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- return ((READ_BIT(TAMP->SR, TAMP_SR_ITAMP16F) == (TAMP_SR_ITAMP16F)) ? 1U : 0U);
- }
- #endif /* 0 */
- /**
- * @brief Get tamper 1 interrupt masked flag.
- * @rmtoll TAMP_MISR TAMP1MF LL_RTC_IsActiveFlag_TAMP1M
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_TAMP1M(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- return ((READ_BIT(TAMP->MISR, TAMP_MISR_TAMP1MF) == (TAMP_MISR_TAMP1MF)) ? 1U : 0U);
- }
- /**
- * @brief Get tamper 2 interrupt masked flag.
- * @rmtoll TAMP_MISR TAMP2MF LL_RTC_IsActiveFlag_TAMP2M
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_TAMP2M(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- return ((READ_BIT(TAMP->MISR, TAMP_MISR_TAMP2MF) == (TAMP_MISR_TAMP2MF)) ? 1U : 0U);
- }
- #if (RTC_TAMP_NB ==3)
- /**
- * @brief Get tamper 3 interrupt masked flag.
- * @rmtoll TAMP_MISR TAMP3MF LL_RTC_IsActiveFlag_TAMP3M
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_TAMP3M(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- return ((READ_BIT(TAMP->MISR, TAMP_MISR_TAMP3MF) == (TAMP_MISR_TAMP3MF)) ? 1U : 0U);
- }
- #elif (RTC_TAMP_NB==8)
- /**
- * @brief Get tamper 3 interrupt masked flag.
- * @rmtoll TAMP_MISR TAMP3MF LL_RTC_IsActiveFlag_TAMP3M
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_TAMP3M(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- return ((READ_BIT(TAMP->MISR, TAMP_MISR_TAMP3MF) == (TAMP_MISR_TAMP3MF)) ? 1U : 0U);
- }
- /**
- * @brief Get tamper 4 interrupt masked flag.
- * @rmtoll TAMP_MISR TAMP4MF LL_RTC_IsActiveFlag_TAMP4M
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_TAMP4M(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- return ((READ_BIT(TAMP->MISR, TAMP_MISR_TAMP4MF) == (TAMP_MISR_TAMP4MF)) ? 1U : 0U);
- }
- /**
- * @brief Get tamper 5 interrupt masked flag.
- * @rmtoll TAMP_MISR TAMP5MF LL_RTC_IsActiveFlag_TAMP5M
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_TAMP5M(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- return ((READ_BIT(TAMP->MISR, TAMP_MISR_TAMP5MF) == (TAMP_MISR_TAMP5MF)) ? 1U : 0U);
- }
- /**
- * @brief Get tamper 6 interrupt masked flag.
- * @rmtoll TAMP_MISR TAMP3MF LL_RTC_IsActiveFlag_TAMP6M
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_TAMP6M(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- return ((READ_BIT(TAMP->MISR, TAMP_MISR_TAMP6MF) == (TAMP_MISR_TAMP6MF)) ? 1U : 0U);
- }
- /**
- * @brief Get tamper 7 interrupt masked flag.
- * @rmtoll TAMP_MISR TAMP7MF LL_RTC_IsActiveFlag_TAMP7M
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_TAMP7M(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- return ((READ_BIT(TAMP->MISR, TAMP_MISR_TAMP7MF) == (TAMP_MISR_TAMP7MF)) ? 1U : 0U);
- }
- /**
- * @brief Get tamper 8 interrupt masked flag.
- * @rmtoll TAMP_MISR TAMP8MF LL_RTC_IsActiveFlag_TAMP8M
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_TAMP8M(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- return ((READ_BIT(TAMP->MISR, TAMP_MISR_TAMP8MF) == (TAMP_MISR_TAMP8MF)) ? 1U : 0U);
- }
- #endif /* RTC_TAMP_NB */
- #if defined (RTC_TAMP_INT_1_SUPPORT)
- /**
- * @brief Get internal tamper 1 interrupt masked flag.
- * @rmtoll TAMP_MISR ITAMP1MF LL_RTC_IsActiveFlag_ITAMP1M
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_ITAMP1M(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- return ((READ_BIT(TAMP->MISR, TAMP_MISR_ITAMP1MF) == (TAMP_MISR_ITAMP1MF)) ? 1U : 0U);
- }
- #endif /* RTC_TAMP_INT_1_SUPPORT */
- #if defined (RTC_TAMP_INT_2_SUPPORT)
- /**
- * @brief Get internal tamper 2 interrupt masked flag.
- * @rmtoll TAMP_MISR ITAMP2MF LL_RTC_IsActiveFlag_ITAMP2M
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_ITAMP2M(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- return ((READ_BIT(TAMP->MISR, TAMP_MISR_ITAMP2MF) == (TAMP_MISR_ITAMP2MF)) ? 1U : 0U);
- }
- #endif /* RTC_TAMP_INT_2_SUPPORT */
- /**
- * @brief Get internal tamper 3 interrupt masked flag.
- * @rmtoll TAMP_MISR ITAMP3MF LL_RTC_IsActiveFlag_ITAMP3M
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_ITAMP3M(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- return ((READ_BIT(TAMP->MISR, TAMP_MISR_ITAMP3MF) == (TAMP_MISR_ITAMP3MF)) ? 1U : 0U);
- }
- /**
- * @brief Get internal tamper 4 interrupt masked flag.
- * @rmtoll TAMP_MISR ITAMP4MF LL_RTC_IsActiveFlag_ITAMP4M
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_ITAMP4M(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- return ((READ_BIT(TAMP->MISR, TAMP_MISR_ITAMP4MF) == (TAMP_MISR_ITAMP4MF)) ? 1U : 0U);
- }
- /**
- * @brief Get internal tamper 5 interrupt masked flag.
- * @rmtoll TAMP_MISR ITAMP5MF LL_RTC_IsActiveFlag_ITAMP5M
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_ITAMP5M(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- return ((READ_BIT(TAMP->MISR, TAMP_MISR_ITAMP5MF) == (TAMP_MISR_ITAMP5MF)) ? 1U : 0U);
- }
- #if defined (RTC_TAMP_INT_6_SUPPORT)
- /**
- * @brief Get internal tamper 6 interrupt masked flag.
- * @rmtoll TAMP_MISR ITAMP6MF LL_RTC_IsActiveFlag_ITAMP6M
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_ITAMP6M(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- return ((READ_BIT(TAMP->MISR, TAMP_MISR_ITAMP6MF) == (TAMP_MISR_ITAMP6MF)) ? 1U : 0U);
- }
- #endif /* RTC_TAMP_INT_6_SUPPORT */
- #if defined (RTC_TAMP_INT_7_SUPPORT)
- /**
- * @brief Get internal tamper 7 interrupt masked flag.
- * @rmtoll TAMP_MISR ITAMP7MF LL_RTC_IsActiveFlag_ITAMP7M
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_ITAMP7M(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- return ((READ_BIT(TAMP->MISR, TAMP_MISR_ITAMP7MF) == (TAMP_MISR_ITAMP7MF)) ? 1U : 0U);
- }
- #endif /* RTC_TAMP_INT_7_SUPPORT */
- #if defined (RTC_TAMP_INT_8_SUPPORT)
- /**
- * @brief Get internal tamper 8 interrupt masked flag.
- * @rmtoll TAMP_MISR ITAMP8MF LL_RTC_IsActiveFlag_ITAMP8M
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_ITAMP8M(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- return ((READ_BIT(TAMP->MISR, TAMP_MISR_ITAMP8MF) == (TAMP_MISR_ITAMP8MF)) ? 1U : 0U);
- }
- #endif /* RTC_TAMP_INT_8_SUPPORT */
- /**
- * @brief Clear tamper 1 detection flag.
- * @rmtoll TAMP_SCR CTAMP1F LL_RTC_ClearFlag_TAMP1
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_ClearFlag_TAMP1(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- SET_BIT(TAMP->SCR, TAMP_SCR_CTAMP1F);
- }
- /**
- * @brief Clear tamper 2 detection flag.
- * @rmtoll TAMP_SCR CTAMP2F LL_RTC_ClearFlag_TAMP2
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_ClearFlag_TAMP2(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- SET_BIT(TAMP->SCR, TAMP_SCR_CTAMP2F);
- }
- #if (RTC_TAMP_NB == 3)
- /**
- * @brief Clear tamper 3 detection flag.
- * @rmtoll TAMP_SCR CTAMP3F LL_RTC_ClearFlag_TAMP3
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_ClearFlag_TAMP3(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- SET_BIT(TAMP->SCR, TAMP_SCR_CTAMP3F);
- }
- #elif (RTC_TAMP_NB == 8)
- /**
- * @brief Clear tamper 3 detection flag.
- * @rmtoll TAMP_SCR CTAMP3F LL_RTC_ClearFlag_TAMP3
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_ClearFlag_TAMP3(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- SET_BIT(TAMP->SCR, TAMP_SCR_CTAMP3F);
- }
- /**
- * @brief Clear tamper 4 detection flag.
- * @rmtoll TAMP_SCR CTAMP3F LL_RTC_ClearFlag_TAMP4
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_ClearFlag_TAMP4(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- SET_BIT(TAMP->SCR, TAMP_SCR_CTAMP4F);
- }
- /**
- * @brief Clear tamper 5 detection flag.
- * @rmtoll TAMP_SCR CTAMP5F LL_RTC_ClearFlag_TAMP5
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_ClearFlag_TAMP5(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- SET_BIT(TAMP->SCR, TAMP_SCR_CTAMP5F);
- }
- /**
- * @brief Clear tamper 6 detection flag.
- * @rmtoll TAMP_SCR CTAMP6F LL_RTC_ClearFlag_TAMP6
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_ClearFlag_TAMP6(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- SET_BIT(TAMP->SCR, TAMP_SCR_CTAMP6F);
- }
- /**
- * @brief Clear tamper 7 detection flag.
- * @rmtoll TAMP_SCR CTAMP7F LL_RTC_ClearFlag_TAMP7
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_ClearFlag_TAMP7(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- SET_BIT(TAMP->SCR, TAMP_SCR_CTAMP7F);
- }
- /**
- * @brief Clear tamper 8 detection flag.
- * @rmtoll TAMP_SCR CTAMP8F LL_RTC_ClearFlag_TAMP8
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_ClearFlag_TAMP8(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- SET_BIT(TAMP->SCR, TAMP_SCR_CTAMP8F);
- }
- #endif /* RTC_TAMP_NB */
- #if defined (RTC_TAMP_INT_1_SUPPORT)
- /**
- * @brief Clear internal tamper 1 detection flag.
- * @rmtoll TAMP_SCR CITAMP1F LL_RTC_ClearFlag_ITAMP1
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_ClearFlag_ITAMP1(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- SET_BIT(TAMP->SCR, TAMP_SCR_CITAMP1F);
- }
- #endif /* RTC_TAMP_INT_1_SUPPORT */
- #if defined (RTC_TAMP_INT_2_SUPPORT)
- /**
- * @brief Clear internal tamper 2 detection flag.
- * @rmtoll TAMP_SCR CITAMP2F LL_RTC_ClearFlag_ITAMP2
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_ClearFlag_ITAMP2(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- SET_BIT(TAMP->SCR, TAMP_SCR_CITAMP2F);
- }
- #endif /* RTC_TAMP_INT_2_SUPPORT */
- /**
- * @brief Clear internal tamper 3 detection flag.
- * @rmtoll TAMP_SCR CITAMP3F LL_RTC_ClearFlag_ITAMP3
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_ClearFlag_ITAMP3(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- SET_BIT(TAMP->SCR, TAMP_SCR_CITAMP3F);
- }
- /**
- * @brief Clear internal tamper 4 detection flag.
- * @rmtoll TAMP_SCR CITAMP4F LL_RTC_ClearFlag_ITAMP4
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_ClearFlag_ITAMP4(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- SET_BIT(TAMP->SCR, TAMP_SCR_CITAMP4F);
- }
- /**
- * @brief Clear internal tamper 5 detection flag.
- * @rmtoll TAMP_SCR CITAMP5F LL_RTC_ClearFlag_ITAMP5
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_ClearFlag_ITAMP5(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- SET_BIT(TAMP->SCR, TAMP_SCR_CITAMP5F);
- }
- #if defined (RTC_TAMP_INT_6_SUPPORT)
- /**
- * @brief Clear internal tamper 6 detection flag.
- * @rmtoll TAMP_SCR CITAMP6F LL_RTC_ClearFlag_ITAMP6
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_ClearFlag_ITAMP6(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- SET_BIT(TAMP->SCR, TAMP_SCR_CITAMP6F);
- }
- #endif /* (RTC_TAMP_INT_2_SUPPORT)*/
- #if defined (RTC_TAMP_INT_7_SUPPORT)
- /**
- * @brief Clear internal tamper 7 detection flag.
- * @rmtoll TAMP_SCR CITAMP7F LL_RTC_ClearFlag_ITAMP7
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_ClearFlag_ITAMP7(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- SET_BIT(TAMP->SCR, TAMP_SCR_CITAMP7F);
- }
- #endif /* (RTC_TAMP_INT_7_SUPPORT) */
- #if defined (RTC_TAMP_INT_8_SUPPORT)
- /**
- * @brief Clear internal tamper 8 detection flag.
- * @rmtoll TAMP_SCR CITAMP8F LL_RTC_ClearFlag_ITAMP8
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_ClearFlag_ITAMP8(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- SET_BIT(TAMP->SCR, TAMP_SCR_CITAMP8F);
- }
- #endif /* (RTC_TAMP_INT_8_SUPPORT) */
- /**
- * @}
- */
- /** @defgroup RTC_LL_EF_IT_Management IT_Management
- * @{
- */
- /**
- * @brief Enable Time-stamp interrupt
- * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
- * @rmtoll RTC_CR LL_RTC_EnableIT_TS
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_EnableIT_TS(RTC_TypeDef *RTCx)
- {
- SET_BIT(RTCx->CR, RTC_CR_TSIE);
- }
- /**
- * @brief Disable Time-stamp interrupt
- * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
- * @rmtoll RTC_CR LL_RTC_DisableIT_TS
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_DisableIT_TS(RTC_TypeDef *RTCx)
- {
- CLEAR_BIT(RTCx->CR, RTC_CR_TSIE);
- }
- /**
- * @brief Enable Wakeup timer interrupt
- * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
- * @rmtoll RTC_CR LL_RTC_EnableIT_WUT
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_EnableIT_WUT(RTC_TypeDef *RTCx)
- {
- SET_BIT(RTCx->CR, RTC_CR_WUTIE);
- }
- /**
- * @brief Disable Wakeup timer interrupt
- * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
- * @rmtoll RTC_CR LL_RTC_DisableIT_WUT
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_DisableIT_WUT(RTC_TypeDef *RTCx)
- {
- CLEAR_BIT(RTCx->CR, RTC_CR_WUTIE);
- }
- /**
- * @brief Enable Alarm B interrupt
- * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
- * @rmtoll RTC_CR ALRBIE LL_RTC_EnableIT_ALRB
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_EnableIT_ALRB(RTC_TypeDef *RTCx)
- {
- SET_BIT(RTCx->CR, RTC_CR_ALRBIE);
- }
- /**
- * @brief Disable Alarm B interrupt
- * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
- * @rmtoll RTC_CR ALRBIE LL_RTC_DisableIT_ALRB
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_DisableIT_ALRB(RTC_TypeDef *RTCx)
- {
- CLEAR_BIT(RTCx->CR, RTC_CR_ALRBIE);
- }
- /**
- * @brief Enable Alarm A interrupt
- * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
- * @rmtoll RTC_CR ALRAIE LL_RTC_EnableIT_ALRA
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_EnableIT_ALRA(RTC_TypeDef *RTCx)
- {
- SET_BIT(RTCx->CR, RTC_CR_ALRAIE);
- }
- /**
- * @brief Disable Alarm A interrupt
- * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
- * @rmtoll RTC_CR ALRAIE LL_RTC_DisableIT_ALRA
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_DisableIT_ALRA(RTC_TypeDef *RTCx)
- {
- CLEAR_BIT(RTCx->CR, RTC_CR_ALRAIE);
- }
- /**
- * @brief Check if Time-stamp interrupt is enabled or not
- * @rmtoll RTC_CR TSIE LL_RTC_IsEnabledIT_TS
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsEnabledIT_TS(RTC_TypeDef *RTCx)
- {
- return ((READ_BIT(RTCx->CR, RTC_CR_TSIE) == (RTC_CR_TSIE)) ? 1U : 0U);
- }
- /**
- * @brief Check if Wakeup timer interrupt is enabled or not
- * @rmtoll RTC_CR WUTIE LL_RTC_IsEnabledIT_WUT
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsEnabledIT_WUT(RTC_TypeDef *RTCx)
- {
- return ((READ_BIT(RTCx->CR, RTC_CR_WUTIE) == (RTC_CR_WUTIE)) ? 1U : 0U);
- }
- /**
- * @brief Check if Alarm B interrupt is enabled or not
- * @rmtoll RTC_CR ALRBIE LL_RTC_IsEnabledIT_ALRB
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsEnabledIT_ALRB(RTC_TypeDef *RTCx)
- {
- return ((READ_BIT(RTCx->CR, RTC_CR_ALRBIE) == (RTC_CR_ALRBIE)) ? 1U : 0U);
- }
- /**
- * @brief Check if Alarm A interrupt is enabled or not
- * @rmtoll RTC_CR ALRAIE LL_RTC_IsEnabledIT_ALRA
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsEnabledIT_ALRA(RTC_TypeDef *RTCx)
- {
- return ((READ_BIT(RTCx->CR, RTC_CR_ALRAIE) == (RTC_CR_ALRAIE)) ? 1U : 0U);
- }
- /**
- * @brief Enable tamper 1 interrupt.
- * @rmtoll TAMP_IER TAMP1IE LL_RTC_EnableIT_TAMP1
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_EnableIT_TAMP1(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- SET_BIT(TAMP->IER, TAMP_IER_TAMP1IE);
- }
- /**
- * @brief Disable tamper 1 interrupt.
- * @rmtoll TAMP_IER TAMP1IE LL_RTC_DisableIT_TAMP1
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_DisableIT_TAMP1(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- CLEAR_BIT(TAMP->IER, TAMP_IER_TAMP1IE);
- }
- /**
- * @brief Enable tamper 2 interrupt.
- * @rmtoll TAMP_IER TAMP2IE LL_RTC_EnableIT_TAMP2
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_EnableIT_TAMP2(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- SET_BIT(TAMP->IER, TAMP_IER_TAMP2IE);
- }
- /**
- * @brief Disable tamper 2 interrupt.
- * @rmtoll TAMP_IER TAMP2IE LL_RTC_DisableIT_TAMP2
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_DisableIT_TAMP2(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- CLEAR_BIT(TAMP->IER, TAMP_IER_TAMP2IE);
- }
- #if (RTC_TAMP_NB == 3)
- /**
- * @brief Enable tamper 3 interrupt.
- * @rmtoll TAMP_IER TAMP3IE LL_RTC_EnableIT_TAMP3
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_EnableIT_TAMP3(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- SET_BIT(TAMP->IER, TAMP_IER_TAMP3IE);
- }
- /**
- * @brief Disable tamper 3 interrupt.
- * @rmtoll TAMP_IER TAMP3IE LL_RTC_DisableIT_TAMP3
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_DisableIT_TAMP3(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- CLEAR_BIT(TAMP->IER, TAMP_IER_TAMP3IE);
- }
- #elif (RTC_TAMP_NB == 8)
- /**
- * @brief Enable tamper 3 interrupt.
- * @rmtoll TAMP_IER TAMP3IE LL_RTC_EnableIT_TAMP3
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_EnableIT_TAMP3(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- SET_BIT(TAMP->IER, TAMP_IER_TAMP3IE);
- }
- /**
- * @brief Disable tamper 3 interrupt.
- * @rmtoll TAMP_IER TAMP3IE LL_RTC_DisableIT_TAMP3
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_DisableIT_TAMP3(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- CLEAR_BIT(TAMP->IER, TAMP_IER_TAMP3IE);
- }
- /**
- * @brief Enable tamper 4 interrupt.
- * @rmtoll TAMP_IER TAMP4IE LL_RTC_EnableIT_TAMP4
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_EnableIT_TAMP4(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- SET_BIT(TAMP->IER, TAMP_IER_TAMP4IE);
- }
- /**
- * @brief Disable tamper 4 interrupt.
- * @rmtoll TAMP_IER TAMP4IE LL_RTC_DisableIT_TAMP4
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_DisableIT_TAMP4(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- CLEAR_BIT(TAMP->IER, TAMP_IER_TAMP4IE);
- }
- /**
- * @brief Enable tamper 5 interrupt.
- * @rmtoll TAMP_IER TAMP5IE LL_RTC_EnableIT_TAMP5
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_EnableIT_TAMP5(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- SET_BIT(TAMP->IER, TAMP_IER_TAMP5IE);
- }
- /**
- * @brief Disable tamper 5 interrupt.
- * @rmtoll TAMP_IER TAMP5IE LL_RTC_DisableIT_TAMP5
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_DisableIT_TAMP5(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- CLEAR_BIT(TAMP->IER, TAMP_IER_TAMP5IE);
- }
- /**
- * @brief Enable tamper 6 interrupt.
- * @rmtoll TAMP_IER TAMP6IE LL_RTC_EnableIT_TAMP6
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_EnableIT_TAMP6(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- SET_BIT(TAMP->IER, TAMP_IER_TAMP6IE);
- }
- /**
- * @brief Disable tamper 6 interrupt.
- * @rmtoll TAMP_IER TAMP6IE LL_RTC_DisableIT_TAMP6
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_DisableIT_TAMP6(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- CLEAR_BIT(TAMP->IER, TAMP_IER_TAMP6IE);
- }
- /**
- * @brief Enable tamper 7 interrupt.
- * @rmtoll TAMP_IER TAMP7IE LL_RTC_EnableIT_TAMP7
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_EnableIT_TAMP7(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- SET_BIT(TAMP->IER, TAMP_IER_TAMP7IE);
- }
- /**
- * @brief Disable tamper 7 interrupt.
- * @rmtoll TAMP_IER TAMP7IE LL_RTC_DisableIT_TAMP7
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_DisableIT_TAMP7(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- CLEAR_BIT(TAMP->IER, TAMP_IER_TAMP7IE);
- }
- /**
- * @brief Enable tamper 8 interrupt.
- * @rmtoll TAMP_IER TAMP8IE LL_RTC_EnableIT_TAMP8
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_EnableIT_TAMP8(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- SET_BIT(TAMP->IER, TAMP_IER_TAMP8IE);
- }
- /**
- * @brief Disable tamper 8 interrupt.
- * @rmtoll TAMP_IER TAMP8IE LL_RTC_DisableIT_TAMP8
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_DisableIT_TAMP8(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- CLEAR_BIT(TAMP->IER, TAMP_IER_TAMP8IE);
- }
- #endif /* RTC_TAMP_NB */
- #if 0
- /**
- * @brief Enable tamper 92 interrupt.
- * @rmtoll TAMP_IER TAMP9IE LL_RTC_EnableIT_TAMP9
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_EnableIT_TAMP9(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- SET_BIT(TAMP->IER, TAMP_IER_TAMP9IE);
- }
- /**
- * @brief Disable tamper 9 interrupt.
- * @rmtoll TAMP_IER TAMP9IE LL_RTC_DisableIT_TAMP9
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_DisableIT_TAMP9(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- CLEAR_BIT(TAMP->IER, TAMP_IER_TAMP9IE);
- }
- /**
- * @brief Enable tamper 10 interrupt.
- * @rmtoll TAMP_IER TAMP10IE LL_RTC_EnableIT_TAMP10
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_EnableIT_TAMP10(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- SET_BIT(TAMP->IER, TAMP_IER_TAMP10IE);
- }
- /**
- * @brief Disable tamper 10 interrupt.
- * @rmtoll TAMP_IER TAMP10IE LL_RTC_DisableIT_TAMP10
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_DisableIT_TAMP10(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- CLEAR_BIT(TAMP->IER, TAMP_IER_TAMP10IE);
- }
- /**
- * @brief Enable tamper 11 interrupt.
- * @rmtoll TAMP_IER TAMP11IE LL_RTC_EnableIT_TAMP11
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_EnableIT_TAMP11(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- SET_BIT(TAMP->IER, TAMP_IER_TAMP11IE);
- }
- /**
- * @brief Disable tamper 11 interrupt.
- * @rmtoll TAMP_IER TAMP11IE LL_RTC_DisableIT_TAMP11
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_DisableIT_TAMP11(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- CLEAR_BIT(TAMP->IER, TAMP_IER_TAMP11IE);
- }
- /**
- * @brief Enable tamper 12 interrupt.
- * @rmtoll TAMP_IER TAMP12IE LL_RTC_EnableIT_TAMP12
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_EnableIT_TAMP12(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- SET_BIT(TAMP->IER, TAMP_IER_TAMP12IE);
- }
- /**
- * @brief Disable tamper 12 interrupt.
- * @rmtoll TAMP_IER TAMP12IE LL_RTC_DisableIT_TAMP12
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_DisableIT_TAMP12(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- CLEAR_BIT(TAMP->IER, TAMP_IER_TAMP12IE);
- }
- /**
- * @brief Enable tamper 13 interrupt.
- * @rmtoll TAMP_IER TAMP13IE LL_RTC_EnableIT_TAMP13
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_EnableIT_TAMP13(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- SET_BIT(TAMP->IER, TAMP_IER_TAMP13IE);
- }
- /**
- * @brief Disable tamper 13 interrupt.
- * @rmtoll TAMP_IER TAMP13IE LL_RTC_DisableIT_TAMP13
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_DisableIT_TAMP13(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- CLEAR_BIT(TAMP->IER, TAMP_IER_TAMP13IE);
- }
- /**
- * @brief Enable tamper 14 interrupt.
- * @rmtoll TAMP_IER TAMP14IE LL_RTC_EnableIT_TAMP14
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_EnableIT_TAMP14(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- SET_BIT(TAMP->IER, TAMP_IER_TAMP14IE);
- }
- /**
- * @brief Disable tamper 14 interrupt.
- * @rmtoll TAMP_IER TAMP14IE LL_RTC_DisableIT_TAMP14
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_DisableIT_TAMP14(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- CLEAR_BIT(TAMP->IER, TAMP_IER_TAMP14IE);
- }
- /**
- * @brief Enable tamper 15 interrupt.
- * @rmtoll TAMP_IER TAMP15IE LL_RTC_EnableIT_TAMP15
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_EnableIT_TAMP15(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- SET_BIT(TAMP->IER, TAMP_IER_TAMP15IE);
- }
- /**
- * @brief Disable tamper 15 interrupt.
- * @rmtoll TAMP_IER TAMP15IE LL_RTC_DisableIT_TAMP15
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_DisableIT_TAMP15(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- CLEAR_BIT(TAMP->IER, TAMP_IER_TAMP15IE);
- }
- /**
- * @brief Enable tamper 16 interrupt.
- * @rmtoll TAMP_IER TAMP16IE LL_RTC_EnableIT_TAMP16
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_EnableIT_TAMP16(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- SET_BIT(TAMP->IER, TAMP_IER_TAMP16IE);
- }
- /**
- * @brief Disable tamper 16 interrupt.
- * @rmtoll TAMP_IER TAMP16IE LL_RTC_DisableIT_TAMP16
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_DisableIT_TAMP16(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- CLEAR_BIT(TAMP->IER, TAMP_IER_TAMP16IE);
- }
- #endif /* 0 */
- #if defined (RTC_TAMP_INT_1_SUPPORT)
- /**
- * @brief Enable internal tamper 1 interrupt.
- * @rmtoll TAMP_IER ITAMP1IE LL_RTC_EnableIT_ITAMP1
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_EnableIT_ITAMP1(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- SET_BIT(TAMP->IER, TAMP_IER_ITAMP1IE);
- }
- /**
- * @brief Disable internal tamper 1 interrupt.
- * @rmtoll TAMP_IER TAMP1IE LL_RTC_DisableIT_ITAMP1
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_DisableIT_ITAMP1(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- CLEAR_BIT(TAMP->IER, TAMP_IER_ITAMP1IE);
- }
- #endif /* RTC_TAMP_INT_1_SUPPORT */
- #if defined (RTC_TAMP_INT_2_SUPPORT)
- /**
- * @brief Enable internal tamper 2 interrupt.
- * @rmtoll TAMP_IER ITAMP2IE LL_RTC_EnableIT_ITAMP2
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_EnableIT_ITAMP2(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- SET_BIT(TAMP->IER, TAMP_IER_ITAMP2IE);
- }
- /**
- * @brief Disable internal tamper 2 interrupt.
- * @rmtoll TAMP_IER TAMP2IE LL_RTC_DisableIT_ITAMP2
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_DisableIT_ITAMP2(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- CLEAR_BIT(TAMP->IER, TAMP_IER_ITAMP2IE);
- }
- #endif /* RTC_TAMP_INT_2_SUPPORT */
- /**
- * @brief Enable internal tamper 3 interrupt.
- * @rmtoll TAMP_IER ITAMP3IE LL_RTC_EnableIT_ITAMP3
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_EnableIT_ITAMP3(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- SET_BIT(TAMP->IER, TAMP_IER_ITAMP3IE);
- }
- /**
- * @brief Disable internal tamper 3 interrupt.
- * @rmtoll TAMP_IER TAMP3IE LL_RTC_DisableIT_ITAMP3
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_DisableIT_ITAMP3(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- CLEAR_BIT(TAMP->IER, TAMP_IER_ITAMP3IE);
- }
- /**
- * @brief Enable internal tamper 4 interrupt.
- * @rmtoll TAMP_IER ITAMP4IE LL_RTC_EnableIT_ITAMP4
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_EnableIT_ITAMP4(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- SET_BIT(TAMP->IER, TAMP_IER_ITAMP4IE);
- }
- /**
- * @brief Disable internal tamper 4 interrupt.
- * @rmtoll TAMP_IER TAMP4IE LL_RTC_DisableIT_ITAMP4
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_DisableIT_ITAMP4(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- CLEAR_BIT(TAMP->IER, TAMP_IER_ITAMP4IE);
- }
- /**
- * @brief Enable internal tamper 5 interrupt.
- * @rmtoll TAMP_IER ITAMP5IE LL_RTC_EnableIT_ITAMP5
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_EnableIT_ITAMP5(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- SET_BIT(TAMP->IER, TAMP_IER_ITAMP5IE);
- }
- /**
- * @brief Disable internal tamper 5 interrupt.
- * @rmtoll TAMP_IER TAMP5IE LL_RTC_DisableIT_ITAMP5
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_DisableIT_ITAMP5(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- CLEAR_BIT(TAMP->IER, TAMP_IER_ITAMP5IE);
- }
- #if defined (RTC_TAMP_INT_6_SUPPORT)
- /**
- * @brief Enable internal tamper 6 interrupt.
- * @rmtoll TAMP_IER ITAMP6IE LL_RTC_EnableIT_ITAMP6
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_EnableIT_ITAMP6(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- SET_BIT(TAMP->IER, TAMP_IER_ITAMP6IE);
- }
- /**
- * @brief Disable internal tamper 6 interrupt.
- * @rmtoll TAMP_IER TAMP6IE LL_RTC_DisableIT_ITAMP6
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_DisableIT_ITAMP6(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- CLEAR_BIT(TAMP->IER, TAMP_IER_ITAMP6IE);
- }
- #endif /* (RTC_TAMP_INT_2_SUPPORT) */
- #if defined (RTC_TAMP_INT_7_SUPPORT)
- /**
- * @brief Enable internal tamper 7 interrupt.
- * @rmtoll TAMP_IER ITAMP7IE LL_RTC_EnableIT_ITAMP7
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_EnableIT_ITAMP7(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- SET_BIT(TAMP->IER, TAMP_IER_ITAMP7IE);
- }
- /**
- * @brief Disable internal tamper 7 interrupt.
- * @rmtoll TAMP_IER TAMP7IE LL_RTC_DisableIT_ITAMP7
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_DisableIT_ITAMP7(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- CLEAR_BIT(TAMP->IER, TAMP_IER_ITAMP7IE);
- }
- #endif /* (RTC_TAMP_INT_7_SUPPORT)*/
- #if defined (RTC_TAMP_INT_8_SUPPORT)
- /**
- * @brief Enable internal tamper 8 interrupt.
- * @rmtoll TAMP_IER ITAMP8IE LL_RTC_EnableIT_ITAMP8
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_EnableIT_ITAMP8(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- SET_BIT(TAMP->IER, TAMP_IER_ITAMP8IE);
- }
- /**
- * @brief Disable internal tamper 8 interrupt.
- * @rmtoll TAMP_IER TAMP8IE LL_RTC_DisableIT_ITAMP8
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_DisableIT_ITAMP8(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- CLEAR_BIT(TAMP->IER, TAMP_IER_ITAMP8IE);
- }
- #endif /* (RTC_TAMP_INT_8_SUPPORT)*/
- #if 0
- /**
- * @brief Enable internal tamper 9 interrupt.
- * @rmtoll TAMP_IER ITAMP7IE LL_RTC_EnableIT_ITAMP9
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_EnableIT_ITAMP9(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- SET_BIT(TAMP->IER, TAMP_IER_ITAMP9IE);
- }
- /**
- * @brief Disable internal tamper 9 interrupt.
- * @rmtoll TAMP_IER TAMP9IE LL_RTC_DisableIT_ITAMP9
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_DisableIT_ITAMP9(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- CLEAR_BIT(TAMP->IER, TAMP_IER_ITAMP9IE);
- }
- /**
- * @brief Enable internal tamper 10 interrupt.
- * @rmtoll TAMP_IER ITAMP10IE LL_RTC_EnableIT_ITAMP10
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_EnableIT_ITAMP10(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- SET_BIT(TAMP->IER, TAMP_IER_ITAMP10IE);
- }
- /**
- * @brief Disable internal tamper 10 interrupt.
- * @rmtoll TAMP_IER TAMP10IE LL_RTC_DisableIT_ITAMP10
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_DisableIT_ITAMP10(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- CLEAR_BIT(TAMP->IER, TAMP_IER_ITAMP10IE);
- }
- /**
- * @brief Enable internal tamper 11 interrupt.
- * @rmtoll TAMP_IER ITAMP11IE LL_RTC_EnableIT_ITAMP11
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_EnableIT_ITAMP11(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- SET_BIT(TAMP->IER, TAMP_IER_ITAMP11IE);
- }
- /**
- * @brief Disable internal tamper 11 interrupt.
- * @rmtoll TAMP_IER TAMP11IE LL_RTC_DisableIT_ITAMP11
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_DisableIT_ITAMP11(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- CLEAR_BIT(TAMP->IER, TAMP_IER_ITAMP11IE);
- }
- /**
- * @brief Enable internal tamper 12 interrupt.
- * @rmtoll TAMP_IER ITAMP12IE LL_RTC_EnableIT_ITAMP12
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_EnableIT_ITAMP12(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- SET_BIT(TAMP->IER, TAMP_IER_ITAMP12IE);
- }
- /**
- * @brief Disable internal tamper 12 interrupt.
- * @rmtoll TAMP_IER TAMP12IE LL_RTC_DisableIT_ITAMP12
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_DisableIT_ITAMP12(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- CLEAR_BIT(TAMP->IER, TAMP_IER_ITAMP12IE);
- }
- /**
- * @brief Enable internal tamper 13 interrupt.
- * @rmtoll TAMP_IER ITAMP13IE LL_RTC_EnableIT_ITAMP13
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_EnableIT_ITAMP13(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- SET_BIT(TAMP->IER, TAMP_IER_ITAMP13IE);
- }
- /**
- * @brief Disable internal tamper 13 interrupt.
- * @rmtoll TAMP_IER TAMP13IE LL_RTC_DisableIT_ITAMP13
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_DisableIT_ITAMP13(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- CLEAR_BIT(TAMP->IER, TAMP_IER_ITAMP13IE);
- }
- /**
- * @brief Enable internal tamper 14 interrupt.
- * @rmtoll TAMP_IER ITAMP14IE LL_RTC_EnableIT_ITAMP14
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_EnableIT_ITAMP14(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- SET_BIT(TAMP->IER, TAMP_IER_ITAMP14IE);
- }
- /**
- * @brief Disable internal tamper 14 interrupt.
- * @rmtoll TAMP_IER TAMP14IE LL_RTC_DisableIT_ITAMP14
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_DisableIT_ITAMP14(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- CLEAR_BIT(TAMP->IER, TAMP_IER_ITAMP14IE);
- }
- /**
- * @brief Enable internal tamper 15 interrupt.
- * @rmtoll TAMP_IER ITAMP15IE LL_RTC_EnableIT_ITAMP15
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_EnableIT_ITAMP15(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- SET_BIT(TAMP->IER, TAMP_IER_ITAMP15IE);
- }
- /**
- * @brief Disable internal tamper 15 interrupt.
- * @rmtoll TAMP_IER TAMP15IE LL_RTC_DisableIT_ITAMP15
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_DisableIT_ITAMP15(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- CLEAR_BIT(TAMP->IER, TAMP_IER_ITAMP15IE);
- }
- /**
- * @brief Enable internal tamper 16 interrupt.
- * @rmtoll TAMP_IER ITAMP16IE LL_RTC_EnableIT_ITAMP16
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_EnableIT_ITAMP16(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- SET_BIT(TAMP->IER, TAMP_IER_ITAMP16IE);
- }
- /**
- * @brief Disable internal tamper 16 interrupt.
- * @rmtoll TAMP_IER TAMP16IE LL_RTC_DisableIT_ITAMP16
- * @param RTCx RTC Instance
- * @retval None
- */
- __STATIC_INLINE void LL_RTC_DisableIT_ITAMP16(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- CLEAR_BIT(TAMP->IER, TAMP_IER_ITAMP16IE);
- }
- #endif /* 0 */
- /**
- * @brief Check if tamper 1 interrupt is enabled or not.
- * @rmtoll TAMP_IER TAMP1IE LL_RTC_IsEnabledIT_TAMP1
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsEnabledIT_TAMP1(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- return ((READ_BIT(TAMP->IER, TAMP_IER_TAMP1IE) == (TAMP_IER_TAMP1IE)) ? 1U : 0U);
- }
- /**
- * @brief Check if tamper 2 interrupt is enabled or not.
- * @rmtoll TAMP_IER TAMP2IE LL_RTC_IsEnabledIT_TAMP2
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsEnabledIT_TAMP2(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- return ((READ_BIT(TAMP->IER, TAMP_IER_TAMP2IE) == (TAMP_IER_TAMP2IE)) ? 1U : 0U);
- }
- #if (RTC_TAMP_NB == 3)
- /**
- * @brief Check if tamper 3 interrupt is enabled or not.
- * @rmtoll TAMP_IER TAMP3IE LL_RTC_IsEnabledIT_TAMP3
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsEnabledIT_TAMP3(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- return ((READ_BIT(TAMP->IER, TAMP_IER_TAMP3IE) == (TAMP_IER_TAMP3IE)) ? 1U : 0U);
- }
- #elif (RTC_TAMP_NB == 8)
- /**
- * @brief Check if tamper 3 interrupt is enabled or not.
- * @rmtoll TAMP_IER TAMP3IE LL_RTC_IsEnabledIT_TAMP3
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsEnabledIT_TAMP3(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- return ((READ_BIT(TAMP->IER, TAMP_IER_TAMP3IE) == (TAMP_IER_TAMP3IE)) ? 1U : 0U);
- }
- /**
- * @brief Check if tamper 4 interrupt is enabled or not.
- * @rmtoll TAMP_IER TAMP4IE LL_RTC_IsEnabledIT_TAMP4
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsEnabledIT_TAMP4(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- return ((READ_BIT(TAMP->IER, TAMP_IER_TAMP4IE) == (TAMP_IER_TAMP4IE)) ? 1U : 0U);
- }
- /**
- * @brief Check if tamper 5 interrupt is enabled or not.
- * @rmtoll TAMP_IER TAMP1IE LL_RTC_IsEnabledIT_TAMP5
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsEnabledIT_TAMP5(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- return ((READ_BIT(TAMP->IER, TAMP_IER_TAMP5IE) == (TAMP_IER_TAMP5IE)) ? 1U : 0U);
- }
- /**
- * @brief Check if tamper 6 interrupt is enabled or not.
- * @rmtoll TAMP_IER TAMP6IE LL_RTC_IsEnabledIT_TAMP6
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsEnabledIT_TAMP6(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- return ((READ_BIT(TAMP->IER, TAMP_IER_TAMP6IE) == (TAMP_IER_TAMP6IE)) ? 1U : 0U);
- }
- /**
- * @brief Check if tamper 7 interrupt is enabled or not.
- * @rmtoll TAMP_IER TAMP1IE LL_RTC_IsEnabledIT_TAMP7
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsEnabledIT_TAMP7(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- return ((READ_BIT(TAMP->IER, TAMP_IER_TAMP7IE) == (TAMP_IER_TAMP7IE)) ? 1U : 0U);
- }
- /**
- * @brief Check if tamper 8 interrupt is enabled or not.
- * @rmtoll TAMP_IER TAMP8IE LL_RTC_IsEnabledIT_TAMP8
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsEnabledIT_TAMP8(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- return ((READ_BIT(TAMP->IER, TAMP_IER_TAMP8IE) == (TAMP_IER_TAMP8IE)) ? 1U : 0U);
- }
- #endif /* RTC_TAMP_NB */
- #if defined (RTC_TAMP_INT_1_SUPPORT)
- /**
- * @brief Check if internal tamper 1 interrupt is enabled or not.
- * @rmtoll TAMP_IER ITAMP1IE LL_RTC_IsEnabledIT_ITAMP1
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsEnabledIT_ITAMP1(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- return ((READ_BIT(TAMP->IER, TAMP_IER_ITAMP1IE) == (TAMP_IER_ITAMP1IE)) ? 1U : 0U);
- }
- #endif /* RTC_TAMP_INT_1_SUPPORT */
- #if defined (RTC_TAMP_INT_2_SUPPORT)
- /**
- * @brief Check if internal tamper 2 interrupt is enabled or not.
- * @rmtoll TAMP_IER ITAMP2IE LL_RTC_IsEnabledIT_ITAMP2
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsEnabledIT_ITAMP2(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- return ((READ_BIT(TAMP->IER, TAMP_IER_ITAMP2IE) == (TAMP_IER_ITAMP2IE)) ? 1U : 0U);
- }
- #endif /* RTC_TAMP_INT_2_SUPPORT */
- /**
- * @brief Check if internal tamper 3 interrupt is enabled or not.
- * @rmtoll TAMP_IER ITAMP3IE LL_RTC_IsEnabledIT_ITAMP3
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsEnabledIT_ITAMP3(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- return ((READ_BIT(TAMP->IER, TAMP_IER_ITAMP3IE) == (TAMP_IER_ITAMP3IE)) ? 1U : 0U);
- }
- /**
- * @brief Check if internal tamper 4 interrupt is enabled or not.
- * @rmtoll TAMP_IER ITAMP4IE LL_RTC_IsEnabledIT_ITAMP4
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsEnabledIT_ITAMP4(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- return ((READ_BIT(TAMP->IER, TAMP_IER_ITAMP4IE) == (TAMP_IER_ITAMP4IE)) ? 1U : 0U);
- }
- /**
- * @brief Check if internal tamper 5 interrupt is enabled or not.
- * @rmtoll TAMP_IER ITAMP5IE LL_RTC_IsEnabledIT_ITAMP5
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsEnabledIT_ITAMP5(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- return ((READ_BIT(TAMP->IER, TAMP_IER_ITAMP5IE) == (TAMP_IER_ITAMP5IE)) ? 1U : 0U);
- }
- #if defined (RTC_TAMP_INT_6_SUPPORT)
- /**
- * @brief Check if internal tamper 6 interrupt is enabled or not.
- * @rmtoll TAMP_IER ITAMP6IE LL_RTC_IsEnabledIT_ITAMP6
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsEnabledIT_ITAMP6(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- return ((READ_BIT(TAMP->IER, TAMP_IER_ITAMP6IE) == (TAMP_IER_ITAMP6IE)) ? 1U : 0U);
- }
- #endif /* RTC_TAMP_INT_6_SUPPORT */
- #if defined (RTC_TAMP_INT_7_SUPPORT)
- /**
- * @brief Check if internal tamper 7 interrupt is enabled or not.
- * @rmtoll TAMP_IER ITAMP7IE LL_RTC_IsEnabledIT_ITAMP7
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsEnabledIT_ITAMP7(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- return ((READ_BIT(TAMP->IER, TAMP_IER_ITAMP7IE) == (TAMP_IER_ITAMP7IE)) ? 1U : 0U);
- }
- #endif /* RTC_TAMP_INT_7_SUPPORT */
- #if defined (RTC_TAMP_INT_8_SUPPORT)
- /**
- * @brief Check if internal tamper 7 interrupt is enabled or not.
- * @rmtoll TAMP_IER ITAMP7IE LL_RTC_IsEnabledIT_ITAMP7
- * @param RTCx RTC Instance
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RTC_IsEnabledIT_ITAMP7(RTC_TypeDef *RTCx)
- {
- UNUSED(RTCx);
- return ((READ_BIT(TAMP->IER, TAMP_IER_ITAMP7IE) == (TAMP_IER_ITAMP7IE)) ? 1U : 0U);
- }
- #endif /* RTC_TAMP_INT_8_SUPPORT */
- /**
- * @}
- */
- #if defined(USE_FULL_LL_DRIVER)
- /** @defgroup RTC_LL_EF_Init Initialization and de-initialization functions
- * @{
- */
- ErrorStatus LL_RTC_DeInit(RTC_TypeDef *RTCx);
- ErrorStatus LL_RTC_Init(RTC_TypeDef *RTCx, LL_RTC_InitTypeDef *RTC_InitStruct);
- void LL_RTC_StructInit(LL_RTC_InitTypeDef *RTC_InitStruct);
- ErrorStatus LL_RTC_TIME_Init(RTC_TypeDef *RTCx, uint32_t RTC_Format, LL_RTC_TimeTypeDef *RTC_TimeStruct);
- void LL_RTC_TIME_StructInit(LL_RTC_TimeTypeDef *RTC_TimeStruct);
- ErrorStatus LL_RTC_DATE_Init(RTC_TypeDef *RTCx, uint32_t RTC_Format, LL_RTC_DateTypeDef *RTC_DateStruct);
- void LL_RTC_DATE_StructInit(LL_RTC_DateTypeDef *RTC_DateStruct);
- ErrorStatus LL_RTC_ALMA_Init(RTC_TypeDef *RTCx, uint32_t RTC_Format, LL_RTC_AlarmTypeDef *RTC_AlarmStruct);
- ErrorStatus LL_RTC_ALMB_Init(RTC_TypeDef *RTCx, uint32_t RTC_Format, LL_RTC_AlarmTypeDef *RTC_AlarmStruct);
- void LL_RTC_ALMA_StructInit(LL_RTC_AlarmTypeDef *RTC_AlarmStruct);
- void LL_RTC_ALMB_StructInit(LL_RTC_AlarmTypeDef *RTC_AlarmStruct);
- ErrorStatus LL_RTC_EnterInitMode(RTC_TypeDef *RTCx);
- ErrorStatus LL_RTC_ExitInitMode(RTC_TypeDef *RTCx);
- ErrorStatus LL_RTC_WaitForSynchro(RTC_TypeDef *RTCx);
- /**
- * @}
- */
- #endif /* USE_FULL_LL_DRIVER */
- /**
- * @}
- */
- /**
- * @}
- */
- #endif /* defined(RTC) */
- /**
- * @}
- */
- #ifdef __cplusplus
- }
- #endif
- #endif /* STM32G4xx_LL_RTC_H */
|