Skip to content
Snippets Groups Projects
Verified Commit 1d0f82b3 authored by rahix's avatar rahix
Browse files

refactor(mod-pmic): Use card10_reset() instead of manual impl


Commit 82b5b21f intoduced
card10_reset().  This patch refactors the pmic module to also make use
of this new implementation.

Signed-off-by: default avatarRahix <rahix@rahix.de>
parent 82b5b21f
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,7 @@
#include "gcr_regs.h"
#include "pmic.h"
#include "MAX77650-Arduino-Library.h"
#include "card10.h"
#include "FreeRTOS.h"
#include "task.h"
......@@ -52,15 +53,7 @@ void vPmicTask(void *pvParameters)
if (int_flag & MAX77650_INT_nEN_R) {
/* Button was pressed */
if (count < PMIC_PRESS_SLEEP) {
LOG_INFO("pmic", "Reset");
/*
* Give the UART fifo time to clear.
* TODO: Do this properly
*/
for (int i = 0; i < 0x1000000; i++) {
__asm volatile("nop");
}
MXC_GCR->rstr0 = MXC_F_GCR_RSTR0_SYSTEM;
card10_reset();
}
count = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment