收藏了. 就是为了SPI而来的. |
在pl022程序中的probe函数里面,添加数据传说代码就可以看到波形了 #if 1 //disable spi //pl022->virtbase = 0xf005b000; writew((readw(SSP_CR1(pl022->virtbase)) & (~SSP_CR1_MASK_SSE)), SSP_CR1(pl022->virtbase)); //set master writew((readw(SSP_CR1(pl022->virtbase)) & (~SSP_CR1_MASK_MS)), SSP_CR1(pl022->virtbase)); //enable spi writew((readw(SSP_CR1(pl022->virtbase)) | (SSP_CR1_MASK_SSE)), SSP_CR1(pl022->virtbase)); for(hp=0;hp<10;hp++) { if(spitxbf1 == 0x5a5a) spitxbf1 = 0xaa55; else spitxbf1 = 0x5a5a; pl022->tx = &spitxbf1; readwriter(pl022); writew((*(u16 *) (pl022->tx)), SSP_DR(pl022->virtbase)); a = readw(SSP_DR(pl022->virtbase)); } #endif |
|手机版|小黑屋|深圳市九鼎创展科技官方论坛
( 粤ICP备11028681号-2 )
GMT+8, 2025-5-20 02:58 , Processed in 0.018809 second(s), 21 queries .
Powered by Discuz! X3.2
© 2001-2013 Comsenz Inc.