Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Flipper-Zero/STM32CubeWB.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'Middlewares/ST/STM32_WPAN/zigbee/stack/include/mac/ieee802154_crc.h')
-rw-r--r--Middlewares/ST/STM32_WPAN/zigbee/stack/include/mac/ieee802154_crc.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/Middlewares/ST/STM32_WPAN/zigbee/stack/include/mac/ieee802154_crc.h b/Middlewares/ST/STM32_WPAN/zigbee/stack/include/mac/ieee802154_crc.h
new file mode 100644
index 000000000..d3b7a6bc1
--- /dev/null
+++ b/Middlewares/ST/STM32_WPAN/zigbee/stack/include/mac/ieee802154_crc.h
@@ -0,0 +1,17 @@
+/* Copyright [2016 - 2021] Exegin Technologies Limited. All rights reserved. */
+
+#ifndef IEEE802154_CRC_H
+#define IEEE802154_CRC_H
+
+/* 802.15.4 two-byte FCS */
+#define WPAN_CRC_POLYNOMIAL 0x1021U
+#define WPAN_CRC_INITIAL 0x0000U
+#define WPAN_CRC_XOROUT 0x0000U
+
+/* For COBS (MAC dongles) */
+#define PPPINITFCS16 0xffff /* Initial FCS value */
+#define PPPGOODFCS16 0xf0b8 /* Good final FCS value */
+
+uint16_t WpanCrc(uint16_t crc, const void *dataPtr, unsigned int dataLen);
+
+#endif