1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
static void setup_irq_handler(void)
{
    static int flip = 0;

    /* copy setup data from packet */
    setup_data[0] = SETUP1;
    setup_data[1] = SETUP2;

    /* ack upper layer we have setup data */
    setup_data_valid = true;

    flip ^= 1;

    if (flip)
        backlight_on();
    else
        backlight_off();
}