Contiki-NG
Functions

Implementation of the platform-independent aspects of the SPI HAL. More...

#include <dev/spi.h>
#include "contiki.h"
#include <stdint.h>
#include <stdbool.h>

Go to the source code of this file.

Functions

spi_status_t spi_acquire (const spi_device_t *dev)
 Locks and then opens an SPI controller. More...
 
spi_status_t spi_release (const spi_device_t *dev)
 Closes and then unlocks an SPI controller. More...
 
spi_status_t spi_select (const spi_device_t *dev)
 Selects the SPI peripheral. More...
 
spi_status_t spi_deselect (const spi_device_t *dev)
 Deselects the SPI peripheral. More...
 
bool spi_has_bus (const spi_device_t *dev)
 Checks if a device has locked an SPI controller. More...
 
spi_status_t spi_write_byte (const spi_device_t *dev, uint8_t data)
 Writes a single byte to an SPI device. More...
 
spi_status_t spi_write (const spi_device_t *dev, const uint8_t *data, int size)
 Writes a buffer to an SPI device. More...
 
spi_status_t spi_read_byte (const spi_device_t *dev, uint8_t *data)
 Reads a single byte from an SPI device. More...
 
spi_status_t spi_read (const spi_device_t *dev, uint8_t *data, int size)
 Reads a buffer from an SPI device. More...
 
spi_status_t spi_read_skip (const spi_device_t *dev, int size)
 Reads and ignores data from an SPI device. More...
 
spi_status_t spi_transfer (const spi_device_t *dev, const uint8_t *data, int wsize, uint8_t *buf, int rsize, int ignore)
 Performs a generic SPI transfer. More...
 
spi_status_t spi_read_register (const spi_device_t *dev, uint8_t reg, uint8_t *data, int size)
 Reads a buffer of bytes from a register of an SPI device. More...
 
spi_status_t spi_strobe (const spi_device_t *dev, uint8_t strobe, uint8_t *status)
 Reads and Writes one byte from/to an SPI device. More...
 

Detailed Description

Implementation of the platform-independent aspects of the SPI HAL.

Definition in file spi.c.