# Setup configuration options.
setup_option_def(ENC28J60_AVR_RESET_DELAY 100 MACRO "Time in miliseconds to assert the reset line of ENC28J60 ethernet controller." CONFIG_FILE "enc28j60_avr_config")
setup_option_def(ENC28J60_USE_SPI_BB OFF BOOL "Use bit band SPI for ENC28J60 ethernet controller. Needs manual modifications to configure bit bang interface if default SPI is not used." CONFIG_FILE "enc28j60_avr_config")
setup_option_def(ENC28J60_RST 4 INT "Reset (RST) pin number for ENC28J60." VALUE_LIST atmega_pinnum_values CONFIG_FILE "enc28j60_avr_config")
setup_option_def(ENC28J60_RST_PORT PORTD MACRO "Reset (RST) PORT register for ENC28J60." VALUE_LIST atmega_port_values CONFIG_FILE "enc28j60_avr_config")
setup_option_def(ENC28J60_RST_DDR DDRD MACRO "Reset (RST) DDR register for ENC28J60." VALUE_LIST atmega_ddr_values CONFIG_FILE "enc28j60_avr_config")
setup_option_def(ENC28J60_RST_PIN PIND MACRO "Reset (RST) PIN register for ENC28J60." VALUE_LIST atmega_pin_values CONFIG_FILE "enc28j60_avr_config")
setup_option_def(ENC28J60_INT_SOURCE INT0 MACRO "Interrupt source on AVR for ENC28J60." VALUE_LIST atmega_int_values CONFIG_FILE "enc28j60_avr_config")
setup_option_def(ENC28J60_INT 2 INT "Interrupt (INT) pin number for ENC28J60." VALUE_LIST atmega_pinnum_values CONFIG_FILE "enc28j60_avr_config")
setup_option_def(ENC28J60_INT_PORT PORTD MACRO "Interrupt (INT) PORT register for ENC28J60." VALUE_LIST atmega_port_values CONFIG_FILE "enc28j60_avr_config")
setup_option_def(ENC28J60_INT_DDR DDRD MACRO "Interrupt (INT) DDR register for ENC28J60." VALUE_LIST atmega_ddr_values CONFIG_FILE "enc28j60_avr_config")
setup_option_def(ENC28J60_INT_PIN PIND MACRO "Interrupt (INT) PIN register for ENC28J60." VALUE_LIST atmega_pin_values CONFIG_FILE "enc28j60_avr_config")
if (${ENC28J60_USE_SPI_BB})
    setup_option_def(ENC28J60_AVR_SPI_SS_BB 4 INT "SPI slave select pin number for ENC28J60 ethernet controller (bit-bang)." VALUE_LIST atmega_pinnum_values CONFIG_FILE "enc28j60_avr_config")
    setup_option_def(ENC28J60_AVR_SPI_PIN_SS_BB PINB INT "SPI slave select PIN register for ENC28J60 ethernet controller (bit-bang)." VALUE_FUN atmega_regmap VALUE_LIST atmega_pin_values CONFIG_FILE "enc28j60_avr_config")
    setup_option_def(ENC28J60_AVR_SPI_DDR_SS_BB DDRB INT "SPI slave select DDR register for ENC28J60 ethernet controller (bit-bang)." VALUE_FUN atmega_regmap VALUE_LIST atmega_ddr_values CONFIG_FILE "enc28j60_avr_config")
    setup_option_def(ENC28J60_AVR_SPI_PORT_SS_BB PORTB INT "SPI slave select PORT register for ENC28J60 ethernet controller (bit-bang)." VALUE_FUN atmega_regmap VALUE_LIST atmega_port_values CONFIG_FILE "enc28j60_avr_config")
    setup_option_def(ENC28J60_AVR_SPI_MOSI_BB 5 INT "SPI MOSI pin number for ENC28J60 ethernet controller (bit-bang)." VALUE_LIST atmega_pinnum_values CONFIG_FILE "enc28j60_avr_config")
    setup_option_def(ENC28J60_AVR_SPI_PIN_MOSI_BB PINB INT "SPI MOSI PIN register for ENC28J60 ethernet controller (bit-bang)." VALUE_FUN atmega_regmap VALUE_LIST atmega_pin_values CONFIG_FILE "enc28j60_avr_config")
    setup_option_def(ENC28J60_AVR_SPI_DDR_MOSI_BB DDRB INT "SPI MOSI DDR register for ENC28J60 ethernet controller (bit-bang)." VALUE_FUN atmega_regmap VALUE_LIST atmega_ddr_values CONFIG_FILE "enc28j60_avr_config")
    setup_option_def(ENC28J60_AVR_SPI_PORT_MOSI_BB PORTB INT "SPI MOSI PORT register for ENC28J60 ethernet controller (bit-bang)." VALUE_FUN atmega_regmap VALUE_LIST atmega_port_values CONFIG_FILE "enc28j60_avr_config")
    setup_option_def(ENC28J60_AVR_SPI_MISO_BB 6 INT "SPI MISO pin number for ENC28J60 ethernet controller (bit-bang)." VALUE_LIST atmega_pinnum_values CONFIG_FILE "enc28j60_avr_config")
    setup_option_def(ENC28J60_AVR_SPI_PIN_MISO_BB PINB INT "SPI MISO PIN register for ENC28J60 ethernet controller (bit-bang)." VALUE_FUN atmega_regmap VALUE_LIST atmega_pin_values CONFIG_FILE "enc28j60_avr_config")
    setup_option_def(ENC28J60_AVR_SPI_DDR_MISO_BB DDRB INT "SPI MISO DDR register for ENC28J60 ethernet controller (bit-bang)." VALUE_FUN atmega_regmap VALUE_LIST atmega_ddr_values CONFIG_FILE "enc28j60_avr_config")
    setup_option_def(ENC28J60_AVR_SPI_PORT_MISO_BB PORTB INT "SPI MISO PORT register for ENC28J60 ethernet controller (bit-bang)." VALUE_FUN atmega_regmap VALUE_LIST atmega_port_values CONFIG_FILE "enc28j60_avr_config")
    setup_option_def(ENC28J60_AVR_SPI_SCLK_BB 7 INT "SPI clock pin number for ENC28J60 ethernet controller (bit-bang)." VALUE_LIST atmega_pinnum_values CONFIG_FILE "enc28j60_avr_config")
    setup_option_def(ENC28J60_AVR_SPI_PIN_SCLK_BB PINB INT "SPI clock PIN register for ENC28J60 ethernet controller (bit-bang)." VALUE_FUN atmega_regmap VALUE_LIST atmega_pin_values CONFIG_FILE "enc28j60_avr_config")
    setup_option_def(ENC28J60_AVR_SPI_DDR_SCLK_BB DDRB INT "SPI clock DDR register for ENC28J60 ethernet controller (bit-bang)." VALUE_FUN atmega_regmap VALUE_LIST atmega_ddr_values CONFIG_FILE "enc28j60_avr_config")
    setup_option_def(ENC28J60_AVR_SPI_PORT_SCLK_BB PORTB INT "SPI clock PORT register for ENC28J60 ethernet controller (bit-bang)." VALUE_FUN atmega_regmap VALUE_LIST atmega_port_values CONFIG_FILE "enc28j60_avr_config")
else ()
    setup_option_def(ENC28J60_AVR_BAUDRATE 21000000 MACRO "SPI baudaret for ENC28J60 device." CONFIG_FILE "enc28j60_avr_config")
endif ()