git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1266 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
c692c27eab
commit
493c21948b
|
@ -45,6 +45,9 @@ static SPIConfig spicfg = {
|
|||
16, IOPORT1, 4, 0
|
||||
};
|
||||
|
||||
static uint8_t txbuf[8] = {0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF};
|
||||
static uint8_t rxbuf[8];
|
||||
|
||||
/*
|
||||
* Entry point, note, the main() function is already a thread in the system
|
||||
* on entry.
|
||||
|
@ -67,6 +70,9 @@ int main(int argc, char **argv) {
|
|||
palSetPadMode(IOPORT1, 4, PAL_MODE_OUTPUT_PUSHPULL);
|
||||
palSetPad(IOPORT1, 4);
|
||||
spiStart(&SPID1, &spicfg);
|
||||
spiSelect(&SPID1);
|
||||
spiExchange(&SPID1, 8, txbuf, rxbuf);
|
||||
spiUnselect(&SPID1);
|
||||
spiStop(&SPID1);
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue