summaryrefslogtreecommitdiff
path: root/digital/dongle-zigbit/src/network_specific.c
diff options
context:
space:
mode:
Diffstat (limited to 'digital/dongle-zigbit/src/network_specific.c')
-rw-r--r--digital/dongle-zigbit/src/network_specific.c64
1 files changed, 64 insertions, 0 deletions
diff --git a/digital/dongle-zigbit/src/network_specific.c b/digital/dongle-zigbit/src/network_specific.c
new file mode 100644
index 00000000..d03ac24e
--- /dev/null
+++ b/digital/dongle-zigbit/src/network_specific.c
@@ -0,0 +1,64 @@
+/* network_specific.c */
+/* Beacon specifical network management. {{{
+ *
+ * Copyright (C) 2012 Florent Duchon
+ *
+ * APBTeam:
+ * Web: http://apbteam.org/
+ * Email: team AT apbteam DOT org
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * }}} */
+
+
+#include <types.h>
+#include <configServer.h>
+#include <zdo.h>
+
+#include "configuration.h"
+#include "network.h"
+#include "network_specific.h"
+#include "print.h"
+#include "reset.h"
+#include "uid.h"
+
+/* Specific callback after data packet received */
+void network_specific_DataIndicationcallback(APS_DataInd_t* indData)
+{
+ AppMessage_t *FrameReceived = (AppMessage_t *) indData->asdu;
+
+ /* Data received indication */
+ switch(FrameReceived->type)
+ {
+ case NETWORK_RESET:
+ reset_avr();
+ break;
+ case NETWORK_UART_OVER_ZB:
+ print_raw_data(FrameReceived->data,indData->asduLength-1);
+ break;
+ default:
+ uprintf("Unknown data type received = %x\r\n",FrameReceived->type);
+ break;
+ }
+}
+
+/* Specific callback after data packet sent */
+void network_specific_DataConfcallback(void)
+{
+}
+
+
+