Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Pelnar <robert.pelnar@seznam.cz>2017-08-17 16:23:34 +0300
committerRobert Pelnar <robert.pelnar@seznam.cz>2017-08-17 16:23:34 +0300
commit683784c4c7d92f352c65b53e750b48fb50d2354b (patch)
tree0545097a1aa6bd19850b09158ba716f0f98e59a3 /Firmware/swspi.h
parenta7477673de5ee67b09d04a8c81129ebd5345ebb7 (diff)
PAT9125 I2C, hardware SG homing
separate pin configuration file for each board changed board codes: RAMBO =100, MiniRambo1.0 =200, MiniRambo1.3 = 203, Einy03 =303, Einy04 =304
Diffstat (limited to 'Firmware/swspi.h')
-rwxr-xr-xFirmware/swspi.h47
1 files changed, 9 insertions, 38 deletions
diff --git a/Firmware/swspi.h b/Firmware/swspi.h
index ba75d2bb0..f95665c46 100755
--- a/Firmware/swspi.h
+++ b/Firmware/swspi.h
@@ -1,43 +1,14 @@
+// Software SPI
#ifndef SWSPI_H
#define SWSPI_H
-//#define SWSPI_RPI
-#define SWSPI_AVR
-
-#ifdef SWSPI_RPI
-//#define SWSPI_MISO 9
-#define SWSPI_MISO 10
-#define SWSPI_MOSI 10
-#define SWSPI_SCK 11
-#define SWSPI_CS 7
-#endif //SWSPI_RPI
-
-#ifdef SWSPI_AVR
-#endif //SWSPI_AVR
-
-#define SWSPI_POL 1 //polarity
-#define SWSPI_PHA 0 //phase
-#define SWSPI_DOR 0 //data order
-#define SWSPI_DEL 2 //delay
-
-
-void swspi_init();
-
-#if (SWSPI_MOSI == SWSPI_MISO)
-
-void swspi_tx(unsigned char tx);
-unsigned char swspi_rx();
-
-#else //(SWSPI_MOSI == SWSPI_MISO)
-
-#define swspi_tx swspi_txrx
-#define swspi_rx swspi_txrx
-unsigned char swspi_txrx(unsigned char tx);
-
-#endif //(SWSPI_MOSI == SWSPI_MISO)
-
-void swspi_start();
-void swspi_stop();
-
+//initialize gpio
+extern void swspi_init(unsigned char miso, unsigned char mosi, unsigned char sck, unsigned char cfg);
+//transmit and receive (full duplex mode)
+extern unsigned char swspi_txrx(unsigned char tx);
+//transmit (half dublex mode, miso == mosi)
+extern void swspi_tx(unsigned char tx);
+//receive (half dublex mode, miso == mosi)
+extern unsigned char swspi_rx();
#endif //SWSPI_H