Ticket #23709: 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"
     
    148149%token K_STK600HVSP
    149150%token K_STK600PP
    150151%token K_AVR910
     152%token K_SERJTAG
     153%token K_FT245R
    151154%token K_USBASP
    152155%token K_USBTINY
    153156%token K_BUTTERFLY
     
    462465    }
    463466  } |
    464467
     468  K_TYPE TKN_EQUAL K_SERJTAG {
     469    {
     470      serjtag_initpgm(current_prog);
     471    }
     472  } |
     473
     474  K_TYPE TKN_EQUAL K_FT245R {
     475    {
     476      ft245r_initpgm(current_prog);
     477    }
     478  } |
     479
    465480  K_TYPE TKN_EQUAL K_USBASP {
    466481    {
    467482      usbasp_initpgm(current_prog);
     
    13711386
    13721387  value = v->value.number;
    13731388
    1374   if ((value <= 0) || (value >= 18)) {
     1389  if ((value < 0) || (value >= 18)) {
    13751390    fprintf(stderr,
    13761391            "%s: error at line %d of %s: pin must be in the "
    1377             "range 1-17\n",
     1392            "range 0-17\n",
    13781393            progname, lineno, infile);
    13791394    exit(1);
    13801395  }