mirror of
https://github.com/arduino/Arduino.git
synced 2024-12-01 12:24:14 +01:00
[sam] SPI library: added SPI_HAS_EXTENDED_CS_PIN_HANDLING flag
This allows to check if SPI provides extended API to allow automatic CS pin handling.
This commit is contained in:
parent
11cf45d6d6
commit
848dd39313
@ -15,10 +15,24 @@
|
||||
#include "variant.h"
|
||||
#include <stdio.h>
|
||||
|
||||
// SPI_HAS_TRANSACTION means SPI has beginTransaction(), endTransaction(),
|
||||
// usingInterrupt(), and SPISetting(clock, bitOrder, dataMode)
|
||||
// SPI_HAS_TRANSACTION means SPI has
|
||||
// - beginTransaction()
|
||||
// - endTransaction()
|
||||
// - usingInterrupt()
|
||||
// - SPISetting(clock, bitOrder, dataMode)
|
||||
#define SPI_HAS_TRANSACTION 1
|
||||
|
||||
// SPI_HAS_EXTENDED_CS_PIN_HANDLING means SPI has automatic
|
||||
// CS pin handling and provides the following methods:
|
||||
// - begin(pin)
|
||||
// - end(pin)
|
||||
// - setBitOrder(pin, bitorder)
|
||||
// - setDataMode(pin, datamode)
|
||||
// - setClockDivider(pin, clockdiv)
|
||||
// - transfer(pin, data, SPI_LAST/SPI_CONTINUE)
|
||||
// - beginTransaction(pin, SPISettings settings) (if transactions are available)
|
||||
#define SPI_HAS_EXTENDED_CS_PIN_HANDLING 1
|
||||
|
||||
#define SPI_MODE0 0x02
|
||||
#define SPI_MODE1 0x00
|
||||
#define SPI_MODE2 0x03
|
||||
|
Loading…
Reference in New Issue
Block a user