always
    define SPIRAMS_ENABLED
    file rd_spirams.o
    require rdisk
    require spibus
    define SPIRAMS_CHIPSIZE   128
end always

option chips 
    define SPIRAMS_CHIPS %1
end option

option port
    define SPIRAMS_PORT %1
end option

option chipsize
    define SPIRAMS_CHIPSIZE %1
end option

option mhz
    define SPIRAMS_MHZ %1
end option

option cs0 
    define SPIRAMS_CS0_PORT   $TRIS(%1)
    define SPIRAMS_CS0_PIN    $PIN(%1)
end option

option cs1 
    define SPIRAMS_CS1_PORT   $TRIS(%1)
    define SPIRAMS_CS1_PIN    $PIN(%1)
end option

option cs2 
    define SPIRAMS_CS2_PORT   $TRIS(%1)
    define SPIRAMS_CS2_PIN    $PIN(%1)
end option

option cs3 
    define SPIRAMS_CS3_PORT   $TRIS(%1)
    define SPIRAMS_CS3_PIN    $PIN(%1)
end option

option cs4 
    define SPIRAMS_CS4_PORT   $TRIS(%1)
    define SPIRAMS_CS4_PIN    $PIN(%1)
end option

option cs5 
    define SPIRAMS_CS5_PORT   $TRIS(%1)
    define SPIRAMS_CS5_PIN    $PIN(%1)
end option

option cs6 
    define SPIRAMS_CS6_PORT   $TRIS(%1)
    define SPIRAMS_CS6_PIN    $PIN(%1)
end option

option cs7 
    define SPIRAMS_CS7_PORT   $TRIS(%1)
    define SPIRAMS_CS7_PIN    $PIN(%1)
end option

option cs8 
    define SPIRAMS_CS8_PORT   $TRIS(%1)
    define SPIRAMS_CS8_PIN    $PIN(%1)
end option

option cs9 
    define SPIRAMS_CS9_PORT   $TRIS(%1)
    define SPIRAMS_CS9_PIN    $PIN(%1)
end option

option cs10 
    define SPIRAMS_CS10_PORT   $TRIS(%1)
    define SPIRAMS_CS10_PIN    $PIN(%1)
end option

option cs11 
    define SPIRAMS_CS11_PORT   $TRIS(%1)
    define SPIRAMS_CS11_PIN    $PIN(%1)
end option

option cs12 
    define SPIRAMS_CS12_PORT   $TRIS(%1)
    define SPIRAMS_CS12_PIN    $PIN(%1)
end option

option cs13 
    define SPIRAMS_CS13_PORT   $TRIS(%1)
    define SPIRAMS_CS13_PIN    $PIN(%1)
end option

option cs14 
    define SPIRAMS_CS14_PORT   $TRIS(%1)
    define SPIRAMS_CS14_PIN    $PIN(%1)
end option

option cs15 
    define SPIRAMS_CS15_PORT   $TRIS(%1)
    define SPIRAMS_CS15_PIN    $PIN(%1)
end option

option led0
    define SPIRAMS_LED0_PORT  $TRIS(%1)
    define SPIRAMS_LED0_PIN   $PIN(%1)
end option

option led1
    define SPIRAMS_LED1_PORT  $TRIS(%1)
    define SPIRAMS_LED1_PIN   $PIN(%1)
end option

option led2
    define SPIRAMS_LED2_PORT  $TRIS(%1)
    define SPIRAMS_LED2_PIN   $PIN(%1)
end option

option led3
    define SPIRAMS_LED3_PORT  $TRIS(%1)
    define SPIRAMS_LED3_PIN   $PIN(%1)
end option

option led4
    define SPIRAMS_LED4_PORT  $TRIS(%1)
    define SPIRAMS_LED4_PIN   $PIN(%1)
end option

option led5
    define SPIRAMS_LED5_PORT  $TRIS(%1)
    define SPIRAMS_LED5_PIN   $PIN(%1)
end option

option led6
    define SPIRAMS_LED6_PORT  $TRIS(%1)
    define SPIRAMS_LED6_PIN   $PIN(%1)
end option

option led7
    define SPIRAMS_LED7_PORT  $TRIS(%1)
    define SPIRAMS_LED7_PIN   $PIN(%1)
end option

option led8
    define SPIRAMS_LED8_PORT  $TRIS(%1)
    define SPIRAMS_LED8_PIN   $PIN(%1)
end option

option led9
    define SPIRAMS_LED9_PORT  $TRIS(%1)
    define SPIRAMS_LED9_PIN   $PIN(%1)
end option

option led10
    define SPIRAMS_LED10_PORT  $TRIS(%1)
    define SPIRAMS_LED10_PIN   $PIN(%1)
end option

option led11
    define SPIRAMS_LED11_PORT  $TRIS(%1)
    define SPIRAMS_LED11_PIN   $PIN(%1)
end option

option led12
    define SPIRAMS_LED12_PORT  $TRIS(%1)
    define SPIRAMS_LED12_PIN   $PIN(%1)
end option

option led13
    define SPIRAMS_LED13_PORT  $TRIS(%1)
    define SPIRAMS_LED13_PIN   $PIN(%1)
end option

option led14
    define SPIRAMS_LED14_PORT  $TRIS(%1)
    define SPIRAMS_LED14_PIN   $PIN(%1)
end option

option led15
    define SPIRAMS_LED15_PORT  $TRIS(%1)
    define SPIRAMS_LED15_PIN   $PIN(%1)
end option

