Lines Matching refs:backup
43 struct backup { struct
48 static __noinit struct backup backup_data; argument
56 static void mpu_suspend(_mpu_context_t *backup) in mpu_suspend() argument
62 backup->RNR = MPU->RNR; in mpu_suspend()
66 backup->RBAR[i] = MPU->RBAR; in mpu_suspend()
67 backup->RLAR[i] = MPU->RLAR; in mpu_suspend()
69 backup->MAIR0 = MPU->MAIR0; in mpu_suspend()
70 backup->MAIR1 = MPU->MAIR1; in mpu_suspend()
71 backup->CTRL = MPU->CTRL; in mpu_suspend()
74 static void mpu_resume(_mpu_context_t *backup) in mpu_resume() argument
82 uint32_t rnr = backup->RNR; in mpu_resume()
86 MPU->RBAR = backup->RBAR[i]; in mpu_resume()
87 MPU->RLAR = backup->RLAR[i]; in mpu_resume()
90 MPU->MAIR0 = backup->MAIR0; in mpu_resume()
91 MPU->MAIR1 = backup->MAIR1; in mpu_resume()
93 MPU->CTRL = backup->CTRL; in mpu_resume()
96 static void nvic_suspend(_nvic_context_t *backup) in nvic_suspend() argument
98 memcpy(backup->ISER, (uint32_t *)NVIC->ISER, sizeof(NVIC->ISER)); in nvic_suspend()
99 memcpy(backup->ISPR, (uint32_t *)NVIC->ISPR, sizeof(NVIC->ISPR)); in nvic_suspend()
100 memcpy(backup->IPR, (uint32_t *)NVIC->IPR, sizeof(NVIC->IPR)); in nvic_suspend()
103 static void nvic_resume(_nvic_context_t *backup) in nvic_resume() argument
105 memcpy((uint32_t *)NVIC->ISER, backup->ISER, sizeof(NVIC->ISER)); in nvic_resume()
106 memcpy((uint32_t *)NVIC->ISPR, backup->ISPR, sizeof(NVIC->ISPR)); in nvic_resume()
107 memcpy((uint32_t *)NVIC->IPR, backup->IPR, sizeof(NVIC->IPR)); in nvic_resume()