zvecr / bootload-hid

Library for flashing BootloadHID devices

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bootload-hid

Library for flashing BootloadHID devices

npm version Build Status Codacy Badge Dependabot Status Code Status

CURRENTLY BETA: USE AT OWN RISK

NodeJS implementation of https://www.obdev.at/products/vusb/bootloadhid.html.

Install

$ npm install bootload-hid

Usage

List available devices

const BootloadHID = require('bootload-hid');

BootloadHID.list((err, devices) => {
    console.log('devices', devices);
});

Flash the first found device

const BootloadHID = require('bootload-hid');

const loader = new BootloadHID({
    debug: true,
    manualReset: false,
});

// GO....
loader.flash(args.file, (error) => {
    if (error) {
        console.error(error.message);
    } else {
        console.info('done.');
    }
});

About

Library for flashing BootloadHID devices

License:MIT License


Languages

Language:JavaScript 100.0%