30 #if defined(CPU_LINE_STM32F103xB) || defined(CPU_LINE_STM32F103xE) 
   31 #define STM32_BOOTLOADER_ADDR   (0x1FFFF000) 
   37 #define STM32_OPTION_BYTES   ((uint32_t*) 0x1FFFF800) 
   38 #define GET_RDP(x) (x & 0xFF) 
   46 #define RTT_IRQ_PRIO        1 
   49 #define RTT_IRQ             RTC_IRQn 
   50 #define RTT_ISR             isr_rtc 
   52 #define RTT_MAX_VALUE       (0xffffffff) 
   53 #define RTT_CLOCK_FREQUENCY (32768U)                   
   54 #define RTT_MIN_FREQUENCY   (1U)                       
   56 #define RTT_MAX_FREQUENCY   (RTT_CLOCK_FREQUENCY / 2)  
   79     GPIO_CRL_MODE0_INPUT            = (0x0 << GPIO_CRL_MODE0_Pos),
 
   80     GPIO_CRL_MODE0_OUTPUT_10MHZ     = (0x1 << GPIO_CRL_MODE0_Pos),
 
   81     GPIO_CRL_MODE0_OUTPUT_2MHZ      = (0x2 << GPIO_CRL_MODE0_Pos),
 
   82     GPIO_CRL_MODE0_OUTPUT_50MHZ     = (0x3 << GPIO_CRL_MODE0_Pos),
 
   96     GPIO_CRL_CNF0_INPUT_ANALOG      = (0x0 << GPIO_CRL_CNF0_Pos),
 
   97     GPIO_CRL_CNF0_INPUT_FLOATING    = (0x1 << GPIO_CRL_CNF0_Pos),
 
   98     GPIO_CRL_CNF0_INPUT_PULL        = (0x2 << GPIO_CRL_CNF0_Pos),
 
   99     GPIO_CRL_CNF0_OUTPUT_PUSH_PULL  = (0x0 << GPIO_CRL_CNF0_Pos),
 
  100     GPIO_CRL_CNF0_OUTPUT_OPEN_DRAIN = (0x1 << GPIO_CRL_CNF0_Pos),
 
  101     GPIO_CRL_CNF0_AF_PUSH_PULL      = (0x2 << GPIO_CRL_CNF0_Pos),
 
  102     GPIO_CRL_CNF0_AF_OPEN_DRAIN     = (0x3 << GPIO_CRL_CNF0_Pos),
 
  133 #ifndef CONFIG_AFIO_MAPR_SWJ_CFG 
  141 #define CONFIG_AFIO_MAPR_SWJ_CFG    SWJ_CFG_NO_JTAG_DP 
  152     return AFIO->MAPR & (~(AFIO_MAPR_SWJ_CFG_Msk));
 
static uint32_t afio_mapr_read(void)
Read the current value of the AFIO->MAPR register reproducibly.
 
afio_mapr_swj_cfg_t
Possible values of the SWJ_CFG field in the AFIO->MAPR register.
 
@ SWJ_CFG_NO_JTAG_DP
Only SW-DP enabled, JTAG pins usable as GPIOS.
 
@ SWJ_CFG_NO_NJTRST
Both JTAG-DP and SW-DP enabled, but NJTRST disabled and pin usable as GPIO.
 
@ SWJ_CFG_DISABLED
Neither JTAG-DP nor SW-DP enabled, JTAG and SWD pins usable as GPIOS.
 
@ SWJ_CFG_FULL_SWJ
Both JTAG-DP and SW-DP enabled, reset state.
 
#define CONFIG_AFIO_MAPR_SWJ_CFG
By default, disable JTAG and keep only SWD.
 
static void afio_mapr_write(uint32_t new_value)
Write to the AFIO->MAPR register apply the SWJ configuration specified via CONFIG_AFIO_MAPR_SWJ_CFG.