diff options
author | Camil Staps | 2017-01-31 23:15:28 +0100 |
---|---|---|
committer | Camil Staps | 2017-01-31 23:15:28 +0100 |
commit | 631204a1feffa8cf3795060370b14dfb9f53f533 (patch) | |
tree | 001d32e0157127607f7c088881f098c2eca841a1 /spi_config.h |
Diffstat (limited to 'spi_config.h')
-rw-r--r-- | spi_config.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/spi_config.h b/spi_config.h new file mode 100644 index 0000000..4927a0e --- /dev/null +++ b/spi_config.h @@ -0,0 +1,16 @@ +#include "logger.h" + +#define SPI_MSSP1 + +#define SPI_SDI PORTBbits.RB2 +#define SPI_SDI_TRIS TRISBbits.TRISB2 +#define SPI_SDI_PPS 0x0a + +#define SPI_SCK LATBbits.LATB1 +#define SPI_SCK_TRIS TRISBbits.TRISB1 +#define SPI_SCK_PPS_IN 0x09 +#define SPI_SCK_PPS_OUT RB1PPS + +#define SPI_SDO_PPS RB0PPS +#define SPI_SDO LATBbits.LATB0 +#define SPI_SDO_TRIS TRISBbits.TRISB0 |