Commit graph

51 commits

Author SHA1 Message Date
iceman1001
a776f9a0bd style 2025-03-18 08:11:06 +01:00
tinooo
939f5cb11f [PCF7931] Added type cast to compare equally sized types
the github pipeline was stressed about comparing an uint16_t to an uint32_t.
2025-03-14 09:05:53 +01:00
tinooo
0b2b238457 [PCF7931] getting things ready for PR
since this is somekind of work in progress, I'm still going for a PR.
This commit is reworking some comments and making the code stable
(at least as good es or better as before).

Also made als const as #define
2025-03-12 17:39:16 +01:00
tinooo
23ddf69f70 [PCF7931] added IIR filter
different tags seem to behave differently.
an old tag from the car had way worse signal. Therefore filtering made it way better.
Still not ideal.
2025-03-12 17:39:13 +01:00
tinooo
d3a87ead61 [PCF7930] refactor move code
move "remapping" of dataframes to the actual send function,
where the timer is located
2025-03-12 17:39:11 +01:00
tinooo
8723037e68 [PCF7931] refactor SendCmdPCF7931
first steps in understading and optimizing this function.
replace != with < - if we don't poll fast enough, it is possible that
the condition != is missed.
2025-03-12 17:39:08 +01:00
tinooo
ea96a3b0c9 [PCF7931] refactor write function
rename some variables for more clear reading
changed data type to meaningfull size
2025-03-12 17:39:05 +01:00
tinooo
f6600ec962 [PCF7931] Refactor removed early returns
unneccessary returns.
2025-03-12 17:39:02 +01:00
tinooo
3939e28640 [PCF7931] Starting refactor of write procedure
added comments
2025-03-12 17:38:59 +01:00
tinooo
2da713eba9 [PCF7931] draft continue with refactoring ReadPCF7931()
still not done with DemodPCF7931(). But now including changes in  ReadPCF7931().
They work tightly together.
Trying to resolve some issues and bugs. Basically it seems to work and
my results are consistent. However, they still deviate from what I get if
I do analyze the signal using lf read and data commands.

still some issues somewhere.
2025-03-12 17:38:55 +01:00
tinooo
9bfd55ebe0 [PCF7931] draft of working & refacored DemodPCF7931()
demod function now seems to work basically. Not all error cases are handled I guess.
Also still debug prints, since I've to figure out the rest.

Also unclear, why limit the buffer size to 1-2 blocks only?
2025-03-12 17:38:53 +01:00
tinooo
3a8dc89dca [PCF7930] Refactoring & bugfix in READING
firs commit of a few to come.
First renames of variables, added a few comments to improve clarity.
Fixed types (int -> unitx_t , const, ...) - not all. still some to come

Fixed 2 conditions that did not work properly. Here some explanation:

  Imagine dest[i-1] = 255 and dest[i] = 0. THis would mean a clear falling edge.
  However, this code would not work, since dest[i] > lmax is not true.
  This condition only works if I have at least 1 sample between lmax and 255.
  Same for the other way around.
2025-03-12 17:38:27 +01:00
iceman1001
6bb301f4da cppcheck fixes for const 2022-01-06 23:07:47 +01:00
iceman1001
e550f8ccc8 cppcheck fixes for const 2022-01-06 15:40:11 +01:00
Philippe Teuwen
b703bb746b Adapting license headers, WIP 2022-01-06 02:20:38 +01:00
Łukasz Jurczyk
218a4ba2ec
Added ledcontrol to lf functions 2021-11-18 15:00:54 +01:00
Philippe Teuwen
232843477c typos 2021-10-16 23:44:53 +02:00
Philippe Teuwen
5b54385347 rename globals 2021-08-21 23:08:26 +02:00
Philippe Teuwen
ce57637c80 rename globals GraphTraceLen OddByteParity pm3_capabilities 2021-08-21 17:53:54 +02:00
iceman1001
e2ca0a4abd style 2021-06-24 18:47:11 +02:00
iceman1001
b993236be2 send sync signal to clock when reset 2021-06-24 17:20:48 +02:00
Philippe Teuwen
026707b960 arm: fix prototypes 2020-05-11 13:48:57 +02:00
Philippe Teuwen
cce039554d Avoid hardcoded lf divisors 2019-10-09 12:05:13 +02:00
iceman1001
ffa3e2a0f8 style 2019-09-13 16:25:33 +02:00
iceman1001
d3b2f1f6d0 fix leds. dbg msg 2019-09-12 10:39:10 +02:00
Philippe Teuwen
16a7cfd7b2 make style (excepted cmdhficlass...) 2019-08-26 22:28:39 +02:00
sguerrini97
a6e5f9922f PCF7931: Print found single/consecutive block(s), fixes to block 1 check and some comments
Printing blocks makes it easier to manually reorder blocks when block 0 and 1 are not transmitted
2019-08-19 17:10:25 +02:00
Philippe Teuwen
d19754567d summer restructuring:
* .h include only the strict minimum for their own parsing
  * this forces all files to include explicitment their needs and not count on far streched dependencies
  * this helps Makefile to rebuild only the minimum
  * according to this rule, most standalone .h are now gone
  * big app.h is gone
  * remove seldom __cplusplus, if c++ happens, everything will have to be done properly anyway
