From 2b793551da411dfc0534322b9b7c1b03766fca6e Mon Sep 17 00:00:00 2001 From: Marti Bolivar Date: Mon, 29 Aug 2011 19:45:55 -0400 Subject: hardwarespi: Add docs on SPI modes. --- source/lang/api/hardwarespi.rst | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/lang/api') diff --git a/source/lang/api/hardwarespi.rst b/source/lang/api/hardwarespi.rst index 3e71fb6..f90fc07 100644 --- a/source/lang/api/hardwarespi.rst +++ b/source/lang/api/hardwarespi.rst @@ -57,6 +57,10 @@ The speed at which the SPI port communicates is configured using a .. note:: Due to hardware issues, you can't use the frequency ``SPI_140_625KHz`` with SPI port 1. +The "mode" value determines the clock phase and polarity, like so: + +.. doxygenenum:: spi_mode + You'll need to determine the correct values for ``frequency``, ``bitOrder``, and ``mode`` yourself, by consulting the datasheet for the device you're communicating with. Continuing our example from -- cgit v1.2.3