From c0090716995447bd59954c8a7e24cd5c20598f7a Mon Sep 17 00:00:00 2001 From: joeycastillo Date: Thu, 27 Jan 2022 15:47:25 +0000 Subject: deploy: 29fa6052831f8d26815405d4652b5799e3c74147 --- group__spi.html | 225 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 225 insertions(+) create mode 100644 group__spi.html (limited to 'group__spi.html') diff --git a/group__spi.html b/group__spi.html new file mode 100644 index 00000000..e7956106 --- /dev/null +++ b/group__spi.html @@ -0,0 +1,225 @@ + + + + + + + +Sensor Watch: SPI Controller Driver + + + + + + + + + +
+
+ + + + + + +
+
Sensor Watch +  0.0.0 +
+
A board replacement for the classic Casio F-91W wristwatch, powered by a Microchip SAM L22 microcontroller.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
SPI Controller Driver
+
+
+ +

This section covers functions related to the SAM L22's built-in SPI driver, including configuring the SPI bus and writing to / reading from devices. +More...

+ + + + + + + + + + + + + + + + + +

+Functions

+void watch_enable_spi (void)
 Enables the SPI peripheral. Call this before attempting to interface with SPI devices.
 
+void watch_disable_spi (void)
 Disables the SPI peripheral.
 
bool watch_spi_write (const uint8_t *buf, uint16_t length)
 Writes a series of values to a device on the SPI bus. More...
 
bool watch_spi_read (uint8_t *buf, uint16_t length)
 Reads a series of values from a device on the SPI bus. More...
 
bool watch_spi_transfer (const uint8_t *data_out, uint8_t *data_in, uint16_t length)
 Reads a series of values from a device on the SPI bus. More...
 
+

Detailed Description

+

This section covers functions related to the SAM L22's built-in SPI driver, including configuring the SPI bus and writing to / reading from devices.

+

Function Documentation

+ +

◆ watch_spi_read()

+ +
+
+ + + + + + + + + + + + + + + + + + +
bool watch_spi_read (uint8_t * buf,
uint16_t length 
)
+
+ +

Reads a series of values from a device on the SPI bus.

+
Parameters
+ + + +
bufStorage for the incoming bytes; on return, it will contain the received data.
lengthThe number of bytes that you wish to receive.
+
+
+
Note
This function does not manage the chip select pin (usually A3).
+ +
+
+ +

◆ watch_spi_transfer()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool watch_spi_transfer (const uint8_t * data_out,
uint8_t * data_in,
uint16_t length 
)
+
+ +

Reads a series of values from a device on the SPI bus.

+
Parameters
+ + + +
bufStorage for the incoming bytes; on return, it will contain the received data.
lengthThe number of bytes that you wish to receive.
+
+
+
Note
This function does not manage the chip select pin (usually A3).
+ +
+
+ +

◆ watch_spi_write()

+ +
+
+ + + + + + + + + + + + + + + + + + +
bool watch_spi_write (const uint8_t * buf,
uint16_t length 
)
+
+ +

Writes a series of values to a device on the SPI bus.

+
Parameters
+ + + +
bufA series of unsigned bytes; the data you wish to transmit.
lengthThe number of bytes in buf that you wish to send.
+
+
+
Note
This function does not manage the chip select pin (usually A3).
+ +
+
+
+ + + + -- cgit v1.2.3