Ticket #23120: patch-config_gram.y.diff

File patch-config_gram.y.diff, 1.1 KB (added by ranauei@…, 15 years ago)
  • config_gram.y

    old new  
    4242#include "stk500v2.h"
    4343#include "stk500generic.h"
    4444#include "avr910.h"
     45#include "serjtag.h"
    4546#include "butterfly.h"
    4647#include "usbasp.h"
    4748#include "usbtiny.h"
     
    146147%token K_STK600HVSP
    147148%token K_STK600PP
    148149%token K_AVR910
     150%token K_SERJTAG
     151%token K_FT245R
    149152%token K_USBASP
    150153%token K_USBTINY
    151154%token K_BUTTERFLY
     
    459462    }
    460463  } |
    461464
     465  K_TYPE TKN_EQUAL K_SERJTAG {
     466    {
     467      serjtag_initpgm(current_prog);
     468    }
     469  } |
     470
     471  K_TYPE TKN_EQUAL K_FT245R {
     472    {
     473      ft245r_initpgm(current_prog);
     474    }
     475  } |
     476
    462477  K_TYPE TKN_EQUAL K_USBASP {
    463478    {
    464479      usbasp_initpgm(current_prog);
     
    13461361
    13471362  value = v->value.number;
    13481363
    1349   if ((value <= 0) || (value >= 18)) {
     1364  if ((value < 0) || (value >= 18)) {
    13501365    fprintf(stderr,
    13511366            "%s: error at line %d of %s: pin must be in the "
    1352             "range 1-17\n",
     1367            "range 0-17\n",
    13531368            progname, lineno, infile);
    13541369    exit(1);
    13551370  }