Fixed gpio_primary_remap; swjdisable is pre-shifted and therefore needs to be u32.
This commit is contained in:
parent
1e1859e8c7
commit
bc853e7ebd
@ -929,7 +929,7 @@ BEGIN_DECLS
|
|||||||
|
|
||||||
void gpio_set_mode(u32 gpioport, u8 mode, u8 cnf, u16 gpios);
|
void gpio_set_mode(u32 gpioport, u8 mode, u8 cnf, u16 gpios);
|
||||||
void gpio_set_eventout(u8 evoutport, u8 evoutpin);
|
void gpio_set_eventout(u8 evoutport, u8 evoutpin);
|
||||||
void gpio_primary_remap(u8 swjenable, u32 maps);
|
void gpio_primary_remap(u32 swjenable, u32 maps);
|
||||||
void gpio_secondary_remap(u32 maps);
|
void gpio_secondary_remap(u32 maps);
|
||||||
|
|
||||||
END_DECLS
|
END_DECLS
|
||||||
|
@ -162,9 +162,9 @@ value cannot be ascertained from the hardware.
|
|||||||
@ref afio_remap_usart3. For connectivity line devices only @ref afio_remap_cld are
|
@ref afio_remap_usart3. For connectivity line devices only @ref afio_remap_cld are
|
||||||
also available.
|
also available.
|
||||||
*/
|
*/
|
||||||
void gpio_primary_remap(u8 swjdisable, u32 maps)
|
void gpio_primary_remap(u32 swjdisable, u32 maps)
|
||||||
{
|
{
|
||||||
AFIO_MAPR |= swjdisable | (maps & 0x1FFFFF);
|
AFIO_MAPR |= (swjdisable & AFIO_MAPR_SWJ_MASK) | (maps & 0x1FFFFF);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*-----------------------------------------------------------------------------*/
|
/*-----------------------------------------------------------------------------*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user