nios10_1spcannotdefinestructuretooperatePIO?

this days i approch a promble that when using a structure in nios 10.1sp to operate pio,but i doesn't work at all. The details as flowing.

讓客戶滿意是我們工作的目標,不斷超越客戶的期望值來自于我們對這個行業(yè)的熱愛。我們立志把好的技術通過有效、簡單的方式提供給客戶,將通過不懈努力成為客戶在信息化領域值得信任、有價值的長期合作伙伴,公司提供的服務項目有:主機域名、網站空間、營銷軟件、網站建設、武都網站維護、網站推廣。

#define PIO_LED_BASE 0x101000

i define a structure for pio like this.

typedef struct{
 volatile unsigned long int DATA;
 volatile unsigned long int DIRECTION;
 volatile unsigned long int INTERRUPT_MASK;
 volatile unsigned long int EDGE_CAPTURE;
}LED_REG;

void led_reg_write(void)
{
 unsigned char i;

 for(i = 0; i < 8; i += 1){
  LED -> DATA = 1 << i;
  usleep(2000000);
 }
}

int main()
{
 while(1)
  led_reg_write();
}

my program is to shift the led one by one,but i doesn't work at all.

Is that a problem of the nios 10.1sp? Is there somebody met the same problem before?

當前文章:nios10_1spcannotdefinestructuretooperatePIO?
文章鏈接:http://bm7419.com/article44/iihiee.html

成都網站建設公司_創(chuàng)新互聯,為您提供網站設計公司微信小程序、網站營銷網站建設、網站導航響應式網站

廣告

聲明:本網站發(fā)布的內容(圖片、視頻和文字)以用戶投稿、用戶轉載內容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網站立場,如需處理請聯系客服。電話:028-86922220;郵箱:631063699@qq.com。內容未經允許不得轉載,或轉載時需注明來源: 創(chuàng)新互聯

外貿網站制作