/* Map Alternate Function Port Bits (Main Set) 
The AFIO remapping feature is used only with the STM32F10x series. */
void gpio_primary_remap(uint32_t swjdisable, uint32_t maps)
/* Map Alternate Function Port Bits (Main Set) 
The AFIO remapping feature is used only with the STM32F10x series. */
void gpio_primary_remap(uint32_t swjdisable, uint32_t maps)
{
	uint32_t reg = AFIO_MAPR & ~AFIO_MAPR_SWJ_MASK;
	AFIO_MAPR = reg | swjdisable | maps;
}