|
@@ -37,6 +37,25 @@ static inline void nbus_app_TIM_periodElapsed(){
|
|
|
```
|
|
```
|
|
|
### Practical integration
|
|
### Practical integration
|
|
|
|
|
|
|
|
|
|
+**Include file**
|
|
|
|
|
+Copy file ``nbus_config.h.default`` to your project and rename it to ``nbus_config.h``
|
|
|
|
|
+These are important configuration settings:
|
|
|
|
|
+- MODULE_ADDRESS - address of module. Allowed values are from 1 to 31
|
|
|
|
|
+- MODULE_MASTER - Master module functionality. Allowed values are 0,1.
|
|
|
|
|
+- MODULE_SLAVE - Slave module functionality. Allowed values are 0,1.
|
|
|
|
|
+- MODULE_NAME - name of developed module. Max 8 chars.
|
|
|
|
|
+- MODULE - type of slave module. Use of these constat
|
|
|
|
|
+ - MODULE_DUMMY
|
|
|
|
|
+ - MODULE_FSR
|
|
|
|
|
+ - MODULE_IMU
|
|
|
|
|
+ - MODULE_GNOSTIC_DISTANCE
|
|
|
|
|
+- UART_BAUDRATE - Uart baudrate. This communication speed have to be set in your application
|
|
|
|
|
+
|
|
|
|
|
+Include following header file to project:
|
|
|
|
|
+```c
|
|
|
|
|
+#include "nbus_app.h"
|
|
|
|
|
+```
|
|
|
|
|
+
|
|
|
**Create platform driver**
|
|
**Create platform driver**
|
|
|
```c
|
|
```c
|
|
|
nBusPlatformInterface_t hw_platform ={
|
|
nBusPlatformInterface_t hw_platform ={
|
|
@@ -90,10 +109,11 @@ nbus_init_memory_driver(&memory_ec20, 16); // pass memory driver to nBus
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
***Run application stack***
|
|
***Run application stack***
|
|
|
-
|
|
|
|
|
|
|
+The function ``nbus_stack()`` contains of application loop.
|
|
|
```c
|
|
```c
|
|
|
nbus_stack();
|
|
nbus_stack();
|
|
|
```
|
|
```
|
|
|
|
|
+
|
|
|
## nBus interface
|
|
## nBus interface
|
|
|
nBus interface is pointer to structure ``nBusAppInterface_t``. It contains these functions:
|
|
nBus interface is pointer to structure ``nBusAppInterface_t``. It contains these functions:
|
|
|
- ``void init(void *hw_interface, void *hw_config);``
|
|
- ``void init(void *hw_interface, void *hw_config);``
|