AppNearMe µNFC stack for the NXP PN532 chip License: You can use the stack free of charge to prototype with mbed; if you want to use the stack with your commercial product, get in touch!
Dependents: IOT_sensor_nfc AppNearMe_MuNFC_PN532_Test p2p_nfc_test NFCMoodLamp ... more
License
You can use the stack free of charge to prototype with mbed; if you want to use the stack with your commercial product, get in touch!
PN532/munfc/platform/spi.h
- Committer:
- AppNearMe
- Date:
- 2013-01-15
- Revision:
- 13:6f98851e025b
- Parent:
- 11:5be631376e5b
File content as of revision 13:6f98851e025b:
/* spi.h Copyright (c) Donatien Garnier 2012 donatien.garnier@appnearme.com http://www.appnearme.com/ */ #ifndef SPI_H_ #define SPI_H_ #ifdef __cplusplus extern "C" { #endif #include "core/fwk.h" //These functions must be implemented for each platform /* * After skipping outSkip bytes, write outLen bytes * After skipping inSkip bytes, read inLen bytes * This will generate MAX(outSkip + outLen, inSkip + inLen) transfers on the SPI bus */ int spi_transfer( uint8_t* outBuf, size_t outLen, size_t outSkip, uint8_t* inBuf, size_t inLen, size_t inSkip ); /* * Write outLen bytes */ int spi_write( uint8_t* outBuf, size_t outLen ); /* * Read inLen bytes */ int spi_read( uint8_t* inBuf, size_t inLen ); /* * Skip len bytes */ int spi_skip( size_t len ); #ifdef __cplusplus } #endif #endif /* SPI_H_ */