hosted/dap: Reformatted the header with clang-format

This commit is contained in:
dragonmux 2022-07-11 12:11:13 -04:00 committed by Piotr Esden-Tempski
parent 83191bb87d
commit 1765d2afbc
1 changed files with 24 additions and 30 deletions

View File

@ -35,8 +35,7 @@
#include "adiv5.h" #include "adiv5.h"
/*- Definitions -------------------------------------------------------------*/ /*- Definitions -------------------------------------------------------------*/
enum enum {
{
DAP_INFO_VENDOR = 0x01, DAP_INFO_VENDOR = 0x01,
DAP_INFO_PRODUCT = 0x02, DAP_INFO_PRODUCT = 0x02,
DAP_INFO_SER_NUM = 0x03, DAP_INFO_SER_NUM = 0x03,
@ -50,8 +49,7 @@ enum
DAP_INFO_PACKET_SIZE = 0xff, DAP_INFO_PACKET_SIZE = 0xff,
}; };
enum enum {
{
DAP_CAP_SWD = (1 << 0), DAP_CAP_SWD = (1 << 0),
DAP_CAP_JTAG = (1 << 1), DAP_CAP_JTAG = (1 << 1),
DAP_CAP_SWO_UART = (1 << 2), DAP_CAP_SWO_UART = (1 << 2),
@ -77,19 +75,15 @@ uint32_t dap_read_reg(ADIv5_DP_t *dp, uint8_t reg);
void dap_write_reg(ADIv5_DP_t *dp, uint8_t reg, uint32_t data); void dap_write_reg(ADIv5_DP_t *dp, uint8_t reg, uint32_t data);
void dap_reset_link(bool jtag); void dap_reset_link(bool jtag);
uint32_t dap_read_idcode(ADIv5_DP_t *dp); uint32_t dap_read_idcode(ADIv5_DP_t *dp);
unsigned int dap_read_block(ADIv5_AP_t *ap, void *dest, uint32_t src, unsigned int dap_read_block(ADIv5_AP_t *ap, void *dest, uint32_t src, size_t len, enum align align);
size_t len, enum align align); unsigned int dap_write_block(ADIv5_AP_t *ap, uint32_t dest, const void *src, size_t len, enum align align);
unsigned int dap_write_block(ADIv5_AP_t *ap, uint32_t dest, const void *src,
size_t len, enum align align);
void dap_ap_mem_access_setup(ADIv5_AP_t *ap, uint32_t addr, enum align align); void dap_ap_mem_access_setup(ADIv5_AP_t *ap, uint32_t addr, enum align align);
uint32_t dap_ap_read(ADIv5_AP_t *ap, uint16_t addr); uint32_t dap_ap_read(ADIv5_AP_t *ap, uint16_t addr);
void dap_ap_write(ADIv5_AP_t *ap, uint16_t addr, uint32_t value); void dap_ap_write(ADIv5_AP_t *ap, uint16_t addr, uint32_t value);
void dap_read_single(ADIv5_AP_t *ap, void *dest, uint32_t src, enum align align); void dap_read_single(ADIv5_AP_t *ap, void *dest, uint32_t src, enum align align);
void dap_write_single(ADIv5_AP_t *ap, uint32_t dest, const void *src, void dap_write_single(ADIv5_AP_t *ap, uint32_t dest, const void *src, enum align align);
enum align align);
int dbg_dap_cmd(uint8_t *data, int size, int rsize); int dbg_dap_cmd(uint8_t *data, int size, int rsize);
void dap_jtagtap_tdi_tdo_seq(uint8_t *DO, bool final_tms, const uint8_t *TMS, void dap_jtagtap_tdi_tdo_seq(uint8_t *DO, bool final_tms, const uint8_t *TMS, const uint8_t *DI, int ticks);
const uint8_t *DI, int ticks);
int dap_jtag_configure(void); int dap_jtag_configure(void);
void dap_swdptap_seq_out(uint32_t MS, int ticks); void dap_swdptap_seq_out(uint32_t MS, int ticks);
void dap_swdptap_seq_out_parity(uint32_t MS, int ticks); void dap_swdptap_seq_out_parity(uint32_t MS, int ticks);