Skip to content

Commit

Permalink
Allows breathing animation to be cancelled before flashing
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnyman727 committed Feb 16, 2016
1 parent 9c160ba commit fe0a2b9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions firmware/firmware.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ void bridge_close_1();
void bridge_close_2();
void bridge_close_3();

void cancel_breathing_animation();
void init_breathing_animation();

// port.c

#define UART_MS_TIMEOUT 10 // send uart data after ms timeout even if buffer is not full
Expand Down
2 changes: 2 additions & 0 deletions firmware/usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,7 @@ bool usb_cb_set_interface(uint16_t interface, uint16_t new_altsetting) {

if (altsetting == ALTSETTING_FLASH) {
flash_disable();
init_breathing_animation();
} else if (altsetting == ALTSETTING_PIPE) {
usbpipe_disable();
}
Expand All @@ -440,6 +441,7 @@ bool usb_cb_set_interface(uint16_t interface, uint16_t new_altsetting) {
}

if (new_altsetting == ALTSETTING_FLASH){
cancel_breathing_animation();
flash_init();
} else if (booted && new_altsetting == ALTSETTING_PIPE) {
usbpipe_init();
Expand Down

0 comments on commit fe0a2b9

Please sign in to comment.