BeRTOS
Defines | Functions
spi_bitbang.h File Reference

Emulated SPI driver. More...

#include "cfg/cfg_spi_bitbang.h"
#include <cfg/compiler.h>

Go to the source code of this file.

Defines

#define SPI_LSB_FIRST   1
 Define send and receive order bit.

Functions

void spi_write (const void *buf, size_t len)
 Write.
void spi_read (void *buf, size_t len)
 Read.
uint8_t spi_sendRecv (uint8_t c)
 Send byte c over MOSI line, CONFIG_SPI_DATAORDER first.

Detailed Description

Emulated SPI driver.

Author:
Francesco Sacchi <batt@develer.com>
Daniele Basile <asterix@develer.com>

Definition in file spi_bitbang.h.


Function Documentation

void spi_read ( void *  _buff,
size_t  len 
)

Read.

Parameters:
lenfrom spi, and put it in
_buff.

Definition at line 99 of file spi_bitbang.c.

uint8_t spi_sendRecv ( uint8_t  c)

Send byte c over MOSI line, CONFIG_SPI_DATAORDER first.

SS pin state is left unchanged.

Definition at line 64 of file spi_bitbang.c.

void spi_write ( const void *  _buff,
size_t  len 
)

Write.

Parameters:
lento spi, and take it from
_buff.

Definition at line 112 of file spi_bitbang.c.