Skip to content

Commit

Permalink
introduce zstack-lib
Browse files Browse the repository at this point in the history
  • Loading branch information
nurikk committed Aug 2, 2020
1 parent 4e04959 commit af3fd2f
Show file tree
Hide file tree
Showing 15 changed files with 113 additions and 468 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "zstack-lib"]
path = zstack-lib
url = [email protected]:diyruz/zstack-lib.git
2 changes: 1 addition & 1 deletion .release-it.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ git:
requireCleanWorkingDir: false
github:
release: true
assets: ["firmwares/*.hex"]
assets: ["firmwares/FreePad_*_Keys.hex"]
draft: true
58 changes: 43 additions & 15 deletions CC2530DB/GenericApp.ewp
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,7 @@
<name>CCIncludePath2</name>
<state>$PROJ_DIR$</state>
<state>$PROJ_DIR$\..\Source</state>
<state>$PROJ_DIR$\..\zstack-lib</state>
<state>$PROJ_DIR$\..\..\Source</state>
<state>$PROJ_DIR$\..\..\..\ZMain\TI2530DB</state>
<state>$PROJ_DIR$\..\..\..\..\..\Components\hal\include</state>
Expand Down Expand Up @@ -1608,6 +1609,7 @@
<name>CCIncludePath2</name>
<state>$PROJ_DIR$</state>
<state>$PROJ_DIR$\..\Source</state>
<state>$PROJ_DIR$\..\zstack-lib</state>
<state>$PROJ_DIR$\..\..\Source</state>
<state>$PROJ_DIR$\..\..\..\ZMain\TI2530DB</state>
<state>$PROJ_DIR$\..\..\..\..\..\Components\hal\include</state>
Expand Down Expand Up @@ -2747,6 +2749,7 @@
<name>CCIncludePath2</name>
<state>$PROJ_DIR$</state>
<state>$PROJ_DIR$\..\Source</state>
<state>$PROJ_DIR$\..\zstack-lib</state>
<state>$PROJ_DIR$\..\..\Source</state>
<state>$PROJ_DIR$\..\..\..\ZMain\TI2530DB</state>
<state>$PROJ_DIR$\..\..\..\..\..\Components\hal\include</state>
Expand Down Expand Up @@ -3886,6 +3889,7 @@
<name>CCIncludePath2</name>
<state>$PROJ_DIR$</state>
<state>$PROJ_DIR$\..\Source</state>
<state>$PROJ_DIR$\..\zstack-lib</state>
<state>$PROJ_DIR$\..\..\Source</state>
<state>$PROJ_DIR$\..\..\..\ZMain\TI2530DB</state>
<state>$PROJ_DIR$\..\..\..\..\..\Components\hal\include</state>
Expand Down Expand Up @@ -5025,6 +5029,7 @@
<name>CCIncludePath2</name>
<state>$PROJ_DIR$</state>
<state>$PROJ_DIR$\..\Source</state>
<state>$PROJ_DIR$\..\zstack-lib</state>
<state>$PROJ_DIR$\..\..\Source</state>
<state>$PROJ_DIR$\..\..\..\ZMain\TI2530DB</state>
<state>$PROJ_DIR$\..\..\..\..\..\Components\hal\include</state>
Expand Down Expand Up @@ -6164,6 +6169,7 @@
<name>CCIncludePath2</name>
<state>$PROJ_DIR$</state>
<state>$PROJ_DIR$\..\Source</state>
<state>$PROJ_DIR$\..\zstack-lib</state>
<state>$PROJ_DIR$\..\..\Source</state>
<state>$PROJ_DIR$\..\..\..\ZMain\TI2530DB</state>
<state>$PROJ_DIR$\..\..\..\..\..\Components\hal\include</state>
Expand Down Expand Up @@ -7303,6 +7309,7 @@
<name>CCIncludePath2</name>
<state>$PROJ_DIR$</state>
<state>$PROJ_DIR$\..\Source</state>
<state>$PROJ_DIR$\..\zstack-lib</state>
<state>$PROJ_DIR$\..\..\Source</state>
<state>$PROJ_DIR$\..\..\..\ZMain\TI2530DB</state>
<state>$PROJ_DIR$\..\..\..\..\..\Components\hal\include</state>
Expand Down Expand Up @@ -7976,24 +7983,9 @@
</configuration>
<group>
<name>App</name>
<file>
<name>$PROJ_DIR$\..\Source\battery.h</name>
</file>
<file>
<name>$PROJ_DIR$\..\Source\bettery.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\Source\Debug.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\Source\Debug.h</name>
</file>
<file>
<name>$PROJ_DIR$\..\Source\hal_key.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\Source\hal_key.h</name>
</file>
<file>
<name>$PROJ_DIR$\..\Source\OSAL_FreePadApp.c</name>
</file>
Expand Down Expand Up @@ -8562,4 +8554,40 @@
<name>$PROJ_DIR$\..\..\..\ZMain\TI2530DB\ZMain.c</name>
</file>
</group>
<group>
<name>zstack-lib</name>
<file>
<name>$PROJ_DIR$\..\zstack-lib\battery.h</name>
</file>
<file>
<name>$PROJ_DIR$\..\zstack-lib\bettery.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\zstack-lib\commissioning.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\zstack-lib\commissioning.h</name>
</file>
<file>
<name>$PROJ_DIR$\..\zstack-lib\Debug.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\zstack-lib\Debug.h</name>
</file>
<file>
<name>$PROJ_DIR$\..\zstack-lib\factory_reset.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\zstack-lib\factory_reset.h</name>
</file>
<file>
<name>$PROJ_DIR$\..\zstack-lib\hal_key.h</name>
</file>
<file>
<name>$PROJ_DIR$\..\zstack-lib\utils.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\zstack-lib\utils.h</name>
</file>
</group>
</project>
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

