Proswift with BLE EV-BL652ARDZ

Fork of ADISense1000_Example_FW by Analog Devices

Committer:
nfathurr
Date:
Fri Aug 24 08:58:48 2018 +0000
Revision:
1:25a2bf666957
test

Who changed what in which revision?

UserRevisionLine numberNew contents of line
nfathurr 1:25a2bf666957 1 /*
nfathurr 1:25a2bf666957 2 * rcc_backup_registers.cpp - Interface functions for writing to back-up registers
nfathurr 1:25a2bf666957 3 *
nfathurr 1:25a2bf666957 4 * Author: Jake Greaves
nfathurr 1:25a2bf666957 5 */
nfathurr 1:25a2bf666957 6
nfathurr 1:25a2bf666957 7
nfathurr 1:25a2bf666957 8 #include "rcc_backup_registers/rcc_backup_registers.h"
nfathurr 1:25a2bf666957 9
nfathurr 1:25a2bf666957 10
nfathurr 1:25a2bf666957 11 /***************************************************************
nfathurr 1:25a2bf666957 12 * Function Name: Rcc_ReadBackupReg
nfathurr 1:25a2bf666957 13 * Description : read from BackupRegister and return its value
nfathurr 1:25a2bf666957 14 ****************************************************************/
nfathurr 1:25a2bf666957 15 uint32_t Rcc_ReadBackupReg( uint32_t BackupRegister )
nfathurr 1:25a2bf666957 16 {
nfathurr 1:25a2bf666957 17 RTC_HandleTypeDef RtcHandle;
nfathurr 1:25a2bf666957 18 RtcHandle.Instance = RTC;
nfathurr 1:25a2bf666957 19 return HAL_RTCEx_BKUPRead(&RtcHandle, BackupRegister);
nfathurr 1:25a2bf666957 20 }
nfathurr 1:25a2bf666957 21
nfathurr 1:25a2bf666957 22 /***************************************************************
nfathurr 1:25a2bf666957 23 * Function Name: Rcc_WriteBackupReg
nfathurr 1:25a2bf666957 24 * Description : write data to BackupRegister
nfathurr 1:25a2bf666957 25 ****************************************************************/
nfathurr 1:25a2bf666957 26 void Rcc_WriteBackupReg( uint32_t BackupRegister, uint32_t data )
nfathurr 1:25a2bf666957 27 {
nfathurr 1:25a2bf666957 28 RTC_HandleTypeDef RtcHandle;
nfathurr 1:25a2bf666957 29 RtcHandle.Instance = RTC;
nfathurr 1:25a2bf666957 30 HAL_PWR_EnableBkUpAccess();
nfathurr 1:25a2bf666957 31 HAL_RTCEx_BKUPWrite(&RtcHandle, BackupRegister, data);
nfathurr 1:25a2bf666957 32 HAL_PWR_DisableBkUpAccess();
nfathurr 1:25a2bf666957 33 }
nfathurr 1:25a2bf666957 34