Compare commits
No commits in common. "5554763ff429e78b3965356dd9f1971a91e31181" and "50151635221cf724f2092ea417028bb54cca8d09" have entirely different histories.
5554763ff4
...
5015163522
@ -29,6 +29,5 @@ void display_write_data_byte(uint8_t code);
|
|||||||
void display_write_data_seq(char *codes);
|
void display_write_data_seq(char *codes);
|
||||||
void display_to_framebuffer(void);
|
void display_to_framebuffer(void);
|
||||||
void display_to_direct(void);
|
void display_to_direct(void);
|
||||||
void display_load(uint32_t frame_no);
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -315,53 +315,13 @@ int main(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
display_to_direct();
|
display_to_direct();
|
||||||
|
|
||||||
display_current_frame = 0;
|
display_current_frame = 0;
|
||||||
|
|
||||||
if (buttons_interrupt_enabled)
|
|
||||||
buttons_switch_to_input();
|
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
// wait until all buttons are released
|
|
||||||
while (
|
|
||||||
(GPIOA->IDR & GPIO_PIN_0) ||
|
|
||||||
!(GPIOC->IDR & GPIO_PIN_11) ||
|
|
||||||
!(GPIOC->IDR & GPIO_PIN_8) ||
|
|
||||||
!(GPIOC->IDR & GPIO_PIN_9) ||
|
|
||||||
!(GPIOC->IDR & GPIO_PIN_6) ||
|
|
||||||
!(GPIOA->IDR & GPIO_PIN_15)
|
|
||||||
) { asm("nop"); }
|
|
||||||
|
|
||||||
display_load(display_current_frame);
|
display_load(display_current_frame);
|
||||||
|
display_current_frame++;
|
||||||
while (1) {
|
display_current_frame %= 11;
|
||||||
// go to next report
|
HAL_Delay(1000);
|
||||||
if (
|
|
||||||
(GPIOA->IDR & GPIO_PIN_0) ||
|
|
||||||
!(GPIOC->IDR & GPIO_PIN_11) ||
|
|
||||||
!(GPIOC->IDR & GPIO_PIN_8)
|
|
||||||
) {
|
|
||||||
display_current_frame += 1;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
// go to previous report
|
|
||||||
else if (
|
|
||||||
!(GPIOC->IDR & GPIO_PIN_9) ||
|
|
||||||
!(GPIOC->IDR & GPIO_PIN_6)
|
|
||||||
) {
|
|
||||||
display_current_frame -= 1;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
// execute this test live
|
|
||||||
else if (
|
|
||||||
!(GPIOA->IDR & GPIO_PIN_15)
|
|
||||||
) {
|
|
||||||
// not implemented
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* USER CODE END 2 */
|
/* USER CODE END 2 */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user