Ticket #20526: 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  
    4141#include "stk500v2.h"
    4242#include "stk500generic.h"
    4343#include "avr910.h"
     44#include "serjtag.h"
    4445#include "butterfly.h"
    4546#include "usbasp.h"
    4647#include "usbtiny.h"
     
    143144%token K_STK600HVSP
    144145%token K_STK600PP
    145146%token K_AVR910
     147%token K_SERJTAG
     148%token K_FT245R
    146149%token K_USBASP
    147150%token K_USBTINY
    148151%token K_BUTTERFLY
     
    449452    }
    450453  } |
    451454
     455  K_TYPE TKN_EQUAL K_SERJTAG {
     456    {
     457      serjtag_initpgm(current_prog);
     458    }
     459  } |
     460
     461  K_TYPE TKN_EQUAL K_FT245R {
     462    {
     463      ft245r_initpgm(current_prog);
     464    }
     465  } |
     466
    452467  K_TYPE TKN_EQUAL K_USBASP {
    453468    {
    454469      usbasp_initpgm(current_prog);
     
    13211336
    13221337  value = v->value.number;
    13231338
    1324   if ((value <= 0) || (value >= 18)) {
     1339  if ((value < 0) || (value >= 18)) {
    13251340    fprintf(stderr,
    13261341            "%s: error at line %d of %s: pin must be in the "
    1327             "range 1-17\n",
     1342            "range 0-17\n",
    13281343            progname, lineno, infile);
    13291344    exit(1);
    13301345  }