# How to join:

1. Press and hold button (1) for 3-100 seconds(depends whter or not device is on a network), until device start flashing led
1. Press and hold *any* button for 3-10 seconds(depends whter or not device is on a network), until device start flashing led
2. Wait, in case of successfull join, device will flash led 5 times
3. If join failed, device will flash led 3 times

Expand Down
53 changes: 0 additions & 53 deletions Source/Debug.c

This file was deleted.

50 changes: 0 additions & 50 deletions Source/Debug.h

This file was deleted.

13 changes: 11 additions & 2 deletions Source/OSAL_FreePadApp.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
#endif

#include "zcl_freepadapp.h"
#include "commissioning.h"
#include "factory_reset.h"
#include "Debug.h"

const pTaskEventHandlerFn tasksArr[] = {macEventLoop,
nwk_event_loop,
Expand All @@ -27,13 +30,17 @@ const pTaskEventHandlerFn tasksArr[] = {macEventLoop,
touchLinkInitiator_event_loop,
#endif
bdb_event_loop,
zclFreePadApp_event_loop};
zclFreePadApp_event_loop,
zclCommissioning_event_loop,
zclFactoryResetter_loop
};

const uint8 tasksCnt = sizeof(tasksArr) / sizeof(tasksArr[0]);
uint16 *tasksEvents;

void osalInitTasks(void) {
uint8 taskID = 0;
DebugInit();

tasksEvents = (uint16 *)osal_mem_alloc(sizeof(uint16) * tasksCnt);
osal_memset(tasksEvents, 0, (sizeof(uint16) * tasksCnt));
Expand All @@ -48,7 +55,9 @@ void osalInitTasks(void) {
touchLinkInitiator_Init(taskID++);
#endif
bdb_Init(taskID++);
zclFreePadApp_Init(taskID);
zclFreePadApp_Init(taskID++);
zclCommissioning_Init(taskID++);
zclFactoryResetter_Init(taskID++);
}

/*********************************************************************
Expand Down
6 changes: 0 additions & 6 deletions Source/battery.h

This file was deleted.

56 changes: 0 additions & 56 deletions Source/bettery.c

This file was deleted.

2 changes: 1 addition & 1 deletion Source/f8wConfig.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@
-DRFD_RCVC_ALWAYS_ON=FALSE

/* The number of milliseconds to wait between data request polls to the coordinator. */
-DPOLL_RATE=0
-DPOLL_RATE=1000

/* This is used after receiving a data indication to poll immediately
* for queued messages...in milliseconds.
Expand Down
Loading

0 comments on commit af3fd2f

Please sign in to comment.