Skip to content

Commit 91303f9

Browse files
committed
README adapted to new structure.
#31
1 parent 00a321d commit 91303f9

File tree

1 file changed

+50
-32
lines changed

1 file changed

+50
-32
lines changed

README.md

Lines changed: 50 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ More information can be found on the main site http://www.vscp.org
2828
The VSCP software framework for level 1 devices provides several layers according to the [VSCP specification](https://docs.vscp.org/spec/latest).
2929

3030
### Core
31-
![core-diagram](https://github.com/BlueAndi/vscp-framework/blob/master/vscp/doc/doxfiles/vscp_modules.png)
31+
![core-diagram](https://github.com/BlueAndi/vscp-framework/blob/master/doc/doxfiles/vscp_modules.png)
3232

3333
* The core functionality which has a built-in state machine to handle different use cases of the protocol and etc. (vscp\_core.[ch]). Right now it supports every mandatory event and some minor optional ones.
3434
* The decision matrix is handled separately (vscp\_dm.[ch]). It contains the standard decision matrix, as described in the VSCP specification and contains an additional extension.
@@ -57,7 +57,7 @@ how VSCP is integrated into your software:
5757
Templates exists for all of them, which makes it much easier to adapt it and less time. See in the templates folder.
5858

5959
### Event abstraction
60-
![core-diagram](https://github.com/BlueAndi/vscp-framework/blob/master/vscp/doc/doxfiles/vscp_event_modules.png)
60+
![core-diagram](https://github.com/BlueAndi/vscp-framework/blob/master/doc/doxfiles/vscp_event_modules.png)
6161

6262
Using only the core, you have to assemble the VSCP events by yourself. If you want to deal only with parameter, which are
6363
VSCP independent, use the next upper layer, the event abstraction modules.
@@ -142,32 +142,25 @@ vscp_dev_data_config_overwrite.h
142142
## Structure
143143

144144
<pre>
145-
+---common (Common sourcecode, used for examples and projects)
146-
| +---avr (Common sourcecode for Atmel AVR microcontrollers)
147-
| \---pc (Common sourcecode for PC)
145+
+---doc (Documentation)
146+
| +---doxfiles (Doxygen related files)
147+
| \---html (Doxygen generated documentation in HTML)
148148
+---examples (Examples which are showing how to use the VSCP framework)
149149
| +---arm (Examples with ARM based microcontrollers)
150-
| +---avr (Examples with Atmel AVR microcontrollers)
151-
| \---pc (PC example for windows and linux)
152-
+---projects (Projects)
153-
| +---avr (Projects with Atmel AVR microcontrollers)
154-
| \---pc (PC projects)
155-
+---tools (General tools, used by examples and projects)
156-
| \---xslt (XML transformation processor)
157-
\---vscp (VSCP framework)
158-
+---doc (Documentation)
159-
| +---doxfiles (Doxygen related files)
160-
| \---html (Doxygen generated documentation in HTML)
161-
+---events (These modules are using the VSCP core to send CLASS1 dedicated events)
162-
+---templates (Templates of the files, which the user shall adapt to its needs)
163-
\---test (Test of the VSCP framework)
150+
| \---avr (Examples with Atmel AVR microcontrollers)
151+
|---src (VSCP framework)
152+
| \---events (These modules are using the VSCP core to send CLASS1 dedicated events)
153+
+---templates (Templates of the files, which the user shall adapt to its needs)
154+
|---test (Test of the VSCP framework)
155+
\---tools (General tools, used by examples and projects)
156+
\---xslt (XML transformation processor)
164157
</pre>
165158

166159
## Getting started
167160

168161
This part shows you how to get the VSCP framework working in a "minimal" way:
169162

170-
1. [Copy the VSCP framework to your project](https://github.com/BlueAndi/vscp-framework/blob/master/README.md#copy-the-vscp-framework-to-your-project)
163+
1. [Get the VSCP framework to your project](https://github.com/BlueAndi/vscp-framework/blob/master/README.md#get-the-vscp-framework-to-your-project)
171164
2. [Initialization of the VSCP framework](https://github.com/BlueAndi/vscp-framework/blob/master/README.md#initialization-of-the-vscp-framework)
172165
3. [Processing of the VSCP framework](https://github.com/BlueAndi/vscp-framework/blob/master/README.md#processing-of-the-vscp-framework)
173166
4. [VSCP framework timer](https://github.com/BlueAndi/vscp-framework/blob/master/README.md#vscp-framework-timer)
@@ -177,18 +170,43 @@ This part shows you how to get the VSCP framework working in a "minimal" way:
177170
8. [Persistent memory](https://github.com/BlueAndi/vscp-framework/blob/master/README.md#persistent-memory)
178171
9. [Ready to run](https://github.com/BlueAndi/vscp-framework/blob/master/README.md#ready-to-run)
179172

180-
### Copy the VSCP framework to your project
173+
### 1 Get the VSCP framework to your project
181174

182-
1. Copy or link the VSCP framework (./vscp and ./vscp/events) to your project.
183-
2. Copy (!!do not link!!) all necessary template files (./vscp/templates) to your project. Recommended is a sub-directory "vscp_user".
175+
There are 3 possible integrations listed, there may be more of course.
176+
177+
#### 1.1 Possibility 1: Copy it
178+
179+
1. Copy or link the VSCP framework (./src and ./src/events) to your project.
180+
2. Copy (!!do not link!!) all necessary template files (./templates) to your project. Recommended is a sub-directory "vscp_user".
184181
3. Update your makefile or your project configuration.
185-
186-
### Initialization of the VSCP framework
182+
183+
#### 1.2 Possibility 2: git submodule
184+
185+
Initial add it.
186+
```
187+
git submodule add https://github.com/BlueAndi/vscp-framework
188+
```
189+
Later update it.
190+
```
191+
git submodule update --remote
192+
```
193+
194+
#### 1.3 Possibility 3: PlatformIO
195+
196+
Add ```vscp-framework``` with the required version to the platformio.ini configuration. Find more informations in the [PlatformIO documentation](https://docs.platformio.org/en/latest/projectconf/section_env_library.html#lib-deps).
197+
198+
Example:
199+
```
200+
lib_deps =
201+
vscp-framework @ 2.0.0
202+
```
203+
204+
### 2 Initialization of the VSCP framework
187205

188206
The VSCP framework has to be initialized, before any function is used. This is simply done
189207
by calling the function vscp\_core\_init() during start-up.
190208

191-
### Processing of the VSCP framework
209+
### 3 Processing of the VSCP framework
192210

193211
The VSCP framework has to be called periodically to be able to react on incoming events.
194212
Call the process routine vscp\_core\_process() in a constant cyclic period. The period should be
@@ -197,7 +215,7 @@ communication bus, the event load on the bus and etc.
197215

198216
The process routine handle all received VSCP events.
199217

200-
### VSCP framework timer
218+
### 4 VSCP framework timer
201219

202220
VSCP specifies several timing behaviour in different use cases. Therefore the framework needs some
203221
timers to achieve it.
@@ -216,29 +234,29 @@ Call the timer processing routine equal or lower than 1 s.
216234
Note, that never call vscp\_process() with a lower period, than vscp\_timer\_process(). Because vscp\_process() reacts
217235
on timer timeouts and vscp\_timer\_process() decrease only the timers, but doesn't do more.
218236

219-
### VSCP transport adaption
237+
### 5 VSCP transport adaption
220238

221239
Now its time to connect the VSCP framework to the communication bus. This can be done by implementing the transport
222240
adapter in the vscp\_tp\_adapter.c template file.
223241

224-
### Control the VSCP lamp
242+
### 6 Control the VSCP lamp
225243

226244
To see that something is happen on your embedded device, next step is to control the VSCP lamp (in most cases a LED).
227245
Update the function vscp\_portable\_setLampState() in the vscp\_portable.c module.
228246

229-
### Connect the initialization button
247+
### 7 Connect the initialization button
230248

231249
According to the VSCP specification, every embedded device should have a button to start the segment initialization.
232250
Hopefully you have one right now :-) and if it is pressed, call the function vscp\_core\_startNodeSegmentInit() in the
233251
vscp\_core.c module.
234252

235-
### Persistent memory
253+
### 8 Persistent memory
236254

237255
It is important that the VSCP framework can store data in a persistent memory, e.g. an EEPROM. Implement in the
238256
vscp\_ps\_access.c module the low level access to the persistent memory. Its quite easy, because only byte access
239257
functions are used, so you have one read and one write function to adapt.
240258

241-
### Ready to run
259+
### 9 Ready to run
242260

243261
Now the minimal sub set is done and your node hopefully starts up with a nickname discovery.
244262

0 commit comments

Comments
 (0)