* all unrequired include were removed
* split common/ into common/ (client+arm) and common_arm/ (os+bootloader)
  * bring zlib to common/
  * bring stuff not really/not yet used in common back to armsrc/ or client/
  * bring liblua into client/
  * bring uart into client/
  * move some portions of code around (dbprint, protocols,...)
* rename unused files into *_disabled.[ch] to make it explicit
* rename soft Uarts between 14a, 14b and iclass, so a standalone could use several without clash
* remove PrintAndLogDevice
* move deprecated-hid-flasher from client to tools
* Makefiles
  * treat deps in armsrc/ as in client/
  * client: stop on warning (-Werror), same as for armsrc/

Tested on:

* all standalone modes
* Linux
2019-08-11 21:42:01 +02:00
Philippe Teuwen
1354aec556 typos 2019-08-06 13:51:10 +02:00
Philippe Teuwen
482db05741 Rename few stuff for consistency 2019-04-18 12:49:51 +02:00
Philippe Teuwen
db4aa08b78 make style 2019-03-28 14:19:41 +01:00
iceman1001
433f84ca0d style 2019-03-18 22:25:21 +01:00
iceman1001
f24416a71e clean 2019-03-18 13:42:17 +01:00
Philippe Teuwen
1b2601a48a Add missing EOF LF 2019-03-12 00:12:26 +01:00
Philippe Teuwen
961d929f4d changing {} style to match majority of previous style 2019-03-10 11:20:22 +01:00
Philippe Teuwen
0373696662 make style 2019-03-10 00:00:59 +01:00
Philippe Teuwen
8a7c6825b5 armsrc: fix mix of spaces & tabs 2019-03-09 20:34:41 +01:00
Philippe Teuwen
60f292b18e remove spurious spaces & tabs at end of lines 2019-03-09 08:59:13 +01:00
iceman1001
c1237cfa26 FIX: 'lg pcf7931' - improved read code (@sguerrini97) 2019-01-06 21:05:29 +01:00
iceman1001
2c1e2a9f3a CHG: 'hf 15 findafi' - added the possibility to cancel loop with buttonpress 2017-09-05 10:31:27 +02:00
iceman1001
cdc0f15104 FIX: playing with some delays. 2017-07-11 17:40:29 +02:00
iceman1001
0eea62d4c3 CHG: moved to header file 2017-01-21 10:29:21 +01:00
iceman1001
f4d7d1fed1 CHG: removed CLOCK2, since its not used in the code. 2016-10-20 00:40:56 +02:00
iceman1001
76471e5d17 CHG: reverted back from the idea of measureing in (us) microseconds, the timer is too raw, gives 10-15us delays. Now we are measuring ticks, which is (1 us = 1.5ticks)
like it was before.   ie:  80us = 80*1.5 = 120ticks.
2016-09-11 11:14:12 +02:00
iceman1001
f2c2b174cd CHG: moved some #define into include\common.h (which is call by apps.h), so we have one place for them. Also changed them to CAPITAL.
ABS(),  MIN(), MAX()
2016-03-13 07:16:42 +01:00
iceman1001
c0f15a05b3 ADD: Marshmellows fixes for "lf t55xx" and "lf cmdread" ref: https://github.com/Proxmark/proxmark3/pull/166/files 2016-02-21 17:44:25 +01:00
iceman1001
614da335f6 Syntax suger, making the code easier to read (for me at least) 2016-01-08 14:26:35 +01:00
iceman1001
2efd639484 CHG: some cleanup of pcf7931.c 2015-10-20 19:02:03 +02:00
iceman1001
e16054a468 CHG: minor updates in the T55x7 methods. added the LED_A_ON / LED_A_OFF to indicate when a T55x7 command is running.
CHG: added some more comments to T55x7,  next person who looks at this will have it easier.
2015-10-15 11:00:07 +02:00
iceman1001
ac2df3460a ADD: @marshmellows fixes for t55x7 reading signal.
ADD: @marshmellows "diphase" definition for T55x7.
MOV: extracted the aquisition from the t55x7 methods and put them inside lfsampling.c
FIX: pcf7931 write,   there is 16bytes in a block.. not 4 as I thought before.
FIX: t55x7 lowered the WRITE_0 to 16.  Even bigger gap.
2015-10-15 10:23:15 +02:00