lib/stm32/*.c: Coding-style fixes.
This commit is contained in:
parent
bb8741a79b
commit
6e7403f769
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user