11/*
22 * Copyright (c) 2013-2017 ARM Limited. All rights reserved.
3+ * Copyright 2019, Cypress Semiconductor Corporation
4+ * or a subsidiary of Cypress Semiconductor Corporation.
35 *
46 * SPDX-License-Identifier: Apache-2.0
57 *
@@ -1616,6 +1618,16 @@ __WEAK uint32_t DAP_ProcessVendorCommand(const uint8_t *request, uint8_t *respon
16161618 return ((1U << 16 ) | 1U );
16171619}
16181620
1621+ // Process DAP Vendor extended command request and prepare response
1622+ // Default function (can be overridden)
1623+ // request: pointer to request data
1624+ // response: pointer to response data
1625+ // return: number of bytes in response (lower 16 bits)
1626+ // number of bytes in request (upper 16 bits)
1627+ __weak uint32_t DAP_ProcessVendorCommandEx (const uint8_t * request , uint8_t * response ) {
1628+ * response = ID_DAP_Invalid ;
1629+ return ((1U << 16 ) | 1U );
1630+ }
16191631
16201632// Process DAP command request and prepare response
16211633// request: pointer to request data
@@ -1629,6 +1641,10 @@ uint32_t DAP_ProcessCommand(const uint8_t *request, uint8_t *response) {
16291641 return DAP_ProcessVendorCommand (request , response );
16301642 }
16311643
1644+ if ((* request >= ID_DAP_VendorExFirst ) && (* request <= ID_DAP_VendorExLast )) {
1645+ return DAP_ProcessVendorCommandEx (request , response );
1646+ }
1647+
16321648 * response ++ = * request ;
16331649
16341650 switch (* request ++ ) {
0 commit comments