#include <swdp.h>
|
int(* | swdp_output_sequence )(const struct device *dev, uint32_t count, const uint8_t *data) |
| Write count bits to SWDIO from data LSB first.
|
|
int(* | swdp_input_sequence )(const struct device *dev, uint32_t count, uint8_t *data) |
| Read count bits from SWDIO into data LSB first.
|
|
int(* | swdp_transfer )(const struct device *dev, uint8_t request, uint32_t *data, uint8_t idle_cycles, uint8_t *response) |
| Perform SWDP transfer and store response.
|
|
int(* | swdp_set_pins )(const struct device *dev, uint8_t pins, uint8_t value) |
| Set SWCLK, SWDPIO, and nRESET pins state.
|
|
int(* | swdp_get_pins )(const struct device *dev, uint8_t *state) |
| Get SWCLK, SWDPIO, and nRESET pins state.
|
|
int(* | swdp_set_clock )(const struct device *dev, uint32_t clock) |
| Set SWDP clock frequency.
|
|
int(* | swdp_configure )(const struct device *dev, uint8_t turnaround, bool data_phase) |
| Configure SWDP interface.
|
|
int(* | swdp_port_on )(const struct device *dev) |
| Enable interface, set pins to default state.
|
|
int(* | swdp_port_off )(const struct device *dev) |
| Disable interface, set pins to High-Z mode.
|
|
◆ swdp_configure
int(* swdp_api::swdp_configure) (const struct device *dev, uint8_t turnaround, bool data_phase) |
Configure SWDP interface.
- Parameters
-
dev | SWDP device |
turnaround | Line turnaround cycles |
data_phase | Always generate Data Phase (also on WAIT/FAULT) |
- Returns
- 0 on success, or error code
◆ swdp_get_pins
Get SWCLK, SWDPIO, and nRESET pins state.
- Note
- The bit positions are defined by the SWDP_*_PIN macros.
- Parameters
-
dev | SWDP device |
state | Place to store pins state |
- Returns
- 0 on success, or error code
◆ swdp_input_sequence
Read count bits from SWDIO into data LSB first.
- Parameters
-
dev | SWDP device |
count | Number of bits to read |
data | Buffer to store bits read |
- Returns
- 0 on success, or error code
◆ swdp_output_sequence
Write count bits to SWDIO from data LSB first.
- Parameters
-
dev | SWDP device |
count | Number of bits to write |
data | Bits to write |
- Returns
- 0 on success, or error code
◆ swdp_port_off
int(* swdp_api::swdp_port_off) (const struct device *dev) |
Disable interface, set pins to High-Z mode.
- Parameters
-
- Returns
- 0 on success, or error code
◆ swdp_port_on
int(* swdp_api::swdp_port_on) (const struct device *dev) |
Enable interface, set pins to default state.
- Note
- SWDPIO is set to output mode, SWCLK and nRESET are set to high level.
- Parameters
-
- Returns
- 0 on success, or error code
◆ swdp_set_clock
int(* swdp_api::swdp_set_clock) (const struct device *dev, uint32_t clock) |
Set SWDP clock frequency.
- Parameters
-
dev | SWDP device |
clock | Clock frequency in Hz |
- Returns
- 0 on success, or error code
◆ swdp_set_pins
Set SWCLK, SWDPIO, and nRESET pins state.
- Note
- The bit positions are defined by the SWDP_*_PIN macros.
- Parameters
-
dev | SWDP device |
pins | Bitmask of pins to set |
value | Value to set pins to |
- Returns
- 0 on success, or error code
◆ swdp_transfer
Perform SWDP transfer and store response.
- Parameters
-
dev | SWDP device |
request | SWDP request bits |
data | Data to be transferred with request |
idle_cycles | Idle cycles between request and response |
response | Buffer to store response (ACK/WAIT/FAULT) |
- Returns
- 0 on success, or error code
The documentation for this struct was generated from the following file: