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.
讓客戶滿意是我們工作的目標(biāo),不斷超越客戶的期望值來自于我們對這個行業(yè)的熱愛。我們立志把好的技術(shù)通過有效、簡單的方式提供給客戶,將通過不懈努力成為客戶在信息化領(lǐng)域值得信任、有價值的長期合作伙伴,公司提供的服務(wù)項目有:主機域名、網(wǎng)站空間、營銷軟件、網(wǎng)站建設(shè)、武都網(wǎng)站維護、網(wǎng)站推廣。
#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?
當(dāng)前文章:nios10_1spcannotdefinestructuretooperatePIO?
文章鏈接:http://aaarwkj.com/article44/iihiee.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站設(shè)計公司、微信小程序、網(wǎng)站營銷、網(wǎng)站建設(shè)、網(wǎng)站導(dǎo)航、響應(yīng)式網(wǎng)站
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)