Skip to content

Commit f53daf3

Browse files
committed
reworked readme
1 parent 788ce86 commit f53daf3

File tree

2 files changed

+63
-8
lines changed

2 files changed

+63
-8
lines changed

README.md

Lines changed: 63 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,59 @@
1-
# ComDriverSpi
1+
# ComDriverSpi
2+
Library for a SPI wrapper
3+
created by IGB
4+
================================================
25

3-
Created by IGB.
6+
This library allows the user to:
47

5-
Arduino Library for wrapping the SPI class in a simpler way.
6-
Create an object to open a communication channel.
7-
Use the object and its methods to transfer data.
8-
All underlying activities are encapsulated.
8+
* Create an object to open a spi communication channel with underlying complexity encapsulated
9+
* Use the object and its methods to transfer data with automatically setting slave select pins
10+
* Configure for different data sizes arrays, 8bit, 16bit, 32bit
11+
* Configure the other SPI options like frequency
12+
13+
An example is included to get you started.
14+
15+
* **/examples** - Example sketches for the library (.ino). Run these from the Arduino IDE
16+
* **/src** - Source files for the library (.cpp, .h)
17+
* **keywords.txt** - Keywords from this library that will be highlighted in the Arduino IDE
18+
* **library.properties** - General library properties for the Arduino package manager
19+
20+
Documentation
21+
--------------
22+
The library enables the following functions:
23+
24+
#### General methods for class
25+
ComDriverSpi();
26+
ComDriverSpi(uint8_t slaveSelectPin);
27+
ComDriverSpi(uint8_t slaveSelectPin, uint32_t frequency);
28+
29+
#### Write and read to SPI bus
30+
bool writeSpi(uint8_t data[], uint32_t sizeToWrite, transferOption_t transferOption = transferStartEnd);
31+
bool readSpi(uint8_t data[], uint32_t sizeToRead, transferOption_t transferOption = transferStartEnd);
32+
bool writeReadSpi(uint8_t dataWrite[], uint32_t sizeToWrite, uint8_t dataRead[], uint32_t sizeToRead, transferOption_t transferOption = transferStartEnd);
33+
34+
void writeSpiManual(uint8_t dataWrite[], uint32_t sizeToWrite);
35+
void readSpiManual(uint8_t dataRead[], uint32_t sizeToRead);
36+
37+
void writeSpiManual8(uint8_t data);
38+
uint8_t readSpiManual8(void);
39+
void writeSpiManual16(uint16_t data);
40+
uint16_t readSpiManual16(void);
41+
void writeSpiManual32(uint32_t data);
42+
uint32_t readSpiManual32(void);
43+
44+
#### Configuration
45+
void startWriteSpiManual(void);
46+
void endWriteSpiManual(void);
47+
void setSlaveSelectPin(uint8_t slaveSelectPin);
48+
uint8_t getSlaveSelectPin();
49+
void setFrequency(uint32_t frequency);
50+
uint32_t getFrequency();
51+
void setDataMode(uint8_t dataMode);
52+
uint8_t getDataMode();
53+
void setDataOrder(uint8_t dataOrder);
54+
uint8_t getDataOrder();
55+
void setTransferOption(transferOption_t transferOption);
56+
transferOption_t getTransferOption();
957

1058
## Installation
1159

@@ -16,5 +64,12 @@ OR
1664
Download the zip file and copy the contence in to your Arduino's contributed libraries folder found in your sketchbook folder.
1765

1866

19-
## License
20-
This project is unlicensed
67+
License Information
68+
-------------------
69+
This product is _**open source**_!
70+
71+
Please review the LICENSE.md file for license information.
72+
73+
If you have any questions or concerns on licensing, please contact [email protected].
74+
75+
Distributed as-is; no warranty is given.
Binary file not shown.

0 commit comments

Comments
 (0)