⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bsp.lst

📁 编译环境是 iar EWARM ,STM32 下的UCOSII
💻 LST
📖 第 1 页 / 共 5 页
字号:

   \                                 In segment CODE, align 4, keep-with-next
    569          static  void  BSP_LED_Init (void)
    570          {
   \                     BSP_LED_Init:
   \   00000000   01B5               PUSH     {R0,LR}
    571              GPIO_InitTypeDef  gpio_init;
    572          
    573          
    574              RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOF, ENABLE);
   \   00000002   0121               MOVS     R1,#+1
   \   00000004   8020               MOVS     R0,#+128
   \   00000006   ........           _BLF     RCC_APB2PeriphClockCmd,??RCC_APB2PeriphClockCmd??rT
    575          
    576              gpio_init.GPIO_Pin   = BSP_GPIOF_LED1 | BSP_GPIOF_LED2 | BSP_GPIOF_LED3 | BSP_GPIOF_LED4;
   \   0000000A   5FF47070           MOVS     R0,#+960
   \   0000000E   ADF80000           STRH     R0,[SP, #+0]
    577              gpio_init.GPIO_Speed = GPIO_Speed_50MHz;
   \   00000012   0320               MOVS     R0,#+3
   \   00000014   8DF80200           STRB     R0,[SP, #+2]
    578              gpio_init.GPIO_Mode  = GPIO_Mode_Out_PP;
   \   00000018   1020               MOVS     R0,#+16
   \   0000001A   8DF80300           STRB     R0,[SP, #+3]
    579              GPIO_Init(GPIOF, &gpio_init);
   \   0000001E   6946               MOV      R1,SP
   \   00000020   ....               LDR.N    R0,??DataTable24  ;; 0x40011c00
   \   00000022   ........           _BLF     GPIO_Init,??GPIO_Init??rT
    580          }
   \   00000026   01BD               POP      {R0,PC}          ;; return
    581          
    582          /*
    583          *********************************************************************************************************
    584          *                                             BSP_LED_On()
    585          *
    586          * Description : Turn ON any or all the LEDs on the board.
    587          *
    588          * Argument(s) : led     The ID of the LED to control:
    589          *
    590          *                       0    turn ON all LEDs on the board
    591          *                       1    turn ON LED 1
    592          *                       2    turn ON LED 2
    593          *                       3    turn ON LED 3
    594          *                       4    turn ON LED 4
    595          *
    596          * Return(s)   : none.
    597          *
    598          * Caller(s)   : Application.
    599          *
    600          * Note(s)     : none.
    601          *********************************************************************************************************
    602          */
    603          

   \                                 In segment CODE, align 4, keep-with-next
    604          void  BSP_LED_On (CPU_INT08U led)
    605          {
   \                     BSP_LED_On:
   \   00000000   00B5               PUSH     {LR}
   \   00000002   0100               MOVS     R1,R0
    606              switch (led) {
   \   00000004   ....               LDR.N    R0,??DataTable24  ;; 0x40011c00
   \   00000006   0429               CMP      R1,#+4
   \   00000008   18D8               BHI.N    ??BSP_LED_On_1
   \   0000000A   DFE801F0           TBB      [PC, R1]
   \                     ??BSP_LED_On_0:
   \   0000000E   03080C10           DC8      +3,+8,+12,+16
   \   00000012   1400               DC8      +20,+0
    607                  case 0:
    608                       GPIO_SetBits(GPIOF, BSP_GPIOF_LED1 | BSP_GPIOF_LED2 | BSP_GPIOF_LED3 | BSP_GPIOF_LED4);
   \                     ??BSP_LED_On_2:
   \   00000014   5FF47071           MOVS     R1,#+960
   \   00000018   ........           _BLF     GPIO_SetBits,??GPIO_SetBits??rT
   \   0000001C   00BD               POP      {PC}
    609                       break;
    610          
    611                  case 1:
    612                       GPIO_SetBits(GPIOF, BSP_GPIOF_LED1);
   \                     ??BSP_LED_On_3:
   \   0000001E   4021               MOVS     R1,#+64
   \   00000020   ........           _BLF     GPIO_SetBits,??GPIO_SetBits??rT
   \   00000024   00BD               POP      {PC}
    613                       break;
    614          
    615                  case 2:
    616                       GPIO_SetBits(GPIOF, BSP_GPIOF_LED2);
   \                     ??BSP_LED_On_4:
   \   00000026   8021               MOVS     R1,#+128
   \   00000028   ........           _BLF     GPIO_SetBits,??GPIO_SetBits??rT
   \   0000002C   00BD               POP      {PC}
    617                       break;
    618          
    619                  case 3:
    620                       GPIO_SetBits(GPIOF, BSP_GPIOF_LED3);
   \                     ??BSP_LED_On_5:
   \   0000002E   810D               LSRS     R1,R0,#+22
   \   00000030   ........           _BLF     GPIO_SetBits,??GPIO_SetBits??rT
   \   00000034   00BD               POP      {PC}
    621                       break;
    622          
    623                  case 4:
    624                       GPIO_SetBits(GPIOF, BSP_GPIOF_LED4);
   \                     ??BSP_LED_On_6:
   \   00000036   410D               LSRS     R1,R0,#+21
   \   00000038   ........           _BLF     GPIO_SetBits,??GPIO_SetBits??rT
    625                       break;
    626          
    627                  default:
    628                       break;
    629              }
    630          }
   \                     ??BSP_LED_On_1:
   \   0000003C   00BD               POP      {PC}             ;; return
    631          
    632          /*
    633          *********************************************************************************************************
    634          *                                              BSP_LED_Off()
    635          *
    636          * Description : Turn OFF any or all the LEDs on the board.
    637          *
    638          * Argument(s) : led     The ID of the LED to control:
    639          *
    640          *                       0    turn OFF all LEDs on the board
    641          *                       1    turn OFF LED 1
    642          *                       2    turn OFF LED 2
    643          *                       3    turn OFF LED 3
    644          *                       4    turn OFF LED 4
    645          *
    646          * Return(s)   : none.
    647          *
    648          * Caller(s)   : Application.
    649          *
    650          * Note(s)     : none.
    651          *********************************************************************************************************
    652          */
    653          

   \                                 In segment CODE, align 4, keep-with-next
    654          void  BSP_LED_Off (CPU_INT08U led)
    655          {
   \                     BSP_LED_Off:
   \   00000000   00B5               PUSH     {LR}
   \   00000002   0100               MOVS     R1,R0
    656              switch (led) {
   \   00000004   ....               LDR.N    R0,??DataTable24  ;; 0x40011c00
   \   00000006   0429               CMP      R1,#+4
   \   00000008   18D8               BHI.N    ??BSP_LED_Off_1
   \   0000000A   DFE801F0           TBB      [PC, R1]
   \                     ??BSP_LED_Off_0:
   \   0000000E   03080C10           DC8      +3,+8,+12,+16
   \   00000012   1400               DC8      +20,+0
    657                  case 0:
    658                       GPIO_ResetBits(GPIOF, BSP_GPIOF_LED1 | BSP_GPIOF_LED2 | BSP_GPIOF_LED3 | BSP_GPIOF_LED4);
   \                     ??BSP_LED_Off_2:
   \   00000014   5FF47071           MOVS     R1,#+960
   \   00000018   ........           _BLF     GPIO_ResetBits,??GPIO_ResetBits??rT
   \   0000001C   00BD               POP      {PC}
    659                       break;
    660          
    661                  case 1:
    662                       GPIO_ResetBits(GPIOF, BSP_GPIOF_LED1);
   \                     ??BSP_LED_Off_3:
   \   0000001E   4021               MOVS     R1,#+64
   \   00000020   ........           _BLF     GPIO_ResetBits,??GPIO_ResetBits??rT
   \   00000024   00BD               POP      {PC}
    663                       break;
    664          
    665                  case 2:
    666                       GPIO_ResetBits(GPIOF, BSP_GPIOF_LED2);
   \                     ??BSP_LED_Off_4:
   \   00000026   8021               MOVS     R1,#+128
   \   00000028   ........           _BLF     GPIO_ResetBits,??GPIO_ResetBits??rT
   \   0000002C   00BD               POP      {PC}
    667                       break;
    668          
    669                  case 3:
    670                       GPIO_ResetBits(GPIOF, BSP_GPIOF_LED3);
   \                     ??BSP_LED_Off_5:
   \   0000002E   810D               LSRS     R1,R0,#+22
   \   00000030   ........           _BLF     GPIO_ResetBits,??GPIO_ResetBits??rT
   \   00000034   00BD               POP      {PC}
    671                       break;
    672          
    673                  case 4:
    674                       GPIO_ResetBits(GPIOF, BSP_GPIOF_LED4);
   \                     ??BSP_LED_Off_6:
   \   00000036   410D               LSRS     R1,R0,#+21
   \   00000038   ........           _BLF     GPIO_ResetBits,??GPIO_ResetBits??rT
    675                       break;
    676          
    677                  default:
    678                       break;
    679              }
    680          }
   \                     ??BSP_LED_Off_1:
   \   0000003C   00BD               POP      {PC}             ;; return
    681          
    682          /*
    683          *********************************************************************************************************
    684          *                                            BSP_LED_Toggle()
    685          *
    686          * Description : TOGGLE any or all the LEDs on the board.
    687          *
    688          * Argument(s) : led     The ID of the LED to control:
    689          *
    690          *                       0    TOGGLE all LEDs on the board
    691          *                       1    TOGGLE LED 1
    692          *                       2    TOGGLE LED 2
    693          *                       3    TOGGLE LED 3
    694          *                       4    TOGGLE LED 4
    695          *
    696          * Return(s)   : none.
    697          *
    698          * Caller(s)   : Application.
    699          *
    700          * Note(s)     : none.
    701          *********************************************************************************************************
    702          */
    703          

   \                                 In segment CODE, align 4, keep-with-next
    704          void  BSP_LED_Toggle (CPU_INT08U led)
    7

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -