Outputs SPI-like interfaces (clock+data). More...
#include "pic_utils.h"
#include "config.h"
Go to the source code of this file.
Functions | |
void | spi_pulse_0 () |
SPI test routine. | |
void | spi_pulse_1 () |
SPI test routine. | |
void | spi_setup () |
Setup ports and pins for SPI output. | |
void | spi_write (uns8 data) |
Send a byte of data using software spi. | |
void | spi_write_lsb (uns8 data) |
Send a byte of data using software spi. | |
void | spi_write_sure (uns8 data) |
SPI write for Sure devices. |
Covers standard SPI-like interfaces (clock + data) and Sure Electronics displays which are a little different
Definition in file spi.h.
void spi_pulse_0 | ( | ) |
Definition at line 90 of file spi.c.
References change_pin, clear_pin, and set_pin.
void spi_pulse_1 | ( | ) |
Definition at line 96 of file spi.c.
References change_pin, clear_pin, and set_pin.
void spi_setup | ( | ) |
Setup ports and pins for SPI output
Definition at line 69 of file spi.c.
Referenced by hc4led_setup(), and sure_7seg_setup().
void spi_write | ( | uns8 | data | ) |
Sends a byte of data MSB first, data only changes on clock low
Definition at line 41 of file spi.c.
References change_pin, clear_pin, set_pin, and uns8.
Referenced by hc4led_write_str().
void spi_write_lsb | ( | uns8 | data | ) |
void spi_write_sure | ( | uns8 | data | ) |
SPI write byte for Sure devices. Sure devices do things a little differently. Data goes LSB first but data changes on clock high.
Definition at line 75 of file spi.c.
References change_pin, clear_pin, set_pin, and uns8.
Referenced by sure_7seg_write_str().