You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* 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.
34
34
* 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:
57
57
Templates exists for all of them, which makes it much easier to adapt it and less time. See in the templates folder.
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
187
205
188
206
The VSCP framework has to be initialized, before any function is used. This is simply done
189
207
by calling the function vscp\_core\_init() during start-up.
190
208
191
-
### Processing of the VSCP framework
209
+
### 3 Processing of the VSCP framework
192
210
193
211
The VSCP framework has to be called periodically to be able to react on incoming events.
194
212
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.
197
215
198
216
The process routine handle all received VSCP events.
199
217
200
-
### VSCP framework timer
218
+
### 4 VSCP framework timer
201
219
202
220
VSCP specifies several timing behaviour in different use cases. Therefore the framework needs some
203
221
timers to achieve it.
@@ -216,29 +234,29 @@ Call the timer processing routine equal or lower than 1 s.
216
234
Note, that never call vscp\_process() with a lower period, than vscp\_timer\_process(). Because vscp\_process() reacts
217
235
on timer timeouts and vscp\_timer\_process() decrease only the timers, but doesn't do more.
218
236
219
-
### VSCP transport adaption
237
+
### 5 VSCP transport adaption
220
238
221
239
Now its time to connect the VSCP framework to the communication bus. This can be done by implementing the transport
222
240
adapter in the vscp\_tp\_adapter.c template file.
223
241
224
-
### Control the VSCP lamp
242
+
### 6 Control the VSCP lamp
225
243
226
244
To see that something is happen on your embedded device, next step is to control the VSCP lamp (in most cases a LED).
227
245
Update the function vscp\_portable\_setLampState() in the vscp\_portable.c module.
228
246
229
-
### Connect the initialization button
247
+
### 7 Connect the initialization button
230
248
231
249
According to the VSCP specification, every embedded device should have a button to start the segment initialization.
232
250
Hopefully you have one right now :-) and if it is pressed, call the function vscp\_core\_startNodeSegmentInit() in the
233
251
vscp\_core.c module.
234
252
235
-
### Persistent memory
253
+
### 8 Persistent memory
236
254
237
255
It is important that the VSCP framework can store data in a persistent memory, e.g. an EEPROM. Implement in the
238
256
vscp\_ps\_access.c module the low level access to the persistent memory. Its quite easy, because only byte access
239
257
functions are used, so you have one read and one write function to adapt.
240
258
241
-
### Ready to run
259
+
### 9 Ready to run
242
260
243
261
Now the minimal sub set is done and your node hopefully starts up with a nickname discovery.
0 commit comments