中文字幕 另类精品,亚洲欧美一区二区蜜桃,日本在线精品视频免费,孩交精品乱子片免费

<sup id="3hn2b"></sup>

    1. <sub id="3hn2b"><ol id="3hn2b"></ol></sub><legend id="3hn2b"></legend>

      1. <xmp id="3hn2b"></xmp>

      2. 新聞中心

        EEPW首頁 > 嵌入式系統(tǒng) > 設(shè)計應(yīng)用 > Cortex-M3的第一個內(nèi)嵌匯編函數(shù)(MDK環(huán)境)

        Cortex-M3的第一個內(nèi)嵌匯編函數(shù)(MDK環(huán)境)

        作者: 時間:2016-11-20 來源:網(wǎng)絡(luò) 收藏
        #include "memmap.h"
        #include "gpio.h"
        #include "Defination.c"
        u8 i=a;
        __asm u8 plus(u8 a) //注意是兩個“_”
        {
        MOV R1,R0 //由于R0傳遞第一個參數(shù),故將a的值賦給R1寄存器
        ADD R1,#6 //將R1的值加6
        MOV R0,R1 //返回值寫入R0
        BX LR //返回主程序
        }
        int main(void)
        {
        *RCC_APB2ENR=0x00000018;//打開portb和portc的時鐘
        setPORT(&PORTC,0x00000000);
        setPORT(&PORTB,0x00000000);
        delay_Nms(1);
        setBIT(&PORTB,4);//RESET PB4
        LCD_Init();
        DispOneColor(BLACK);
        print("application one is running",cursor_x,cursor_y);
        newline();
        i=plus(i);
        print(&i,cursor_x,cursor_y);
        return(0);
        }



        評論


        相關(guān)推薦

        技術(shù)專區(qū)

        關(guān)閉