From a499341b2dc9af08a35ae83b936c248daa5a341a Mon Sep 17 00:00:00 2001 From: Przemyslaw Stekiel Date: Thu, 7 Jun 2018 15:12:56 +0200 Subject: [PATCH] K64F CRC driver: Fix coding style --- .../TARGET_MCU_K64F/mbed_crc_api.c | 66 +++++++++---------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_MCU_K64F/mbed_crc_api.c b/targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_MCU_K64F/mbed_crc_api.c index cb6a3f0315..83b718c943 100644 --- a/targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_MCU_K64F/mbed_crc_api.c +++ b/targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_MCU_K64F/mbed_crc_api.c @@ -25,54 +25,54 @@ static uint32_t final_xor; bool hal_crc_is_supported(const crc_mbed_config_t* config) { - if (config == NULL) { - return false; - } + if (config == NULL) { + return false; + } - if ((config->width != 32) && (config->width != 16)) { - return false; - } + if ((config->width != 32) && (config->width != 16)) { + return false; + } - return true; + return true; } void hal_crc_compute_partial_start(const crc_mbed_config_t* config) { - if (config == NULL) { - return; - } + if (config == NULL) { + return; + } - width = (config->width == 32) ? kCrcBits32 : kCrcBits16; - final_xor = config->final_xor; + width = (config->width == 32) ? kCrcBits32 : kCrcBits16; + final_xor = config->final_xor; - crc_config_t platform_config; - platform_config.polynomial = config->polynomial; - platform_config.seed = config->initial_xor; - platform_config.reflectIn = config->reflect_in; - platform_config.reflectOut = config->reflect_out; - if ((width == kCrcBits16 && config->final_xor == 0xFFFFU) || - (width == kCrcBits32 && config->final_xor == 0xFFFFFFFFU)) { - platform_config.complementChecksum = true; - } else { - platform_config.complementChecksum = false; - } - platform_config.crcBits = width; - platform_config.crcResult = kCrcFinalChecksum; + crc_config_t platform_config; + platform_config.polynomial = config->polynomial; + platform_config.seed = config->initial_xor; + platform_config.reflectIn = config->reflect_in; + platform_config.reflectOut = config->reflect_out; + if ((width == kCrcBits16 && config->final_xor == 0xFFFFU) || + (width == kCrcBits32 && config->final_xor == 0xFFFFFFFFU)) { + platform_config.complementChecksum = true; + } else { + platform_config.complementChecksum = false; + } + platform_config.crcBits = width; + platform_config.crcResult = kCrcFinalChecksum; - CRC_Init(CRC0, &platform_config); + CRC_Init(CRC0, &platform_config); } void hal_crc_compute_partial(const uint8_t *data, const size_t size) { - if (data == NULL) { - return; - } + if (data == NULL) { + return; + } - if (size == 0) { - return; - } + if (size == 0) { + return; + } - CRC_WriteData(CRC0, data, size); + CRC_WriteData(CRC0, data, size); } uint32_t hal_crc_get_result(void)