From 74c4facdced9ac6f68e33ceaf7c107f9294dbb4a Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 14 Apr 2015 10:08:37 -0500 Subject: [PATCH] tms570/startup/bspreset.c: Add include to fix warning --- .../lib/libbsp/arm/tms570/startup/bspreset.c | 29 ++++++++++--------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/c/src/lib/libbsp/arm/tms570/startup/bspreset.c b/c/src/lib/libbsp/arm/tms570/startup/bspreset.c index a4b6647674..3efb5907a4 100644 --- a/c/src/lib/libbsp/arm/tms570/startup/bspreset.c +++ b/c/src/lib/libbsp/arm/tms570/startup/bspreset.c @@ -17,29 +17,30 @@ */ #include +#include #include #include static void handle_esm_errors(uint32_t esm_irq_channel) { - /* ESMR3 errors don't generate interrupts. */ - if (esm_irq_channel < 0x20u) { - ESMSR1 = 1 << esm_irq_channel; - } else if (esm_irq_channel < 0x40u) { - ESMSR2 = 1 << (esm_irq_channel - 32u); - } else if (esm_irq_channel < 0x60u) { - ESMSR4 = 1 << (esm_irq_channel - 64u); - } + /* ESMR3 errors don't generate interrupts. */ + if (esm_irq_channel < 0x20u) { + ESMSR1 = 1 << esm_irq_channel; + } else if (esm_irq_channel < 0x40u) { + ESMSR2 = 1 << (esm_irq_channel - 32u); + } else if (esm_irq_channel < 0x60u) { + ESMSR4 = 1 << (esm_irq_channel - 64u); + } } void bsp_reset(void) { - uint32_t esm_irq_channel = ESMIOFFHR - 1; + uint32_t esm_irq_channel = ESMIOFFHR - 1; - if (esm_irq_channel) { - handle_esm_errors(esm_irq_channel); - } + if (esm_irq_channel) { + handle_esm_errors(esm_irq_channel); + } - /* Reset the board */ - SYSECR = SYSECR_RESET; + /* Reset the board */ + SYSECR = SYSECR_RESET; }