2015-01-07 12:29:45 +08:00
|
|
|
// Copyright (C) 2014
|
2014-12-29 09:33:32 +08:00
|
|
|
//
|
|
|
|
// This code is licensed to you under the terms of the GNU GPL, version 2 or,
|
|
|
|
// at your option, any later version. See the LICENSE.txt file for the text of
|
|
|
|
// the license.
|
|
|
|
//-----------------------------------------------------------------------------
|
2015-01-19 07:13:32 +08:00
|
|
|
// Low frequency demod related commands
|
|
|
|
// marshmellow
|
|
|
|
// note that many of these demods are not the slickest code and they often rely
|
|
|
|
// on peaks and clock instead of converting to clean signal.
|
|
|
|
//
|
2014-12-29 09:33:32 +08:00
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
#ifndef LFDEMOD_H__
|
|
|
|
#define LFDEMOD_H__
|
|
|
|
#include <stdint.h>
|
|
|
|
|
2015-02-07 03:36:25 +08:00
|
|
|
int DetectASKClock(uint8_t dest[], size_t size, int *clock, int maxErr);
|
2015-04-07 11:17:30 +08:00
|
|
|
uint8_t DetectCleanAskWave(uint8_t dest[], size_t size, uint8_t high, uint8_t low);
|
|
|
|
int DetectStrongAskClock(uint8_t dest[], size_t size, uint8_t high, uint8_t low);
|
2015-02-07 03:36:25 +08:00
|
|
|
int askmandemod(uint8_t *BinStream, size_t *size, int *clk, int *invert, int maxErr);
|
2015-03-16 20:39:18 +08:00
|
|
|
uint8_t Em410xDecode(uint8_t *BitStream, size_t *size, size_t *startIdx, uint32_t *hi, uint64_t *lo);
|
2015-01-21 06:28:51 +08:00
|
|
|
int ManchesterEncode(uint8_t *BitStream, size_t size);
|
2015-01-07 12:29:45 +08:00
|
|
|
int manrawdecode(uint8_t *BitStream, size_t *size);
|
2015-01-19 07:13:32 +08:00
|
|
|
int BiphaseRawDecode(uint8_t * BitStream, size_t *size, int offset, int invert);
|
2015-02-07 03:36:25 +08:00
|
|
|
int askrawdemod(uint8_t *BinStream, size_t *size, int *clk, int *invert, int maxErr, uint8_t amp);
|
2015-03-04 05:20:18 +08:00
|
|
|
int gProxII_Demod(uint8_t BitStream[], size_t *size);
|
2015-01-21 06:28:51 +08:00
|
|
|
int HIDdemodFSK(uint8_t *dest, size_t *size, uint32_t *hi2, uint32_t *hi, uint32_t *lo);
|
2014-12-29 09:33:32 +08:00
|
|
|
int IOdemodFSK(uint8_t *dest, size_t size);
|
2014-12-31 15:27:30 +08:00
|
|
|
int fskdemod(uint8_t *dest, size_t size, uint8_t rfLen, uint8_t invert, uint8_t fchigh, uint8_t fclow);
|
2015-01-07 12:29:45 +08:00
|
|
|
uint32_t bytebits_to_byte(uint8_t* src, size_t numbits);
|
2015-02-07 03:36:25 +08:00
|
|
|
int nrzRawDemod(uint8_t *dest, size_t *size, int *clk, int *invert, int maxErr);
|
2015-01-27 06:23:19 +08:00
|
|
|
void psk1TOpsk2(uint8_t *BitStream, size_t size);
|
2015-02-22 11:54:52 +08:00
|
|
|
void psk2TOpsk1(uint8_t *BitStream, size_t size);
|
2015-02-07 03:36:25 +08:00
|
|
|
int DetectNRZClock(uint8_t dest[], size_t size, int clock);
|
2015-01-07 12:29:45 +08:00
|
|
|
int indala26decode(uint8_t *bitStream, size_t *size, uint8_t *invert);
|
2015-01-28 03:51:12 +08:00
|
|
|
int PyramiddemodFSK(uint8_t *dest, size_t *size);
|
|
|
|
int AWIDdemodFSK(uint8_t *dest, size_t *size);
|
2015-01-19 07:13:32 +08:00
|
|
|
size_t removeParity(uint8_t *BitStream, size_t startIdx, uint8_t pLen, uint8_t pType, size_t bLen);
|
2015-03-27 12:02:30 +08:00
|
|
|
uint16_t countFC(uint8_t *BitStream, size_t size, uint8_t fskAdj);
|
2015-01-23 03:24:03 +08:00
|
|
|
uint8_t detectFSKClk(uint8_t *BitStream, size_t size, uint8_t fcHigh, uint8_t fcLow);
|
2015-01-19 07:13:32 +08:00
|
|
|
int getHiLo(uint8_t *BitStream, size_t size, int *high, int *low, uint8_t fuzzHi, uint8_t fuzzLo);
|
2015-01-28 03:51:12 +08:00
|
|
|
int ParadoxdemodFSK(uint8_t *dest, size_t *size, uint32_t *hi2, uint32_t *hi, uint32_t *lo);
|
|
|
|
uint8_t preambleSearch(uint8_t *BitStream, uint8_t *preamble, size_t pLen, size_t *size, size_t *startIdx);
|
|
|
|
uint8_t parityTest(uint32_t bits, uint8_t bitLen, uint8_t pType);
|
2015-02-07 03:36:25 +08:00
|
|
|
int pskRawDemod(uint8_t dest[], size_t *size, int *clock, int *invert);
|
|
|
|
int DetectPSKClock(uint8_t dest[], size_t size, int clock);
|
2014-12-29 09:33:32 +08:00
|
|
|
|
|
|
|
#endif
|