From 88f602a0e0412421709e01f92b9f0f8de9c01965 Mon Sep 17 00:00:00 2001 From: michael Date: Tue, 17 Oct 2017 11:52:50 +0800 Subject: [PATCH] fix(periph_ctrl): fix reset function in `periph_ctrl.c` --- components/driver/periph_ctrl.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/components/driver/periph_ctrl.c b/components/driver/periph_ctrl.c index 61793f290..c61e2a4cc 100644 --- a/components/driver/periph_ctrl.c +++ b/components/driver/periph_ctrl.c @@ -46,10 +46,8 @@ void periph_module_disable(periph_module_t periph) void periph_module_reset(periph_module_t periph) { portENTER_CRITICAL(&periph_spinlock); - uint32_t rst_en = get_rst_en_mask(periph); - uint32_t mask = get_clk_en_mask(periph); - DPORT_SET_PERI_REG_MASK(rst_en, mask); - DPORT_CLEAR_PERI_REG_MASK(rst_en, mask); + DPORT_SET_PERI_REG_MASK(get_rst_en_reg(periph), get_rst_en_mask(periph)); + DPORT_CLEAR_PERI_REG_MASK(get_rst_en_reg(periph), get_rst_en_mask(periph)); portEXIT_CRITICAL(&periph_spinlock); }