- Take every jumper off except JP1. Take both jumpers off CN3. Take the jumpers JP2 and JP3 off from the bottom of the board.
- Put a jumper between
BOOT0andVDD. - Connect with a wire PA9 to 5V.
- Connect the device using the micro USB port, not the mini-USB port.
sudo dfu-util -d 0483:df11 -a 0 -s 0x08000000 -D build/Example_Project.bin- Unplug the device.
- Disconnect the BOOT0 jumper.
- Plug the device in.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 10 01;setDefaultSession | |
| 10 02;setProgrammingSession | |
| 10 03;setExtendedDiagnosticSession | |
| 11 01;hardReset | |
| 14 FF FF FF,31 01 0F 06,31 01 40 00 00,31 01 40 00 05,31 01 40 00 01;Clear all DTCs (clear DTC,clear Infospeicher,ZFS ***8211; DM_Lock,clear ZFS ***8211; DM_Clear,ZFS ***8211; DM_Unlock) | |
| 14 FF FF FF;Clear DTC | |
| 19 02 0C;ReadDTC(0C) | |
| 19 0A;ReadSupportedDTC | |
| 22 10 0A;readEnergyMode | |
| 22 10 0E;readExtendedMode |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: v1 | |
| kind: Namespace | |
| metadata: | |
| name: docker-dev | |
| --- | |
| apiVersion: v1 | |
| kind: Pod | |
| metadata: | |
| name: docker-compose-pod | |
| namespace: docker-dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const Promise = require('bluebird'); | |
| const fs = require('fs'); | |
| const execa = require('execa'); | |
| class BlueGreenDeployment { | |
| constructor({appName, blueProxyPassPattern, greenProxyPassPattern, nginxConfigFile}) { | |
| this.appName = appName; | |
| this.blueProxyPassPattern = blueProxyPassPattern; | |
| this.greenProxyPassPattern = greenProxyPassPattern; | |
| this.nginxConfigFile = nginxConfigFile; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const bindEvent = (eventNames, selector, handler) => { | |
| eventNames.split(' ').forEach((eventName) => { | |
| document.addEventListener(eventName, function (event) { | |
| if (event.target.matches(selector + ', ' + selector + ' *')) { | |
| handler.apply(event.target.closest(selector), arguments) | |
| } | |
| }, false) | |
| }) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use log::warn; | |
| use std::future::Future; | |
| pub async fn timeout_wrapper<Fut, T>(timeout_ms: u64, cb: &impl Fn() -> Fut) -> Result<T, String> | |
| where | |
| Fut: Future<Output = Result<T, String>>, | |
| { | |
| let request_future = cb(); | |
| let timeout_future = tokio::time::timeout(tokio::time::Duration::from_millis(timeout_ms), request_future).await; | |
| if timeout_future.is_err() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import WebSocket from 'ws' | |
| const parseWsPacket = (str) => { | |
| const cleanerRgx = /~h~/g | |
| const splitterRgx = /~m~[0-9]{1,}~m~/g | |
| return str | |
| .replace(cleanerRgx, '') | |
| .split(splitterRgx) | |
| .map((p) => { | |
| if (!p) return false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Preact HTM Example</title> | |
| </head> | |
| <body> | |
| <script type="module"> | |
| // 1. imports from unpkg.com | |
| import * as Preact from 'https://unpkg.com/preact@10.4.7/dist/preact.module.js' | |
| import htm from 'https://unpkg.com/htm@3.0.4/dist/htm.module.js' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Random code sequences I found throughout a flashing tool | |
| D = new hs("RCS_EraseCoding", "31 01 0F 01", 3, false); | |
| e = new ha("DSC_DS", "10 01"); | |
| f = new ha("DSC_ES", "10 03"); | |
| g = new ha("DSC_PS", "10 02"); | |
| h = new ha("DSC_DEVS", "10 4F"); | |
| i = new ha("DSC_CS", "10 41"); | |
| j = new ku("RCS_SEMD", "31 01 0F 0C 00"); | |
| k = new ku("RCS_SEMF", "31 01 0F 0C 03"); |
NewerOlder