#include "pic_utils.h"
#include "config.h"
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) |
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.
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().
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().