1
1
/*
2
2
* Copyright (c) 2013-2017 ARM Limited. All rights reserved.
3
+ * Copyright 2019, Cypress Semiconductor Corporation
4
+ * or a subsidiary of Cypress Semiconductor Corporation.
3
5
*
4
6
* SPDX-License-Identifier: Apache-2.0
5
7
*
@@ -1616,6 +1618,16 @@ __WEAK uint32_t DAP_ProcessVendorCommand(const uint8_t *request, uint8_t *respon
1616
1618
return ((1U << 16 ) | 1U );
1617
1619
}
1618
1620
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
+ }
1619
1631
1620
1632
// Process DAP command request and prepare response
1621
1633
// request: pointer to request data
@@ -1629,6 +1641,10 @@ uint32_t DAP_ProcessCommand(const uint8_t *request, uint8_t *response) {
1629
1641
return DAP_ProcessVendorCommand (request , response );
1630
1642
}
1631
1643
1644
+ if ((* request >= ID_DAP_VendorExFirst ) && (* request <= ID_DAP_VendorExLast )) {
1645
+ return DAP_ProcessVendorCommandEx (request , response );
1646
+ }
1647
+
1632
1648
* response ++ = * request ;
1633
1649
1634
1650
switch (* request ++ ) {
0 commit comments