spi_hw.h File Reference

#include "pic_utils.h"
#include "config.h"
Include dependency graph for spi_hw.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void spi_hw_init ()
uns8 spi_hw_receive ()
void spi_hw_setup_io ()
void spi_hw_transmit (uns8 data)

Detailed Description

Serial Peripheral Interface (HW) routines

Put the following into your config.h

define SPI_HW_MASTER_MODE or define SPI_HW_SLAVE_MODE

In slave mode, we can use ss: define SPI_HW_USE_SS

In master mode, we need to define clock define SPI_HW_MASTER_CLOCK_TMR2_DIV_2 define SPI_HW_MASTER_CLOCK_FOSC_DIV_64 define SPI_HW_MASTER_CLOCK_FOSC_DIV_16 define SPI_HW_MASTER_CLOCK_FOSC_DIV_4

Definition in file spi_hw.h.


Function Documentation

void spi_hw_init (  ) 

Definition at line 82 of file i2c_hw.c.

uns8 spi_hw_receive (  ) 

Definition at line 106 of file i2c_hw.c.

References spi_hw_transmit().

Referenced by mrf24j40_long_addr_read(), and mrf24j40_short_addr_read().

Here is the call graph for this function:

Here is the caller graph for this function:

void spi_hw_setup_io (  ) 

Definition at line 40 of file i2c_hw.c.

References make_input, and make_output.

void spi_hw_transmit ( uns8  data  ) 

Definition at line 91 of file i2c_hw.c.

Referenced by mrf24j40_long_addr_read(), mrf24j40_long_addr_write(), mrf24j40_short_addr_read(), mrf24j40_short_addr_write(), and spi_hw_receive().

Here is the caller graph for this function:


Generated on Wed Dec 8 13:47:50 2010 for Pic Pack by  doxygen 1.6.1