3 #include "stm32f4xx_rcc.h" 12 #pragma GCC diagnostic push //Ignore old style cast from included library 13 #pragma GCC diagnostic ignored "-Wold-style-cast" 17 #pragma GCC diagnostic pop 24 #pragma GCC diagnostic push //Ignore old style cast from included library 25 #pragma GCC diagnostic ignored "-Wold-style-cast" 27 #pragma GCC diagnostic pop 36 #pragma GCC diagnostic push //Ignore old style cast from included library 37 #pragma GCC diagnostic ignored "-Wold-style-cast" 39 #pragma GCC diagnostic pop 40 #pragma GCC diagnostic push //Ignore blank fields in struct 41 #pragma GCC diagnostic ignored "-Wmissing-field-initializers" 43 #pragma GCC diagnostic pop 65 const uint32_t *pointer =
reinterpret_cast<const uint32_t *
>(&data);
66 uint32_t checksum = 0;
68 checksum^=*(pointer+
i);
void RCC_APB1PeriphClockCmd(uint32_t RCC_APB1Periph, FunctionalState NewState)
Enables or disables the Low Speed APB (APB1) peripheral clock.
void backup_sram_write(const rosflight_firmware::BackupData &data)
This file contains all the functions prototypes for the PWR firmware library.
void RCC_AHB1PeriphClockCmd(uint32_t RCC_AHB1Periph, FunctionalState NewState)
Enables or disables the AHB1 peripheral clock.
void PWR_BackupAccessCmd(FunctionalState NewState)
Enables or disables access to the RTC and backup registers.
void RCC_APB1PeriphResetCmd(uint32_t RCC_APB1Periph, FunctionalState NewState)
Forces or releases Low Speed APB (APB1) peripheral reset.
#define RCC_APB1Periph_PWR
rosflight_firmware::BackupData backup_sram_read()
bool check_backup_checksum(const rosflight_firmware::BackupData &data)
rosflight_firmware::BackupData do_first_read()
#define RCC_AHB1Periph_BKPSRAM
uint32_t generate_backup_checksum(const rosflight_firmware::BackupData &data)
void PWR_BackupRegulatorCmd(FunctionalState NewState)
Enables or disables the Backup Regulator.