Skip to content

Commit

Permalink
Grunt pass
Browse files Browse the repository at this point in the history
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
  • Loading branch information
rwaldron committed Aug 17, 2016
1 parent cbd6b3f commit 0f07402
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions lib/flash.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function factoryPartition(mac1, mac2) {
);
}

function transaction (usbConnection, write, read, status_poll, wren, next) {
function transaction(usbConnection, write, read, status_poll, wren, next) {
read = read || 0;
status_poll = status_poll || false;
wren = wren || false;
Expand Down Expand Up @@ -69,8 +69,8 @@ function eraseChip(usbConnection, next) {
}

// Poll for the WIP bit in the status register to go low
function waitTransactionComplete (usbConnection, next) {
setTimeout(function onWait () {
function waitTransactionComplete(usbConnection, next) {
setTimeout(function onWait() {
getStatus(usbConnection, (err, status) => {
if (err) {
return next(err);
Expand All @@ -85,7 +85,7 @@ function waitTransactionComplete (usbConnection, next) {

// Read the status register
function getStatus(usbConnection, next) {
transaction(usbConnection, [0x05], 1, null, null,(err, data) => {
transaction(usbConnection, [0x05], 1, null, null, (err, data) => {
next(err, data ? data[0] : data);
});
}
Expand All @@ -110,7 +110,7 @@ function write(usbConnection, writeAddress, data, sliceStart, next) {
}

function toBuffer() {
return Buffer.concat( Array.from(arguments).map (
return Buffer.concat(Array.from(arguments).map(
(arg) => Array.isArray(arg) ? new Buffer(arg) : arg
));
}
Expand Down Expand Up @@ -146,7 +146,7 @@ function asyncLog(msg) {
}

module.exports = function flashDevice(usbConnection, ubootBuffer, squashfsBuffer) {
return new Promise((resolve, reject)=> {
return new Promise((resolve, reject) => {
var uid = [randbyte(), randbyte(), randbyte(), randbyte()];
var mac1 = [0x02, 0xa3].concat(uid);
var mac2 = [0x02, 0xa4].concat(uid);
Expand Down
2 changes: 1 addition & 1 deletion lib/tessel/restore.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ var update = require('../update-fetch');
var log = require('../log');
var flash = require('../flash');

Tessel.prototype.restore = function restore () {
Tessel.prototype.restore = function restore() {
var usbConnection = this.connection;
return new Promise((resolve, reject) => {

Expand Down

0 comments on commit 0f07402

Please sign in to comment.