summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-05-29counter: explicit string formatting for annotation textGerhard Sittig
Replace str() conversion with explicit number text formatting, for improved awareness and easier future adjustment during maintenance.
2018-05-29counter: use local variables instead of instance variablesGerhard Sittig
Since values get accessed within the .decode() method exclusively, we need not store data in instance variables of the decoder object. Use another variable for the "reset edge" option as well for consistency.
2018-05-29counter: move some init code to the start of decode()Gerhard Sittig
Since PD API v3 the .decode() method is called exactly once, and contains a main loop itself. Move initialization code that sets up .decode() related logic to the start of the .decode() routine.
2018-05-29counter: use symbolic names for input pins, wait conditions, annotation rowsGerhard Sittig
Replace magic numbers by symbolic references to (fixed and optional) decoder input signals, .wait() conditions, as well as annotation rows. Move some empty lines, to better reflect which code lines form groups of similar activity ("blocks" that logically belong together).
2018-05-29counter: explicit option text to .wait() edge mappingGerhard Sittig
The previous implementation used the fact that libsigrok's internal API happens to use the first letter of the user visible English option text. Two locations mapped edge choices to API literals in different ways. Unify them, introduce an explicit option text to literal value mapping. (Many if not all decoder implementations do that. More adjustment to use common code could be beneficial.)
2018-05-26atsha204a: Add the reset() method.Uwe Hermann
2018-05-26atsha204a: Rename a few methods for consistency.Uwe Hermann
2018-05-26atsha204a: Shorten a few more code chunks, add helpers.Uwe Hermann
2018-05-26atsha204a: Shorten self.opcode to op in a few places.Uwe Hermann
2018-05-26atsha204a: Use the Python 'in' keyword to improve readability.Uwe Hermann
2018-05-26atsha204a: Shorten output_tx_bytes()/output_rx_bytes() a bit.Uwe Hermann
2018-05-26Add decoder for Microchip ATSHA204A crypto moduleMichalis Pappas
2018-05-21Add ON Semi CAT24C256, CAT24M01.whitequark
2018-05-19Decoder_put(): Avoid a g_malloc()/g_free() pair per binary out.Uwe Hermann
2018-05-19Decoder_put(): Avoid a g_malloc()/g_free() pair per annotation.Uwe Hermann
2018-05-18srd_inst_find_by_obj(): Minor performance improvement.Uwe Hermann
Handle the most common case of one session and one decoder first so we can exit early. This has a small, but measurable performance benefit.
2018-05-18srd_*inst_find_by_obj(): Suggest inlining for performance reasons.Uwe Hermann
This has a small, but measurable performance benefit.
2018-05-18srd_*inst_find_by_obj(): Move functions, make them static.Uwe Hermann
These functions are only used in type_decoder.c. Move them there and make them static.
2018-05-18sample_matches(): Force inlining for performance reasons.Uwe Hermann
2018-05-18Simplify code by dropping session_is_valid().Uwe Hermann
A simple NULL check is sufficient here, max_session_id is being properly handled by srd_init(), srd_exit(), srd_session_new(). This might also have a small performance benefit.
2018-05-18convert_meta(): Use g_variant_type_equal().Uwe Hermann
2018-05-18Doxyfile: Exclude the build/ directory.Uwe Hermann
2018-05-18Add srd_searchpaths_get() API docs.Uwe Hermann
2018-05-18Doxyfile: Update to a more recent Doxygen version.Uwe Hermann
2018-05-18Random whitespace/cosmetic/consistency fixes.Uwe Hermann
2018-05-17type_decoder.c: Fix a compiler warning (-Wswitch-default).Uwe Hermann
type_decoder.c: In function ‘get_term_type’: type_decoder.c:486:2: warning: switch missing default case [-Wswitch-default] switch (v[0]) { ^~~~~~
2018-05-17configure.ac: Add some more compiler warning options.Uwe Hermann
Add the -Wshadow -Wformat=2 -Wno-format-nonliteral -Wfloat-equal compiler options (supported by both gcc and clang) to get notified of more potential issues in the code.
2018-05-16srd_decoder_load_all_zip_path(): Fix a compiler warning (-Wshadow).Uwe Hermann
2018-05-16srd_inst_channel_set_all(): Fix a compiler warning (-Wshadow).Uwe Hermann
instance.c:266:11: warning: declaration of ‘l’ shadows a previous local [-Wshadow] GSList *l = g_slist_nth(di->decoder->channels, i); ^ instance.c:206:9: note: shadowed declaration is here GList *l; ^
2018-05-16type_decoder.c: Drop unneeded g_free() NULL check.Uwe Hermann
2018-05-16instance.c: Fix a scan-build warning.Uwe Hermann
instance.c:278:25: warning: The left operand of '!=' is a garbage value if (new_channelmap[i] != -1) ~~~~~~~~~~~~~~~~~ ^
2018-05-16decoder.c: Fix a scan-build warning.Uwe Hermann
decoder.c:343:9: warning: Access to field 'ob_type' results in a dereference of a null pointer (loaded from variable 'py_default') if (Py_TYPE(py_default) != Py_TYPE(py_item)) { ^~~~~~~~~~~~~~~~~~~ /usr/include/python3.6m/object.h:118:33: note: expanded from macro 'Py_TYPE' #define Py_TYPE(ob) (((PyObject*)(ob))->ob_type) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
2018-05-16type_decoder.c: Fix a scan-build warning.Uwe Hermann
type_decoder.c:836:3: warning: Value stored to 'ret' is never read ret = process_samples_until_condition_match(di, &found_match); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2018-05-16instance.c: Fix a memory leak reported by scan-build.Uwe Hermann
instance.c:280:10: warning: Potential leak of memory pointed to by 'new_channelmap' pdch = g_slist_nth(di->decoder->channels, i)->data; ^~~~~~~~~~~
2018-05-16type_decoder.c: Fix a memory leak reported by scan-build.Uwe Hermann
type_decoder.c:206:2: warning: Potential leak of memory pointed to by 'pdb' PyGILState_Release(gstate); ^~~~~~~~~~~~~~~~~~
2018-05-16type_decoder.c: Fix a memory leak reported by scan-build.Uwe Hermann
type_decoder.c:197:10: warning: Potential leak of memory pointed to by 'pdb' return SRD_ERR_MALLOC; ^~~~~~~~~~~~~~
2018-05-15Convert some g_malloc0() to g_malloc().Uwe Hermann
For the converted calls there's no requirement for all struct fields being memset()'d to zero, or all struct fields are explicitly set later anyway.
2018-05-15get_current_pinvalues(): Slightly simplify a code chunk.Uwe Hermann
2018-05-15util.c: Add two missing PyGILState_Release() calls.Uwe Hermann
2018-05-13st7735: Merge reset_state() into reset().Uwe Hermann
2018-05-13Simple decoder for ST7735 TFT controllerAleksander Alekseev
2018-05-12mcs48: add reset method, make A12 optional, unassorted adjustmentGerhard Sittig
Add the reset() method which recently has become essential. Make the A12 "memory bank" address line optional. Use more Python idioms. Update comments. The control signals had to move, to avoid gaps between D7 and A8 as well as between A11 and A12 in the GUI decoder properties dialog. With dynamic assignment in the UI and with named references in the CLI this shall not harm. Unmodified automated tests still pass. The logic is prepared to handle data, address, and "bank" pin groups at arbitrary locations, A[11:8] and D[7:0] need not be adjacent any longer. Support for more than one memory bank pin is prepared, but the number of bank pins needs to get determined at the start of decode(), when this feature is to get added in the future.
2018-05-12Add new decoder: Intel MCS-48fenugrec
Decodes addresses and data read from an external ROM. The MCS-48 processors (8048, 8049, 8039, etc.) have an 8-bit data bus that latches first the address then the data.
2018-05-09type_decoder.c: Drop incorrect Py_DECREF() calls.Uwe Hermann
2018-05-09type_decoder: Fixup memory leak in Decoder.put() (meta, python)Uwe Hermann
This fixes parts of bug #329.
2018-05-09type_decoder: fixup memory leak in Decoder.put() (annotation, binary)Gerhard Sittig
The text presentation of decoder annotations' payload data was allocated but not freed. As were the byte strings of binary output. Fix it. This fixes parts of bug #329.
2018-05-06Doxyfile: Set CREATE_SUBDIRS to NO.Uwe Hermann
The API docs for libsigrokdecode are relatively small, no need for the many, many subdirectories this would otherwise create.
2018-05-03jtag_stm32: Always switch state on new instructionGeorge Hopkins
2018-05-03jtag_stm32: Fix handling of boundary scan TAPGeorge Hopkins
2018-05-03jtag: Fix shifting of registersGeorge Hopkins
This fixes bug #1066.