summaryrefslogtreecommitdiff
path: root/src/helper/binarybuffer.c
Commit message (Collapse)AuthorAgeFilesLines
* rename CEIL as DIV_ROUND_UPZachary T Welch2009-11-161-4/+4
| | | | | Improves the name of this macro, moves it to types.h, and adds a block of Doxygen comments to describe what it does.
* improve buf_set_buf helperZachary T Welch2009-11-161-3/+6
| | | | | Use void * and unsigned types for buffer and their sizes. Allows it to be used with more than uint8_t * without casts.
* improve buf_set_onesZachary T Welch2009-11-161-9/+9
| | | | Use memset instead of loop. Improve types, using void * and unsigned.
* improve buf_cpy helperZachary T Welch2009-11-161-8/+9
| | | | | Use memcpy for bulk of copy, improve final byte handling. Improve types by using void * for buffers and unsigned for size.
* improve buf_cmp and buf_cmp_mask helpersZachary T Welch2009-11-161-36/+37
| | | | | | | | Rewrite buf_cmp to use memcpy for bulk of comparison. Add static helper to perform comparison of trailing byte, which uses another static helper to perform a maksed comparison. The masked comparison helper is used by the buf_cmp_mask to simplify its loop. Improve types to use void *, unsigned, and return bool.
* improve str_to_buf and buf_to_str helpersZachary T Welch2009-11-161-62/+64
| | | | | Improve types: use void * and unsigned. Move all variables to point of first use. Move radix guessing logic to new str_radix_guess helper.
* binarybuffer: move variables to point of first useZachary T Welch2009-11-161-24/+7
| | | | Reduce some noise from subsequent patches.
* binarybuffer: fix whitespace related issuesZachary T Welch2009-11-161-3/+3
| | | | Add inter-operator whitespace. Improve existing documentation.
* remove unused buf_to_u32_handlerZachary T Welch2009-11-141-9/+0
| | | | | | Purge an unused routine from the tree and remove a layering violation. If this code is needed, it should reappear somwhere in src/jtag/, where struct scan_field gets defined.
* struct scan_field_s -> struct scan_fieldZachary T Welch2009-11-141-1/+1
| | | | | Remove obsolete suffix from struct scan_field. Somehow, these definitions did not get updated but did not cause any errors.
* Andreas Fritiofson <andreas.fritiofson@gmail.com> UTF8 fixesoharboe2009-07-171-1/+1
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2549 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Remove whitespace that occurs before ')'.zwelch2009-06-231-2/+2
| | | | | | | - Replace '[ \t]*[)]' with ')'. git-svn-id: svn://svn.berlios.de/openocd/trunk@2377 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Finish transforming 'u32' to 'uint32_t'.zwelch2009-06-181-9/+9
| | | | | | | | - Replace '\([^_]\)u32' with '\1uint32_t'. - Replace '^u32' with 'uint32_t'. git-svn-id: svn://svn.berlios.de/openocd/trunk@2281 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Transform 'u8' to 'uint8_t'zwelch2009-06-181-11/+11
| | | | | | | | - Replace '\([^_]\)u8' with '\1uint8_t'. - Replace '^u8' with 'uint8_t'. git-svn-id: svn://svn.berlios.de/openocd/trunk@2276 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Audit and eliminate redundant helper #include directives.zwelch2009-05-111-5/+0
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@1706 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Michael Bruck <mbruck@digenius.de> use more constoharboe2009-05-091-4/+4
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@1686 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Fix str_to_buf problem, thanks Andy Cheneemlu2009-04-221-2/+2
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@1505 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Zach Welch <zw@superlucidity.net> fix -Werror warningsoharboe2009-04-191-2/+2
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@1472 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - Cable driver helper API courtesy of Dick Hollenbeck <dick@softplc.com>kc8apf2009-02-031-45/+45
| | | | | | | - Formatting changes from uncrustify git-svn-id: svn://svn.berlios.de/openocd/trunk@1366 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - remove target specific variant and use target->variant memberntfreak2008-12-131-27/+27
| | | | | | | - fix build warning in cortex_m3 - code cleanup - remove trailing lf and convert c++ comments git-svn-id: svn://svn.berlios.de/openocd/trunk@1238 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - added myself to copyright on files i remember adding large contributions ↵ntfreak2008-09-201-1/+1
| | | | | | | | | for over the years - cleaned up headers to match rest of code - added missing svn props for previously added files git-svn-id: svn://svn.berlios.de/openocd/trunk@987 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* added yours sincerely for files where I feel that I've made non-trivial ↵oharboe2008-07-251-0/+3
| | | | | | contributions. git-svn-id: svn://svn.berlios.de/openocd/trunk@872 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Charles Hardin ckhardin at gmail.com oharboe2008-07-111-2/+2
| | | | | | | | | This address the >32 bit problem with drscan also added a check for bypass in the execute since this will manifest itself as a memory corruption when this check helps to debug the problem alot easier git-svn-id: svn://svn.berlios.de/openocd/trunk@794 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* This matters for embedded devices, but is probably not observably better for ↵oharboe2008-05-071-37/+0
| | | | | | PC hosted OpenOCD. git-svn-id: svn://svn.berlios.de/openocd/trunk@647 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - single core context used, removed debug context as thought unnecessary.ntfreak2008-04-101-4/+0
| | | | | | | | | - DCRDR now used to access special core registers - info is currently omitted from the cortex_m3 TRM ARM have told me this is the preferred access method and the docs will be updated soon. - now checks for User Thread Mode and Thread mode when halted. - removed repeated function declarations from command.c - cortex_m3_prepare_reset_halt removed, updated cortex_m3_assert_reset to suit git-svn-id: svn://svn.berlios.de/openocd/trunk@558 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - rename log functions to stop conflicts under win32 (wingdi)ntfreak2008-03-251-1/+1
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@523 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - added patch "remove error handler as planned"mifi2008-01-201-1/+1
| | | | | | | https://lists.berlios.de/pipermail/openocd-development/2008-January/000665.html (thanks to oyvind Harboe for the patch) git-svn-id: svn://svn.berlios.de/openocd/trunk@260 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - further work on ETB decoding (not yet functional)drath2007-05-051-1/+6
| | | | | | | - fixed several uses of uninitialized bits (Thanks to Vincent Palatin for finding and fixing these bugs) git-svn-id: svn://svn.berlios.de/openocd/trunk@145 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - correctly mask out bits that aren't part of a copied bufferdrath2007-04-121-0/+6
| | | | | | | | - fixed arm926ej-s CP15 register access handling - correctly identify SYSCLK source in LPC3180 NAND flash controller driver git-svn-id: svn://svn.berlios.de/openocd/trunk@139 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - added a PLD (programmable logic device) subsystem for FPGA, CPLD etc. ↵drath2006-11-221-2/+2
| | | | | | | | | | | | configuration - added support for loading .bit files into Xilinx Virtex-II devices - added support for the Gateworks GW16012 JTAG dongle - merged CFI fixes from XScale branch - a few minor fixes git-svn-id: svn://svn.berlios.de/openocd/trunk@116 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - str9x flash support (Thanks to Spencer Oliver)drath2006-09-281-35/+135
| | | | | | | | | | | | | - str75x flash support (Thanks to Spencer Oliver) - correct reporting of T-Bit in CPSR (Thanks to John Hartman for reporting this) - core-state (ARM/Thumb) can be switched by modifying CPSR - fixed bug in gdb_server register handling - register values > 32-bit should now be supported - several minor fixes and enhancements git-svn-id: svn://svn.berlios.de/openocd/trunk@100 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - Added support for native MinGW builds (thanks to Spencer Oliver and ↵drath2006-07-171-4/+28
| | | | | | | | | | Michael Fischer) - you still need to install GiveIO (not part of OpenOCD) - Added state-move support to ftd2xx and bitbang JTAG drivers (required for XScale, possibly useful for other targets, too) - various fixes git-svn-id: svn://svn.berlios.de/openocd/trunk@78 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - prepare OpenOCD for branching, created ./trunk/drath2006-06-021-0/+246
git-svn-id: svn://svn.berlios.de/openocd/trunk@64 b42882b7-edfa-0310-969c-e2dbd0fdcd60