stm32/f1/gpio: use |= instead of = when setting up registers
This commit is contained in:
parent
32924fcc15
commit
1cb373464c
@ -292,7 +292,7 @@ value cannot be ascertained from the hardware.
|
|||||||
*/
|
*/
|
||||||
void gpio_primary_remap(u8 swjdisable, u32 maps)
|
void gpio_primary_remap(u8 swjdisable, u32 maps)
|
||||||
{
|
{
|
||||||
AFIO_MAPR = swjdisable | (maps & 0x1FFFFF);
|
AFIO_MAPR |= swjdisable | (maps & 0x1FFFFF);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*-----------------------------------------------------------------------------*/
|
/*-----------------------------------------------------------------------------*/
|
||||||
@ -310,7 +310,7 @@ The AFIO remapping feature is used only with the STM32F10x series.
|
|||||||
*/
|
*/
|
||||||
void gpio_secondary_remap(u32 maps)
|
void gpio_secondary_remap(u32 maps)
|
||||||
{
|
{
|
||||||
AFIO_MAPR2 = maps;
|
AFIO_MAPR2 |= maps;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**@}*/
|
/**@}*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user