aversive_10-03-12/modules/comm/spi/spi.c File Reference

#include <aversive.h>
#include <aversive/parts.h>
#include <aversive/error.h>
#include <stdlib.h>
#include <string.h>
#include <spi.h>
#include <spi_config.h>

Go to the source code of this file.

Typedefs

typedef struct _ss_pin ss_pin_t

Functions

int8_t spi_register_ss_line (volatile uint8_t *port, uint8_t bitnum)
void spi_set_data_order (uint8_t order)
uint8_t spi_get_data_order (void)
void spi_init (spi_mode_t mode, spi_format_t format, spi_clk_rate_t clk_rate)
spi_mode_t spi_get_mode (void)
uint8_t spi_send_and_receive_byte (uint8_t byte)
void spi_send_byte (uint8_t byte)
uint8_t spi_receive_byte (void)
uint8_t spi_slave_select (uint8_t slave)
void spi_slave_deselect (uint8_t slave)
void spi_display_ss_lines (void)


Typedef Documentation

typedef struct _ss_pin ss_pin_t


Function Documentation

void spi_display_ss_lines ( void   ) 

Definition at line 213 of file spi.c.

References DEBUG, E_SPI, and i.

Referenced by main().

uint8_t spi_get_data_order ( void   )  [inline]

Definition at line 88 of file spi.c.

References SPI_LSB_FIRST, and SPI_MSB_FIRST.

spi_mode_t spi_get_mode ( void   )  [inline]

Definition at line 147 of file spi.c.

Referenced by cc2420_init().

void spi_init ( spi_mode_t  mode,
spi_format_t  format,
spi_clk_rate_t  clk_rate 
)

uint8_t spi_receive_byte ( void   ) 

int8_t spi_register_ss_line ( volatile uint8_t *  port,
uint8_t  bitnum 
)

Definition at line 55 of file spi.c.

References DEBUG, E_SPI, and NOTICE.

Referenced by cc2420_init(), and encoders_spi_init().

uint8_t spi_send_and_receive_byte ( uint8_t  byte  ) 

void spi_send_byte ( uint8_t  byte  )  [inline]

void spi_set_data_order ( uint8_t  order  )  [inline]

Definition at line 77 of file spi.c.

References SPI_LSB_FIRST.

Referenced by encoders_spi_init().

void spi_slave_deselect ( uint8_t  slave  ) 

Definition at line 204 of file spi.c.

References FALSE.

Referenced by encoders_spi_manage().

uint8_t spi_slave_select ( uint8_t  slave  ) 

Definition at line 189 of file spi.c.

References E_SPI, EBUSY, ERROR, ESUCCESS, and TRUE.

Referenced by encoders_spi_manage().


Generated on Fri Mar 12 06:32:05 2010 for AVR by  doxygen 1.5.6