lib/stm32/*.c: Coding-style fixes.

This commit is contained in:
Uwe Hermann 2011-11-16 19:13:21 +01:00
parent bb8741a79b
commit 6e7403f769
3 changed files with 4 additions and 6 deletions

View File

@ -94,7 +94,7 @@ u8 nvic_get_irq_enabled(u8 irqn)
void nvic_set_priority(u8 irqn, u8 priority)
{
NVIC_IPR(irqn/4) |= (priority << ((irqn % 4) * 8));
NVIC_IPR(irqn / 4) |= (priority << ((irqn % 4) * 8));
}
void nvic_generate_software_interrupt(u8 irqn)
@ -102,5 +102,3 @@ void nvic_generate_software_interrupt(u8 irqn)
if (irqn <= 239)
NVIC_STIR |= irqn;
}

View File

@ -21,7 +21,7 @@
void systick_set_reload(u32 value)
{
STK_LOAD = (value & 0x00FFFFFF);
STK_LOAD = (value & 0x00FFFFFF);
}
u32 systick_get_value(void)
@ -60,5 +60,5 @@ u8 systick_get_countflag(void)
if (STK_CTRL & STK_CTRL_COUNTFLAG)
return 1;
else
return 0;
return 0;
}

View File

@ -33,7 +33,7 @@ void usart_set_baudrate(u32 usart, u32 baud, u32 clock)
* simple divider to generate the correct baudrate. >_< If I
* am wrong feel free to correct me on that. :) (esden)
*/
USART_BRR(usart) = clock/baud;
USART_BRR(usart) = clock / baud;
}
void usart_set_databits(u32 usart, u32 bits)