stlink: add support for 16 bit memory read/write
authorLaurent LEMELE <laurent.lemele@st.com>
Wed, 19 Sep 2018 21:42:12 +0000 (23:42 +0200)
committerSpencer Oliver <spen@spen-soft.co.uk>
Thu, 6 Dec 2018 10:02:55 +0000 (10:02 +0000)
commit81142fa6da696d48b360fc1522bcf35fe2185749
tree4c7723c155c2d97bc617a4df94c79414c0720e02
parent1a51d493de08a7e2c1d336a82a5d5c97b0bd4e69
stlink: add support for 16 bit memory read/write

Recent stlink version V2J26 introduces support for 16 bit memory
read/write.
Add the new API and modify the wrappers stlink_usb_{read|write}_mem
For older version of stlink keep the same behavior as in current
code.
While there, fix some minor typo in comments inside the wrappers.
This fixes ticket #204 ("st-link can't flash stm32f2x based flash
without target algorithms").

Change-Id: Id7d404e588f10a4b0f8a93d7ca44cef8e4c49b4f
Author: Laurent LEMELE <laurent.lemele@st.com>
Rebased-by: Antonio Borneo <borneo.antonio@gmail.com>
Ticket: https://sourceforge.net/p/openocd/tickets/204/
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/4704
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
src/jtag/drivers/stlink_usb.c