From: Nathael Pajani Date: Fri, 9 Dec 2016 01:31:41 +0000 (+0100) Subject: Cosmetic changes (whitespaces) and typo in comments X-Git-Url: http://git.techno-innov.fr/?a=commitdiff_plain;h=7c94a7dde39f6db362979d354797d72c8eb6ee7b;p=soft%2Flpc122x%2Fcore Cosmetic changes (whitespaces) and typo in comments --- diff --git a/core/iap.c b/core/iap.c index 2a611fe..3313fba 100644 --- a/core/iap.c +++ b/core/iap.c @@ -66,7 +66,7 @@ int flash_hal_erase_sector(uint32_t addr) return ret; } /* Erase sector */ - return iap_erase_flash_sectors(sector, sector); + return iap_erase_flash_sectors(sector, sector); } /* Flash a binary image chunk to a sector. */ diff --git a/drivers/adc.c b/drivers/adc.c index cae0644..04fbc02 100644 --- a/drivers/adc.c +++ b/drivers/adc.c @@ -50,7 +50,7 @@ void ADC_Handler(void) } } -/* Read the conversion from the given channel (0 to 7) +/* Read the conversion from the given channel (0 to 7) * This function reads the conversion value directly in the data register and * always returns a value. * Return 0 if the value is a new one and no overrun occured. diff --git a/drivers/countertimers.c b/drivers/countertimers.c index 4c3eea2..ee49888 100644 --- a/drivers/countertimers.c +++ b/drivers/countertimers.c @@ -1,7 +1,7 @@ /**************************************************************************** * drivers/countertimers.c * - * Copyright 2012 Nathael Pajani + * Copyright 2016 Nathael Pajani * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -38,7 +38,7 @@ /* These are local to our file */ struct countertimer_device { - struct lpc_timer* regs; + struct lpc_timer* regs; uint32_t power_bit; uint8_t irq; uint8_t configured; @@ -52,28 +52,28 @@ static struct countertimer_device countertimers[NUM_COUNTERTIMERS] = { .irq = TIMER0_IRQ, .configured = 0, .callback = NULL, - }, + }, { .regs = LPC_TMR16B1, .power_bit = LPC_SYS_ABH_CLK_CTRL_CT16B1, .irq = TIMER1_IRQ, .configured = 0, .callback = NULL, - }, + }, { .regs = LPC_TMR32B0, .power_bit = LPC_SYS_ABH_CLK_CTRL_CT32B0, .irq = TIMER2_IRQ, .configured = 0, .callback = NULL, - }, + }, { .regs = LPC_TMR32B1, .power_bit = LPC_SYS_ABH_CLK_CTRL_CT32B1, .irq = TIMER3_IRQ, .configured = 0, .callback = NULL, - }, + }, }; /* Handlers */ diff --git a/drivers/ssp.c b/drivers/ssp.c index df2f3e8..353d75e 100644 --- a/drivers/ssp.c +++ b/drivers/ssp.c @@ -284,7 +284,7 @@ uint32_t ssp_clk_on(uint8_t ssp_num, uint32_t rate) /* Activate the SSP clock (maybe divide main clock) */ switch (ssp_num) { - case 0 : + case 0: sys_config->ssp0_clk_div = pclk_div; break; } diff --git a/drivers/timers.c b/drivers/timers.c index 994c9fc..727fc9d 100644 --- a/drivers/timers.c +++ b/drivers/timers.c @@ -1,7 +1,7 @@ /**************************************************************************** * drivers/timers.c * - * Copyright 2012 Nathael Pajani + * Copyright 2016 Nathael Pajani * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/include/core/lpc_core.h b/include/core/lpc_core.h index d1db7e3..82fcb21 100644 --- a/include/core/lpc_core.h +++ b/include/core/lpc_core.h @@ -450,32 +450,32 @@ static inline uint32_t sync_lock_test_and_set(volatile uint32_t *addr, uint32_t { uint32_t oldval; lpc_disable_irq(); - dsb(); + dsb(); oldval = *addr; *addr = value; - dsb(); + dsb(); lpc_enable_irq(); return oldval; } /* Remove the lock */ static inline void sync_lock_release(volatile uint32_t *addr) { - *addr = 0; - dsb(); + *addr = 0; + dsb(); } /* IRQ disabled version : If lock is acquired (old value is 0) IRQ are - * disabled when the call returns + * disabled when the call returns * Returns the old value after the new value has been set. */ static inline uint32_t irq_sync_lock_test_and_set(volatile uint32_t *addr, uint32_t value) { uint32_t oldval; lpc_disable_irq(); - dsb(); + dsb(); oldval = *addr; *addr = value; - dsb(); + dsb(); if (oldval) { lpc_enable_irq(); } @@ -484,8 +484,8 @@ static inline uint32_t irq_sync_lock_test_and_set(volatile uint32_t *addr, uint3 /* Remove the lock */ static inline void irq_sync_lock_release(volatile uint32_t *addr) { - *addr = 0; - dsb(); + *addr = 0; + dsb(); lpc_enable_irq(); } diff --git a/include/core/watchdog.h b/include/core/watchdog.h index 63e83a8..1b9dcc8 100644 --- a/include/core/watchdog.h +++ b/include/core/watchdog.h @@ -41,7 +41,7 @@ #define WDT_CLK_IRC 0 #define WDT_CLK_WDTCLK 1 struct wdt_config { - /* clk_sel is either 0 (IRC) or 1 (WDTCLK). The corresponding clock source will be powered on. */ + /* clk_sel is either 0 (IRC) or 1 (WDTCLK). The corresponding clock source will be powered on. */ uint8_t clk_sel; uint8_t intr_mode_only; /* If set to 1, a watchdog timeout will trigger an interrupt instead of a reset */ void (*callback)(void); diff --git a/include/drivers/countertimers.h b/include/drivers/countertimers.h index fa758ba..261d4b9 100644 --- a/include/drivers/countertimers.h +++ b/include/drivers/countertimers.h @@ -29,7 +29,7 @@ /* Counter Timer */ /***************************************************************************** */ /* Timers driver for the integrated timers of the LPC122x. - * The LPC122x Has two 16bits timers and two 32bits timers. + * The LPC122x has two 16bits timers and two 32bits timers. * Refer to LPC122x documentation (UM10441.pdf) for more information. */ #define NUM_COUNTERTIMERS 4 diff --git a/lib/uprintf.c b/lib/uprintf.c index 064bcfb..4f9a5bc 100644 --- a/lib/uprintf.c +++ b/lib/uprintf.c @@ -2,7 +2,7 @@ * lib/uprintf.c * * UART printf - * + * * Copyright 2012 Nathael Pajani * * This program is free software: you can redistribute it and/or modify diff --git a/lib/vsprintf.c b/lib/vsprintf.c index 138f681..def133d 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c @@ -2,7 +2,7 @@ * lib/vsprintf.c * * Code based on lib/vsprintf.c from linux kernel. - * + * * Copyright 2012 Nathael Pajani * * This program is free software: you can redistribute it and/or modify @@ -114,8 +114,8 @@ int vsnprintf(char *buf, size_t size, const char *fmt, va_list args) /* Parse format string */ while ((buf < end) && *fmt) { - uint32_t flags = 0; - uint32_t width = 0; + uint32_t flags = 0; + uint32_t width = 0; if (*fmt != '%') { *buf++ = *fmt++;