<commit_before>var tessel = require('tessel');
var Queue = require('sync-queue');
var fs = require('fs');

var CLOCKSPEED_FUSES = 125000 // Arduino's SPI_CLOCK_DIV128, 125Khz
  , CLOCKSPEED_FLASH = 2000000 // SPI_CLOCK_DIV8, 2Mhz
  , FUSES = {"lock": 0xFF, "low": 0xE2, "high": 0xDF, "ext": 0xFF}  // pre program fuses (prot/lock, low, high, ext)
  , MASK = {"lock": 0xFF, "low": 0xFF, "high": 0xFF, "ext": 0xFF}
  , HIGH = 0x01
  , LOW = 0x00
  ;
var debug = false;

ISP = function(hardware, options){
  this.chipSelect = hardware.digital[0].output().high();
  this.reset = hardware.digital[1].output().high();
  this.spi = new hardware.SPI(
    {clockSpeed:CLOCKSPEED_FUSES, mode:0
    });

  this.success = tessel.led[0];
  this.programming = tessel.led[1];

  this.pageSize = options.pageSize;
  this.fname = options.fileName

  this.clockSpeed = CLOCKSPEED_FUSES;

  this.incorrect = 0;
}

ISP.prototype._clockChange = function (speed) {
  if (this.clockSpeed == speed) return;

  this.clockSpeed = speed;<commit_msg>Adds check to make sure options struct is created in init<commit_after>var tessel = require('tessel');
var Queue = require('sync-queue');
var fs = require('fs');

var CLOCKSPEED_FUSES = 125000 // Arduino's SPI_CLOCK_DIV128, 125Khz
  , CLOCKSPEED_FLASH = 2000000 // SPI_CLOCK_DIV8, 2Mhz
  , FUSES = {"lock": 0xFF, "low": 0xE2, "high": 0xDF, "ext": 0xFF}  // pre program fuses (prot/lock, low, high, ext)
  , MASK = {"lock": 0xFF, "low": 0xFF, "high": 0xFF, "ext": 0xFF}
  , HIGH = 0x01
  , LOW = 0x00
  ;
var debug = false;

ISP = function(hardware, options){
  this.chipSelect = hardware.digital[0].output().high();
  this.reset = hardware.digital[1].output().high();
  this.spi = new hardware.SPI(
    {clockSpeed:CLOCKSPEED_FUSES, mode:0
    });

  this.success = tessel.led[0];
  this.programming = tessel.led[1];

  options = options || {};
  this.pageSize = options.pageSize;
  this.fname = options.fileName

  this.clockSpeed = CLOCKSPEED_FUSES;

  this.incorrect = 0;
}

ISP.prototype._clockChange = function (speed) {
  if (this.clockSpeed == speed) return;

  this.clockSpeed = speed;
{'fraction_non_alphanumeric': 0.15981087470449173, 'fraction_numerical': 0.03971631205673759, 'mean_word_length': 4.038095238095238, 'pattern_counts': {'":': 16, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '386578', 'n_tokens_mistral': 889, 'n_tokens_neox': 785, 'n_words': 179}