Just a thought that you might want to consider; instead of manually setting the individual pattern members (t_led_blink, etc.), have you considered just having a static array of all of the possible patterns, and a single variable that selects the 'current' pattern from the set?