NXP 3250 Library - SPI1 and SPI2 routines - polled, and DMA interrupt for IAR in C++

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

NXP 3250 Library - SPI1 and SPI2 routines - polled, and DMA interrupt for IAR in C++

298 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by trichloramine on Tue Nov 04 13:23:48 MST 2014
I have written the code for a SPI interface that has support for multiple chip selects  with  microsecond control over transition times, and clock rates.

A straight forward initialization starts DMA transfer that chains blocks together of up to 4095 bytes apiece though an interrupt handler.

pSpi = new Spi(1, GPIO_16, SPI_CLK(5.32),0,100,8);

support for serial flash and shift registers is included as a derived class. Lots of working, SPI example code.

pFlash = new M25PxxFlash ( GPO_8 | GPO_16 );

polled mode example:

pFlash->CsLow();
pFlash->Send(data);
pFlash->CsHigh();


if you are interested in this part, any or all of the NXP library, please contact me.
标签 (1)
0 项奖励
0 回复数