From: Enoch <ix...@ho...> - 2013-03-04 09:14:59
|
Hello Matthias & all: As I promised to generalize crc8.frt (#1) a question was raised how would the user configure it to its use, namely, select the generating polynomial byte and the needed bit order (#2). I answered the question through the following amforth-shell.py improvement which introduces a local appl_owns.py substitutions file. Without further ado here's the patch and its use for your perusal: Patch: http://pastebin.com/uDK7fk9N Example: $ cat appl_owns.py # amforth-shell.py application specific forth substitutions APPL_OWNS = { 'DEBUG': '1' } $ make shell ...snip... (AT90CAN128)> DEBUG . 1 ok Regards, Enoch. #1 Assuming that Matthias places it in ${AMFORTH}/lib/crc8.frt :-) #2 With no real constant-s to pay for in the user code. |