Lines Matching full:response

39 		/* Number of retries after WAIT response */
72 uint8_t *const response) in dap_info() argument
74 uint8_t *info = response + 1; in dap_info()
160 response[0] = length; in dap_info()
165 /* Process Host Status command and prepare response */
168 uint8_t *const response) in dap_host_status() argument
182 *response = DAP_ERROR; in dap_host_status()
186 response[0] = DAP_OK; in dap_host_status()
190 /* Process Connect command and prepare response */
193 uint8_t *const response) in dap_connect() argument
227 response[0] = port; in dap_connect()
231 /* Process Disconnect command and prepare response */
233 uint8_t *const response) in dap_disconnect() argument
247 response[0] = DAP_OK; in dap_disconnect()
253 /* Process Delay command and prepare response */
256 uint8_t *const response) in dap_delay() argument
263 response[0] = DAP_OK; in dap_delay()
268 /* Process Reset Target command and prepare response */
270 uint8_t *const response) in dap_reset_target() argument
272 response[0] = DAP_OK; in dap_reset_target()
273 response[1] = 0U; in dap_reset_target()
279 /* Process SWJ Pins command and prepare response */
282 uint8_t *const response) in dap_swj_pins() argument
293 response[0] = DAP_ERROR; in dap_swj_pins()
312 response[0] = state; in dap_swj_pins()
317 /* Process SWJ Clock command and prepare response */
320 uint8_t *const response) in dap_swj_clock() argument
330 response[0] = DAP_OK; in dap_swj_clock()
332 response[0] = DAP_ERROR; in dap_swj_clock()
336 response[0] = DAP_OK; in dap_swj_clock()
342 /* Process SWJ Sequence command and prepare response */
345 uint8_t *const response) in dap_swj_sequence() argument
358 response[0] = DAP_ERROR; in dap_swj_sequence()
363 response[0] = DAP_OK; in dap_swj_sequence()
368 /* Process SWD Configure command and prepare response */
371 uint8_t *const response) in dap_swdp_configure() argument
379 response[0] = DAP_ERROR; in dap_swdp_configure()
384 response[0] = DAP_OK; in dap_swdp_configure()
389 /* Process Transfer Configure command and prepare response */
392 uint8_t *const response) in dap_transfer_cfg() argument
403 response[0] = DAP_OK; in dap_transfer_cfg()
463 * Process SWD Transfer command and prepare response
473 uint8_t *const response) in dap_swdp_transfer() argument
489 rspns_buf = response + (sizeof(rspns_cnt) + sizeof(rspns_val)); in dap_swdp_transfer()
606 response[0] = rspns_cnt; in dap_swdp_transfer()
607 response[1] = rspns_val; in dap_swdp_transfer()
609 return (rspns_buf - response); in dap_swdp_transfer()
615 uint8_t *const response) in dap_transfer() argument
621 response[0] = DAP_ERROR; in dap_transfer()
627 retval = dap_swdp_transfer(ctx, request, response); in dap_transfer()
632 response[0] = DAP_ERROR; in dap_transfer()
641 uint8_t *const response) in dap_swdp_sequence() argument
645 uint8_t *response_data = response + 1; in dap_swdp_sequence()
653 response[0] = DAP_OK; in dap_swdp_sequence()
658 response[0] = DAP_ERROR; in dap_swdp_sequence()
682 return response_data - response; in dap_swdp_sequence()
686 * Process SWD DAP_TransferBlock command and prepare response.
695 uint8_t *const response) in dap_swdp_transferblock() argument
708 rspns_buf = response + (sizeof(rspns_cnt) + sizeof(rspns_val)); in dap_swdp_transferblock()
761 sys_put_le16(rspns_cnt, &response[0]); in dap_swdp_transferblock()
762 response[2] = rspns_val; in dap_swdp_transferblock()
764 LOG_DBG("Received %u, to transmit %u, response count %u", in dap_swdp_transferblock()
766 rspns_buf - response, in dap_swdp_transferblock()
769 return (rspns_buf - response); in dap_swdp_transferblock()
775 uint8_t *const response) in dap_transferblock() argument
781 /* Clear response count */ in dap_transferblock()
782 sys_put_le16(0U, &response[0]); in dap_transferblock()
783 /* Clear DAP response (ACK) value */ in dap_transferblock()
784 response[2] = 0U; in dap_transferblock()
790 retval = dap_swdp_transferblock(ctx, request, response); in dap_transferblock()
795 /* Clear response count */ in dap_transferblock()
796 sys_put_le16(0U, &response[0]); in dap_transferblock()
797 /* Clear DAP response (ACK) value */ in dap_transferblock()
798 response[2] = 0U; in dap_transferblock()
805 /* Process SWD Write ABORT command and prepare response */
808 uint8_t *const response) in dap_swdp_writeabort() argument
818 response[0] = DAP_OK; in dap_swdp_writeabort()
825 uint8_t *const response) in dap_writeabort() argument
831 response[0] = DAP_ERROR; in dap_writeabort()
837 retval = dap_swdp_writeabort(ctx, request, response); in dap_writeabort()
842 response[0] = DAP_ERROR; in dap_writeabort()
851 uint8_t *const response) in dap_process_vendor_cmd() argument
853 response[0] = ID_DAP_INVALID; in dap_process_vendor_cmd()
858 * Process DAP command request and prepare response
860 * response: pointer to response data
861 * return: number of bytes in response
868 uint8_t *response) in dap_process_cmd() argument
875 return dap_process_vendor_cmd(ctx, request, response); in dap_process_cmd()
878 *response++ = *request; in dap_process_cmd()
883 retval = dap_info(ctx, request, response); in dap_process_cmd()
886 retval = dap_host_status(ctx, request, response); in dap_process_cmd()
889 retval = dap_connect(ctx, request, response); in dap_process_cmd()
892 retval = dap_disconnect(ctx, response); in dap_process_cmd()
895 retval = dap_delay(ctx, request, response); in dap_process_cmd()
898 retval = dap_reset_target(ctx, response); in dap_process_cmd()
901 retval = dap_swj_pins(ctx, request, response); in dap_process_cmd()
904 retval = dap_swj_clock(ctx, request, response); in dap_process_cmd()
907 retval = dap_swj_sequence(ctx, request, response); in dap_process_cmd()
910 retval = dap_swdp_configure(ctx, request, response); in dap_process_cmd()
913 retval = dap_swdp_sequence(ctx, request, response); in dap_process_cmd()
918 *response = DAP_ERROR; in dap_process_cmd()
923 *response = DAP_ERROR; in dap_process_cmd()
928 *response = DAP_ERROR; in dap_process_cmd()
931 retval = dap_transfer_cfg(ctx, request, response); in dap_process_cmd()
934 retval = dap_transfer(ctx, request, response); in dap_process_cmd()
937 retval = dap_transferblock(ctx, request, response); in dap_process_cmd()
940 retval = dap_writeabort(ctx, request, response); in dap_process_cmd()
945 *response = DAP_ERROR; in dap_process_cmd()
950 *response = DAP_ERROR; in dap_process_cmd()
955 *response = DAP_ERROR; in dap_process_cmd()
960 *response = DAP_ERROR; in dap_process_cmd()
965 *response = DAP_ERROR; in dap_process_cmd()
970 *response = DAP_ERROR; in dap_process_cmd()
975 *response = DAP_ERROR; in dap_process_cmd()
980 *response = DAP_ERROR; in dap_process_cmd()
985 *response = DAP_ERROR; in dap_process_cmd()
990 *response = DAP_ERROR; in dap_process_cmd()
995 *response = DAP_ERROR; in dap_process_cmd()
999 *(response - 1) = ID_DAP_INVALID; in dap_process_cmd()
1007 * Execute DAP command (process request and prepare response)
1009 * response: pointer to response data
1010 * return: number of bytes in response
1013 uint8_t *response) in dap_execute_cmd() argument
1021 *response++ = *request++; in dap_execute_cmd()
1024 response[0] = count; in dap_execute_cmd()
1025 response += sizeof(count); in dap_execute_cmd()
1029 n = dap_process_cmd(&dap_ctx[0], request, response); in dap_execute_cmd()
1032 response += n; in dap_execute_cmd()
1037 return dap_process_cmd(&dap_ctx[0], request, response); in dap_execute_cmd()