Kale |
Il Sindaco
|
|
|
Reged: 09/26/03
|
Posts: 155
|
Loc: Naples, Italy
|
|
Send PM
|
|
Re: Rotary DIP switches
06/23/09 05:24 PM
|
|
|
Code:
PORT_START("name_of_the_bcd_dipsw_tag") PORT_DIPNAME( 0x0f, default_val, whatever_the_dip_does ) //BCD DIP-SW PORT_DIPSETTING( 0x00, "value_0" ) PORT_DIPSETTING( 0x01, "value_1" ) ... PORT_DIPSETTING( 0x09, "value_9" ) //A-F invalid / doesn't exist
In short, it's not necessary that you call all the dipsettings of a given input (there are various examples in the source that does that).
|
|