forked from auracaster/openocd
ADIv5: doxygen
Provide doxygen for many of the public ADIv5 interfaces (i.e. the ones called from Cortex core support code). Add FIXMEs (and a TODO) to help resolve implementation issues which became more apparent when trying to document this code: - Error-prone context-sensitivity (queued/nonqueued) in many procedures. - Procedures that lie by ignoring errors and wrongly claiming success. Also, there was no point in a return from dap_ap_select(); it can't fail, and no caller checks its return status. Clean that up, make it void. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
This commit is contained in:
@@ -155,16 +155,18 @@ struct swjdp_common
|
||||
|
||||
};
|
||||
|
||||
/* Accessor function for currently selected DAP-AP number */
|
||||
/** Accessor for currently selected DAP-AP number (0..255) */
|
||||
static inline uint8_t dap_ap_get_select(struct swjdp_common *swjdp)
|
||||
{
|
||||
return (uint8_t)(swjdp ->apsel >> 24);
|
||||
}
|
||||
|
||||
/* Queued transactions -- use with care */
|
||||
/* AP selection applies to future AP transactions */
|
||||
void dap_ap_select(struct swjdp_common *dap,uint8_t apsel);
|
||||
|
||||
/* AP transactions ... synchronous given TRANS_MODE_ATOMIC */
|
||||
int dap_setup_accessport(struct swjdp_common *swjdp,
|
||||
uint32_t csw, uint32_t tar);
|
||||
int dap_ap_select(struct swjdp_common *swjdp,uint8_t apsel);
|
||||
int dap_ap_write_reg_u32(struct swjdp_common *swjdp,
|
||||
uint32_t addr, uint32_t value);
|
||||
int dap_ap_read_reg_u32(struct swjdp_common *swjdp,
|
||||
@@ -173,11 +175,11 @@ int dap_ap_read_reg_u32(struct swjdp_common *swjdp,
|
||||
/* Queued JTAG ops must be completed with jtagdp_transaction_endcheck() */
|
||||
int jtagdp_transaction_endcheck(struct swjdp_common *swjdp);
|
||||
|
||||
/* MEM-AP memory mapped bus single uint32_t register transfers, without endcheck */
|
||||
/* Queued MEM-AP memory mapped single word transfers */
|
||||
int mem_ap_read_u32(struct swjdp_common *swjdp, uint32_t address, uint32_t *value);
|
||||
int mem_ap_write_u32(struct swjdp_common *swjdp, uint32_t address, uint32_t value);
|
||||
|
||||
/* MEM-AP memory mapped bus transfers, single registers, complete transactions */
|
||||
/* Synchronous MEM-AP memory mapped single word transfers */
|
||||
int mem_ap_read_atomic_u32(struct swjdp_common *swjdp,
|
||||
uint32_t address, uint32_t *value);
|
||||
int mem_ap_write_atomic_u32(struct swjdp_common *swjdp,
|
||||
|
||||
Reference in New Issue
Block a user