Skip to content

Commit c87021f

Browse files
thegeckoarekzaluski
authored andcommitted
Use DAPLinkSerial.READ for VENDOR_CODE
1 parent 9fd227e commit c87021f

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/daplink/index.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,6 @@ const DEFAULT_SERIAL_DELAY = 100;
3838
* @hidden
3939
*/
4040
const DEFAULT_PAGE_SIZE = 62;
41-
/**
42-
* @hidden
43-
*/
44-
const SERIAL_VENDOR_CODE = 131;
4541

4642
/**
4743
* DAPLink Class
@@ -214,7 +210,7 @@ export class DAPLink extends CmsisDAP {
214210
}
215211

216212
// First byte contains the vendor code
217-
if (serialData.getUint8(0) !== SERIAL_VENDOR_CODE) {
213+
if (serialData.getUint8(0) !== DAPLinkSerial.READ) {
218214
return undefined;
219215
}
220216

0 commit comments

Comments
 (0)