stlink: export write_debug_reg
[fw/openocd] / src / jtag / stlink / stlink_layout.h
index bf1e2c6801566f8f641ac64a91165c4b41b5374e..905105a0a11a0b9b409487272f9368172cb7f7bc 100644 (file)
@@ -17,6 +17,7 @@
  *   Free Software Foundation, Inc.,                                       *
  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
  ***************************************************************************/
+
 #ifndef _STLINK_LAYOUT_H_
 #define _STLINK_LAYOUT_H_
 
@@ -25,7 +26,7 @@ struct stlink_interface_s;
 struct stlink_interface_param_s;
 
 /** */
-extern struct stlink_layout_api_s stlink_layout_api;
+extern struct stlink_layout_api_s stlink_usb_layout_api;
 
 /** */
 struct stlink_layout_api_s {
@@ -36,6 +37,8 @@ struct stlink_layout_api_s {
        /** */
        int (*reset) (void *fd);
        /** */
+       int (*assert_srst) (void *fd, int srst);
+       /** */
        int (*run) (void *fd);
        /** */
        int (*halt) (void *fd);
@@ -55,10 +58,12 @@ struct stlink_layout_api_s {
                            const uint8_t *buffer);
        /** */
        int (*read_mem32) (void *handle, uint32_t addr, uint16_t len,
-                          uint32_t *buffer);
+                          uint8_t *buffer);
        /** */
        int (*write_mem32) (void *handle, uint32_t addr, uint16_t len,
-                           const uint32_t *buffer);
+                           const uint8_t *buffer);
+       /** */
+       int (*write_debug_reg) (void *handle, uint32_t addr, uint32_t val);
        /** */
        int (*idcode) (void *fd, uint32_t *idcode);
        /** */