#include "sysconfig.h"
#include "spi.h"
Functions | |
| void | SPI_MasterInit (void) |
| SPI_MasterInit This function is used to Initialize the Chip's SPI as the Master. | |
| void | SPI_CS_high (int ChipSelect) |
| SPI_SlaveInit This function is used to Initialize the Chip's SPI as a Slave. | |
| void | SPI_CS_low (int ChipSelect) |
| SPI_CS_low This function is used to set a specific Chipselect to LOW. | |
| char | SPI_MasterTransmit (int ChipSelect, char cData) |
| SPI_MasterTransmit This function is used to Transmit Data via SPI (This is only working as Master, receiving is implemented as pseudo-reading) . | |
It contains all functions which are neccessary to handle SPI
It handles outputs/inputs with Master/Slave selecting.
It is Controller specific (only for AVR90USB)
| void SPI_CS_high | ( | int | ChipSelect | ) |
SPI_SlaveInit This function is used to Initialize the Chip's SPI as a Slave.
| void |
| ChipSelect | The ChipSelect PIN we want to drive to High |
References SPI_PORT.
Referenced by init().
| void SPI_CS_low | ( | int | ChipSelect | ) |
SPI_CS_low This function is used to set a specific Chipselect to LOW.
| ChipSelect | The ChipSelect PIN we want to drive to Low |
References SPI_PORT.
| void SPI_MasterInit | ( | void | ) |
SPI_MasterInit This function is used to Initialize the Chip's SPI as the Master.
| void |
References DD_SPI_MISO, DD_SPI_MOSI, DD_SPI_SCK, DD_SPI_SS, DDR_SPI, PROPER_SPICON1, and SPI_PORT.
Referenced by main().
| char SPI_MasterTransmit | ( | int | ChipSelect, | |
| char | cData | |||
| ) |
SPI_MasterTransmit This function is used to Transmit Data via SPI (This is only working as Master, receiving is implemented as pseudo-reading)
.
| ChipSelect | The ChipSelect PIN we need to drive to LOW to select the other Slave-Chip We drive it to HIGH again after the communication is finished. | |
| cData | The Byte we want to send via SPI |
References my_delay(), and SPI_PORT.
Referenced by get_temperature(), init_lcd(), lcd_clear(), lcd_send_bitmask(), lcd_send_char(), and lcd_set_start().
1.5.8